typeInfo.H File Reference
Include dependency graph for typeInfo.H:

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 & refCast (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...
 

Detailed Description

Original source file typeInfo.H

Definition in file typeInfo.H.

Macro Definition Documentation

◆ TypeNameNoDebug

#define TypeNameNoDebug (   TypeNameString)
Value:
ClassNameNoDebug(TypeNameString); \
virtual const word& type() const { return typeName; } \
template<class Name> \
word typedName(Name name) const { return (type() + ':') + name; }
#define ClassNameNoDebug(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:39
word typedName(Name name)
Return the name of the object within the given type.
Definition: typeInfo.H:149
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488

Declare a ClassNameNoDebug() with extra virtual type info.

Definition at line 66 of file typeInfo.H.

◆ TypeName

#define TypeName (   TypeNameString)
Value:
ClassName(TypeNameString); \
virtual const word& type() const { return typeName; } \
template<class Name> \
word typedName(Name name) const { return (type() + ':') + name; }
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:65

Declare a ClassName() with extra virtual type info.

Definition at line 73 of file typeInfo.H.