Lugdunum  0.1.0
Namespaces | Macros
Enum.cpp File Reference
#include <lug/Graphics/Vulkan/API/RTTI/Enum.hpp>
#include <lug/System/Logger/Logger.hpp>
Include dependency graph for Enum.cpp:

Go to the source code of this file.

Namespaces

 lug
 
 lug::Graphics
 
 lug::Graphics::Vulkan
 
 lug::Graphics::Vulkan::API
 
 lug::Graphics::Vulkan::API::RTTI
 

Macros

#define LUG_ENUM_TO_STR(enum)
 
#define LUG_ENUM_TO_STR_FUNCTION(type, macro)
 
#define LUG_FLAGS_TO_STR_VEC(enum)
 
#define LUG_FLAGS_TO_STR_VEC_FUNCTION(type, macro)
 
#define LUG_FLAGS_TO_STR(enum)
 
#define LUG_FLAGS_TO_STR_FUNCTION(type, macro)
 

Macro Definition Documentation

◆ LUG_ENUM_TO_STR

#define LUG_ENUM_TO_STR (   enum)
Value:
case enum: \
return #enum;

Definition at line 11 of file Enum.cpp.

◆ LUG_ENUM_TO_STR_FUNCTION

#define LUG_ENUM_TO_STR_FUNCTION (   type,
  macro 
)
Value:
const char* toStr(type enumVal) { \
switch (enumVal) { \
macro(LUG_ENUM_TO_STR) \
default: \
LUG_LOG.warn("One value of the enum " #type " is not implemented : {}", enumVal); \
return nullptr; \
} \
}
#define LUG_ENUM_TO_STR(enum)
Definition: Enum.cpp:11
const char * toStr(VkResult enumVal)

Definition at line 14 of file Enum.cpp.

◆ LUG_FLAGS_TO_STR_VEC

#define LUG_FLAGS_TO_STR_VEC (   enum)
Value:
if (flag & enum) { \
retVal.push_back(#enum); \
} \
flag &= ~enum;

Definition at line 39 of file Enum.cpp.

◆ LUG_FLAGS_TO_STR_VEC_FUNCTION

#define LUG_FLAGS_TO_STR_VEC_FUNCTION (   type,
  macro 
)
Value:
std::vector<const char*> type ## ToStrVec(type flag) { \
std::vector<const char*> retVal; \
\
if (flag) { \
LUG_LOG.warn("One value of the flag " #type " is not implemented : {}", flag); \
} \
return retVal; \
}
#define LUG_FLAGS_TO_STR_VEC(enum)
Definition: Enum.cpp:39

Definition at line 45 of file Enum.cpp.

◆ LUG_FLAGS_TO_STR

#define LUG_FLAGS_TO_STR (   enum)
Value:
if (flag & enum) { \
val += #enum; \
if ((flag & ~enum)) \
val += " | "; \
} \
flag &= ~enum;

Definition at line 65 of file Enum.cpp.

◆ LUG_FLAGS_TO_STR_FUNCTION

#define LUG_FLAGS_TO_STR_FUNCTION (   type,
  macro 
)
Value:
std::string type ## ToStr(type flag) { \
std::string val; \
\
if (flag) { \
LUG_LOG.warn("One value of the flag " #type " is not implemented: {}", flag); \
} \
return val; \
}
#define LUG_FLAGS_TO_STR(enum)
Definition: Enum.cpp:65

Definition at line 73 of file Enum.cpp.