# PhasicFlow: src/phasicFlow/typeSelection/typeInfo.hpp File Reference

typeInfo.hpp File Reference
Include dependency graph for typeInfo.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces

| pFlow

## Macros

#define | has_static_member(name)
#define | TypeInfo(tName)
#define | TypeInfoNV(tName)
#define | TypeInfoTemplate(tName, Type)
#define | TypeInfoTemplate2(tName, Type1, Type2)
#define | TypeInfoTemplate3(tName, Type1, Type2, Type3)
#define | TypeInfoTemplateNV(tName, Type)
#define | TypeInfoTemplateNV2(tName, Type, tName2)

## Functions

template<typename T >
word | basicTypeName ()
template<>
word | basicTypeName< word > ()
template<>
word | basicTypeName< int64 > ()
template<>
word | basicTypeName< int32 > ()
template<>
word | basicTypeName< int16 > ()
template<>
word | basicTypeName< int8 > ()
template<>
word | basicTypeName< label > ()
template<>
word | basicTypeName< uint32 > ()
template<>
word | basicTypeName< real > ()
template<typename Type1 , typename Type2 >
bool | checkType (Type2 *object)
template<typename Type1 , typename Type2 >
bool | checkType (Type2 &object)

## Macro Definition Documentation

## has_static_member

#define has_static_member | ( |  | name | ) |

Value:
template<typename, typename> \
struct has_static_member_##name; \
\
template<typename testType, typename Ret, typename... Args> \
struct has_static_member_##name<testType, Ret(Args...)> { \
template<typename U, U> struct Check; \
\
template<typename U> \
static std::true_type Test(Check<Ret(*)(Args...), &U::name>*); \
template<typename U> \
static std::false_type Test(...); \
static const bool value = decltype(Test<testType>(0))::value; \
};

Definition at line 31 of file typeInfo.hpp.

## TypeInfo

#define TypeInfo | ( |  | tName | ) |

Value:
inline static word TYPENAME() {return tName; } \
virtual word typeName() const {return TYPENAME();}

Definition at line 48 of file typeInfo.hpp.

## TypeInfoNV

#define TypeInfoNV | ( |  | tName | ) |

Value:
inline static word TYPENAME() {return tName; } \
word typeName() const {return TYPENAME();}

Definition at line 52 of file typeInfo.hpp.

## TypeInfoTemplate

#define TypeInfoTemplate | ( |  | tName,
|  |  | Type
| ) |  |

Value:
has_static_member(TYPENAME); \
inline static word TYPENAME() \
{ \
if constexpr( has_static_member_TYPENAME<Type,word(void)>::value) \
{ return word(tName)+"<"+Type::TYPENAME()+">";} \
else \
return word(tName)+"<"+basicTypeName<Type>()+">"; \
return "noTYPE"; \
} \
virtual word typeName() const { return TYPENAME();}

Definition at line 57 of file typeInfo.hpp.

## TypeInfoTemplate2

#define TypeInfoTemplate2 | ( |  | tName,
|  |  | Type1,
|  |  | Type2
| ) |  |

Value:
has_static_member(TYPENAME); \
inline static word TYPENAME() \
{ \
if constexpr( has_static_member_TYPENAME<Type1,word(void)>::value) \
{ return word(tName)+"<"+Type1::TYPENAME()+","+Type2::TYPENAME()+">";} \
else \
return word(tName)+"<"+basicTypeName<Type1>()+","+Type2::TYPENAME()+">";\
return "noTYPE"; \
} \
virtual word typeName() const { return TYPENAME();}

Definition at line 69 of file typeInfo.hpp.

## TypeInfoTemplate3

#define TypeInfoTemplate3 | ( |  | tName,
|  |  | Type1,
|  |  | Type2,
|  |  | Type3
| ) |  |

Value:
inline static word TYPENAME() \
{ \
return word(tName)+"<"+Type1::TYPENAME()+","+Type2::TYPENAME()+","+Type3::TYPENAME()+">";\
} \
virtual word typeName() const { return TYPENAME();}

Definition at line 81 of file typeInfo.hpp.

## TypeInfoTemplateNV

#define TypeInfoTemplateNV | ( |  | tName,
|  |  | Type
| ) |  |

Value:
has_static_member(TYPENAME); \
inline static word TYPENAME() \
{ \
if constexpr( has_static_member_TYPENAME<Type,word(void)>::value) \
{ return word(tName)+"<"+Type::TYPENAME()+">";} \
else \
return word(tName)+"<"+basicTypeName<Type>()+">"; \
return "noTYPE"; \
} \
inline word typeName() const { return TYPENAME();}

Definition at line 89 of file typeInfo.hpp.

## TypeInfoTemplateNV2

#define TypeInfoTemplateNV2 | ( |  | tName,
|  |  | Type,
|  |  | tName2
| ) |  |

Value:
has_static_member(TYPENAME); \
inline static word TYPENAME() \
{ \
if constexpr ( has_static_member_TYPENAME<Type,word(void)>::value) \
{ return word(tName)+"<"+Type::TYPENAME()+","+word(tName2)+">";} \
else \
return word(tName)+"<"+basicTypeName<Type>()+","+word(tName2)+">"; \
return "noTYPE"; \
} \
inline word typeName() const { return TYPENAME();}

Definition at line 102 of file typeInfo.hpp.

pFlow::word
std::string word
Definition: builtinTypes.hpp:63
has_static_member
#define has_static_member(name)
Definition: typeInfo.hpp:31