FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

className.H File Reference

Macro definitions for declaring ClassName(), NamespaceName(), etc. More...


Detailed Description

Macro definitions for declaring ClassName(), NamespaceName(), etc.

Definition in file className.H.

#include "src/OpenFOAM/primitives/strings/word/word.H"
#include "src/OpenFOAM/global/debug/debug.H"
Include dependency graph for className.H:

Go to the source code of this file.

Defines

#define  ClassNameNoDebug(TypeNameString)
 Add typeName information from argument TypeNameString to a class.
#define  NamespaceNameNoDebug(TypeNameString)
 Add typeName information from argument TypeNameString to a namespace.
#define  TemplateNameNoDebug(TemplateNameString)
 Add typeName information from argument TemplateNameString to a template class.
#define  ClassName(TypeNameString)
 Add typeName information from argument TypeNameString to a class.
#define  NamespaceName(TypeNameString)
 Add typeName information from argument TypeNameString to a namespace.
#define  TemplateName(TemplateNameString)
 Add typeName information from argument TypeNameString to a template class.
#define  defineTypeNameWithName(Type, Name)   const ::Foam::word Type::typeName(Name)
 Define the typeName, with alternative lookup as Name.
#define  defineTypeName(Type)   defineTypeNameWithName(Type, Type::typeName_())
 Define the typeName.
#define  defineTemplateTypeNameWithName(Type, Name)
 Define the typeName as Name for template classes.
#define  defineTemplateTypeName(Type)   defineTemplateTypeNameWithName(Type, #Type)
 Define the typeName for template classes, useful with typedefs.
#define  defineNamedTemplateTypeName(Type)   defineTemplateTypeNameWithName(Type, Type::typeName_())
 Define the typeName directly for template classes.
#define  defineDebugSwitchWithName(Type, Name, DebugSwitch)   int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))
 Define the debug information, lookup as Name.
#define  defineDebugSwitch(Type, DebugSwitch)   defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
 Define the debug information.
#define  defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)
 Define the debug information for templates, lookup as Name.
#define  defineTemplateDebugSwitch(Type, DebugSwitch)   defineTemplateDebugSwitchWithName(Type, #Type, DebugSwitch)
 Define the debug information for templates.
#define  defineNamedTemplateDebugSwitch(Type, DebugSwitch)   defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
 Define the debug information directly for templates.
#define  defineTypeNameAndDebug(Type, DebugSwitch)
 Define the typeName and debug information.
#define  defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch)
 Define the typeName and debug information, lookup as Name.
#define  defineTemplateTypeNameAndDebug(Type, DebugSwitch)   defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch)
 Define the typeName and debug information for templates, useful with typedefs.
#define  defineNamedTemplateTypeNameAndDebug(Type, DebugSwitch)
 Define the typeName and debug information for templates.

Define Documentation

#define ClassNameNoDebug (   TypeNameString  )
Value:
static const char* typeName_() { return TypeNameString; }                 \
    static const ::Foam::word typeName

Add typeName information from argument TypeNameString to a class.

Without debug information

Definition at line 44 of file className.H.

#define NamespaceNameNoDebug (   TypeNameString  )
Value:
inline const char* typeName_() { return TypeNameString; }                 \
    extern const ::Foam::word typeName

Add typeName information from argument TypeNameString to a namespace.

Without debug information.

Definition at line 50 of file className.H.

#define TemplateNameNoDebug (   TemplateNameString  )
Value:
class TemplateNameString##Name                                                \
{                                                                             \
public:                                                                       \
    TemplateNameString##Name() {}                                             \
    ClassNameNoDebug(#TemplateNameString);                                    \
}

Add typeName information from argument TemplateNameString to a template class.

Without debug information.

Definition at line 56 of file className.H.

#define ClassName (   TypeNameString  )
Value:
ClassNameNoDebug(TypeNameString);                                         \
    static int debug

Add typeName information from argument TypeNameString to a class.

Also declares debug information.

Definition at line 73 of file className.H.

Referenced by IOobjectList::lookupClass(), objectRegistry::names(), and IOobjectList::names().

#define NamespaceName (   TypeNameString  )
Value:
NamespaceNameNoDebug(TypeNameString);                                     \
    extern int debug

Add typeName information from argument TypeNameString to a namespace.

Also declares debug information.

Definition at line 79 of file className.H.

#define TemplateName (   TemplateNameString  )
Value:
class TemplateNameString##Name                                                \
{                                                                             \
public:                                                                       \
    TemplateNameString##Name() {}                                             \
    ClassName(#TemplateNameString);                                           \
}

Add typeName information from argument TypeNameString to a template class.

Also declares debug information.

Definition at line 85 of file className.H.

#define defineTypeNameWithName (   Type,
  Name  
)    const ::Foam::word Type::typeName(Name)

Define the typeName, with alternative lookup as Name.

Definition at line 101 of file className.H.

#define defineTypeName (   Type  )    defineTypeNameWithName(Type, Type::typeName_())

Define the typeName.

Definition at line 105 of file className.H.

#define defineTemplateTypeNameWithName (   Type,
  Name  
)
Value:
template<>                                                                \
    defineTypeNameWithName(Type, Name)

Define the typeName as Name for template classes.

Definition at line 114 of file className.H.

#define defineTemplateTypeName (   Type  )    defineTemplateTypeNameWithName(Type, #Type)

Define the typeName for template classes, useful with typedefs.

Definition at line 120 of file className.H.

#define defineNamedTemplateTypeName (   Type  )    defineTemplateTypeNameWithName(Type, Type::typeName_())

Define the typeName directly for template classes.

Definition at line 124 of file className.H.

#define defineDebugSwitchWithName (   Type,
  Name,
  DebugSwitch  
)    int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))

Define the debug information, lookup as Name.

Definition at line 135 of file className.H.

#define defineDebugSwitch (   Type,
  DebugSwitch  
)    defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)

Define the debug information.

Definition at line 139 of file className.H.

#define defineTemplateDebugSwitchWithName (   Type,
  Name,
  DebugSwitch  
)
Value:
template<>                                                                \
    defineDebugSwitchWithName(Type, Name, DebugSwitch)

Define the debug information for templates, lookup as Name.

Definition at line 148 of file className.H.

#define defineTemplateDebugSwitch (   Type,
  DebugSwitch  
)    defineTemplateDebugSwitchWithName(Type, #Type, DebugSwitch)

Define the debug information for templates.

Useful with typedefs

Definition at line 155 of file className.H.

#define defineNamedTemplateDebugSwitch (   Type,
  DebugSwitch  
)    defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)

Define the debug information directly for templates.

Definition at line 159 of file className.H.

#define defineTypeNameAndDebug (   Type,
  DebugSwitch  
)
Value:
defineTypeName(Type);                                                     \
    defineDebugSwitch(Type, DebugSwitch)

Define the typeName and debug information.

Definition at line 170 of file className.H.

#define defineTemplateTypeNameAndDebugWithName (   Type,
  Name,
  DebugSwitch  
)
Value:
defineTemplateTypeNameWithName(Type, Name);                               \
    defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)

Define the typeName and debug information, lookup as Name.

Definition at line 175 of file className.H.

#define defineTemplateTypeNameAndDebug (   Type,
  DebugSwitch  
)    defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch)

Define the typeName and debug information for templates, useful with typedefs.

Definition at line 180 of file className.H.

#define defineNamedTemplateTypeNameAndDebug (   Type,
  DebugSwitch  
)
Value:

Define the typeName and debug information for templates.

Definition at line 184 of file className.H.