Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to cover I/O. More...
Go to the source code of this file.
Namespaces | |
Foam | |
Namespace for OpenFOAM. | |
Macros | |
#define | TypeNameNoDebug(TypeNameString) |
Declare a ClassNameNoDebug() with extra virtual type info. More... | |
#define | TypeName(TypeNameString) |
Declare a ClassName() with extra virtual type info. More... | |
Functions | |
template<class To , class From > | |
To & | dynamicCast (From &r) |
Reference type cast template function,. More... | |
template<class To , class From > | |
To & | dynamicCastNull (From &r) |
Reference type cast template function,. More... | |
template<class To , class From > | |
To & | refCast (From &r) |
Reference type cast template function. More... | |
template<class To , class From > | |
To & | refCastNull (From &r) |
Reference type cast template function,. More... | |
template<class TestType , class Type > | |
bool | isType (const Type &t) |
Check the typeid. More... | |
template<class TestType , class Type > | |
bool | isA (const Type &t) |
Check if a dynamic_cast to typeid is possible. More... | |
template<class TypeName , class Name > | |
word | typedName (Name name) |
Return the name of the object within the given type. More... | |
Variables | |
template<class Type > | |
constexpr bool | isRef = std::is_reference<Type>::value |
Determine whether a type is a reference. More... | |
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to cover I/O.
Original source file typeInfo.H
InNamespace Foam
The user can get the type's type name using the type info access function
The reference type cast template function:
wraps dynamic_cast to handle the bad_cast exception and generate a FatalError.
The isA function:
returns true if r is of type T or derived from type T.
Definition in file typeInfo.H.
#define TypeNameNoDebug | ( | TypeNameString | ) |
Declare a ClassNameNoDebug() with extra virtual type info.
Definition at line 67 of file typeInfo.H.
#define TypeName | ( | TypeNameString | ) |
Declare a ClassName() with extra virtual type info.
Definition at line 74 of file typeInfo.H.