32 #ifndef Foam_className_H 33 #define Foam_className_H 42 #define ClassNameNoDebug(TypeNameString) \ 43 static const char* typeName_() { return TypeNameString; } \ 44 static const ::Foam::word typeName 48 #define NamespaceNameNoDebug(TypeNameString) \ 49 inline const char* typeName_() { return TypeNameString; } \ 50 extern const ::Foam::word typeName 54 #define TemplateNameNoDebug(TemplateNameString) \ 55 class TemplateNameString##Name \ 58 TemplateNameString##Name() noexcept = default; \ 59 ClassNameNoDebug(#TemplateNameString); \ 68 #define ClassName(TypeNameString) \ 69 ClassNameNoDebug(TypeNameString); \ 74 #define NamespaceName(TypeNameString) \ 75 NamespaceNameNoDebug(TypeNameString); \ 80 #define TemplateName(TemplateNameString) \ 81 class TemplateNameString##Name \ 84 TemplateNameString##Name() noexcept = default; \ 85 ClassName(#TemplateNameString); \ 93 #define defineTypeNameWithName(Type, Name) \ 94 const ::Foam::word Type::typeName(Name) 97 #define defineTypeName(Type) \ 98 defineTypeNameWithName(Type, Type::typeName_()) 101 #define defineTemplateTypeNameWithName(Type, Name) \ 103 defineTypeNameWithName(Type, Name) 106 #define defineTemplateTypeName(Type) \ 107 defineTemplateTypeNameWithName(Type, #Type) 110 #define defineNamedTemplateTypeName(Type) \ 111 defineTemplateTypeNameWithName(Type, Type::typeName_()) 118 #define defineTypeNameAndDebug(Type, DebugSwitch) \ 119 defineTypeName(Type); \ 120 defineDebugSwitch(Type, DebugSwitch) 123 #define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch) \ 124 defineTemplateTypeNameWithName(Type, Name); \ 125 defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) 129 #define defineTemplateTypeNameAndDebug(Type, DebugSwitch) \ 130 defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch) 133 #define defineNamedTemplateTypeNameAndDebug(Type, DebugSwitch) \ 134 defineNamedTemplateTypeName(Type); \ 135 defineNamedTemplateDebugSwitch(Type, DebugSwitch) 142 #define defineTemplate2TypeNameWithName(Type, Name) \ 143 defineTemplateTypeNameWithName(Type, Name) 146 #define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch) \ 147 defineTemplateTypeNameWithName(Type, Name); \ 148 defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) 151 #define defineTemplate2TypeNameAndDebug(Type, DebugSwitch) \ 152 defineTemplateTypeNameAndDebug(Type, DebugSwitch) Macro definitions for debug switches.