AMCAX Kernel 1.0.0.0
|
Defines commonly used SFINAE utils. More...
#include <type_traits>
Namespaces | |
namespace | AMCAX |
Namespace of all interface in the AMCAX kernel. | |
namespace | AMCAX::Meshing |
Namespace of all interface in the AMCAX Meshing module. | |
Macros | |
#define | CLASS_HAS_FUNC(ClassName, FuncName) |
Check if a class has specified function. | |
#define | CLASS_HAS_CONST_FUNC(ClassName, FuncName) |
Check if a class has specified const function. | |
#define | CLASS_HAS_STATIC_FUNC(ClassName, FuncName) |
check if a class has specified function. | |
#define | CLASS_HAS_TYPE(ClassName, TypeName) |
check if a class has specified type. | |
#define | GET_TYPE_OTHERWISE_DEFAULT(ClassName, TypeName, DefaultType, Result) |
Check if a class has specified type then get the type, otherwise get the default type. | |
#define | GET_TYPE_OTHERWISE_VOID(ClassName, TypeName, Result) |
Check if a class has specified type then get the type, otherwise get the void type. | |
#define | CLASS_HAS_VALUE(ClassName, ValueName, Result) |
check if a class has specified value. | |
#define | GET_VALUE_OTHERWISE_DEFAULT(ClassName, ValueType, ValueName, DefaultValue, Result) |
Defines commonly used SFINAE utils.
#define CLASS_HAS_CONST_FUNC | ( | ClassName, | |
FuncName ) |
Check if a class has specified const function.
Args | Parameter types passed to the function. |
#define CLASS_HAS_FUNC | ( | ClassName, | |
FuncName ) |
Check if a class has specified function.
Args | Parameter types passed to the function. |
#define CLASS_HAS_STATIC_FUNC | ( | ClassName, | |
FuncName ) |
check if a class has specified function.
A non-static member function receives an instance of the class as first parameter. So we need to explicitly declare the function type of "func". "typename F" is the type of function, "F" is the instance of function.
#define CLASS_HAS_TYPE | ( | ClassName, | |
TypeName ) |
check if a class has specified type.
#define CLASS_HAS_VALUE | ( | ClassName, | |
ValueName, | |||
Result ) |
check if a class has specified value.
#define GET_TYPE_OTHERWISE_DEFAULT | ( | ClassName, | |
TypeName, | |||
DefaultType, | |||
Result ) |
Check if a class has specified type then get the type, otherwise get the default type.
ClassName | The class where to find type. |
TypeName | The name of the type. |
DefaultType | If doesn't find the type, the return DefaultType . |
Result | Found result will be stored in Result . |
#define GET_TYPE_OTHERWISE_VOID | ( | ClassName, | |
TypeName, | |||
Result ) |
Check if a class has specified type then get the type, otherwise get the void
type.
ClassName | The class where to find type. |
TypeName | The name of the type. |
Result | Found result will be stored in Result . |
#define GET_VALUE_OTHERWISE_DEFAULT | ( | ClassName, | |
ValueType, | |||
ValueName, | |||
DefaultValue, | |||
Result ) |