LkEngine 0.1.2
 
Loading...
Searching...
No Matches
CoreMacros.h File Reference

Core macros used by the entire engine. More...

#include <cassert>
#include <typeinfo>
#include <regex>
#include "LkEngine/Core/LObject/Enum.h"

Go to the source code of this file.

Namespaces

namespace  LkEngine
 

Macros

#define CORE_API   __declspec(dllimport)
 
#define LK_UNUSED(Arg)
 
#define LK_ARRAYSIZE(Array)
 
#define LK_BIT(x)
 
#define LK_STRINGIFY(x)
 
#define LK_TEXT(Text)
 
#define LK_FMT_LIB   fmt
 Platform: Windows.
 
#define LK_FMT   LK_FMT_LIB
 
#define LK_MARK_FUNC_NOT_IMPLEMENTED(...)
 
#define LK_MARK_FUNC_FOR_REMOVAL(...)
 
#define LK_ASSUME(x)
 
#define LK_STRUCT_OFFSET(InStruct, InMember)
 
#define LK_LIKELY(x)
 
#define LK_UNLIKELY(x)
 
#define LK_GET_FIRST_ARG(Arg, ...)
 
#define LCLASS(Class)
 
#define LSTRUCT(Struct)
 
#define LOBJECT_REGISTER(...)
 
#define LASSET(Class)
 
#define LASSET_REGISTER(...)
 
#define LPANEL(...)
 
#define LPANEL_REGISTER(...)
 

Enumerations

enum class  EClassFlag : uint32_t { None = LK_BIT(0) , Abstract = LK_BIT(1) }
 
enum class  LkEngine::EClassType : uint64_t {
  LField = LK_BIT(0) , LEnum = LK_BIT(1) , LStruct = LK_BIT(2) , LClass = LK_BIT(3) ,
  LObject = LK_BIT(4)
}
 
enum class  LkEngine::ELogFormat : uint8_t { Compact = 0 , Verbose }
 

Functions

 LkEngine::LK_ENUM_CLASS (EClassFlag)
 
 LkEngine::LK_ENUM_CLASS (EClassType)
 
FORCEINLINE constexpr const char * LkEngine::Core::Internal::RemovePrefix (const char *Str, const char Prefix='L')
 Remove a single character from the start of a string.
 

Detailed Description

Core macros used by the entire engine.

Macro Definition Documentation

◆ LK_ARRAYSIZE

#define LK_ARRAYSIZE ( Array)
Value:
(static_cast<int>((sizeof(Array) / sizeof(*(Array)))))

◆ LK_BIT

#define LK_BIT ( x)
Value:
(1 << x)

◆ LK_FMT_LIB

#define LK_FMT_LIB   fmt

Platform: Windows.

TODO: Platform specific implementations in separate headers rather than checking the platform here.

◆ LK_GET_FIRST_ARG

#define LK_GET_FIRST_ARG ( Arg,
... )
Value:
Arg

◆ LK_LIKELY

#define LK_LIKELY ( x)
Value:
(!!(x))

◆ LK_MARK_FUNC_FOR_REMOVAL

#define LK_MARK_FUNC_FOR_REMOVAL ( ...)
Value:
LK_CORE_ASSERT(false, "[ FUNCTION IS DEPRECATED AND IS TO BE REMOVED ]\n{}" __VA_OPT__("\n\t{}"), LK_FUNCSIG __VA_OPT__(, __VA_ARGS__))

◆ LK_MARK_FUNC_NOT_IMPLEMENTED

#define LK_MARK_FUNC_NOT_IMPLEMENTED ( ...)
Value:
LK_CORE_ASSERT(false, "[ FUNCTION NOT IMPLEMENTED ]\n{}" __VA_OPT__("\n{}"), LK_FUNCSIG __VA_OPT__(, __VA_ARGS__))

◆ LK_STRINGIFY

#define LK_STRINGIFY ( x)
Value:
#x

◆ LK_TEXT

#define LK_TEXT ( Text)
Value:
L##Text /* Wide string. */

◆ LK_UNLIKELY

#define LK_UNLIKELY ( x)
Value:
(!!(x))

◆ LK_UNUSED

#define LK_UNUSED ( Arg)
Value:
((void)(Arg))

Function Documentation

◆ RemovePrefix()

FORCEINLINE constexpr const char * LkEngine::Core::Internal::RemovePrefix ( const char * Str,
const char Prefix = 'L' )
constexpr

Remove a single character from the start of a string.

Returns
The passed string without the prefix if the contained the prefix, else return the same string.