39 #define ClassNameNoDebug(TypeNameString) \ 40 static const char* typeName_() { return TypeNameString; } \ 41 static const ::Foam::word typeName 45 #define NamespaceNameNoDebug(TypeNameString) \ 46 inline const char* typeName_() { return TypeNameString; } \ 47 extern const ::Foam::word typeName 51 #define TemplateNameNoDebug(TemplateNameString) \ 52 class TemplateNameString##Name \ 55 TemplateNameString##Name() {} \ 56 ClassNameNoDebug(#TemplateNameString); \ 65 #define ClassName(TypeNameString) \ 66 ClassNameNoDebug(TypeNameString); \ 71 #define NamespaceName(TypeNameString) \ 72 NamespaceNameNoDebug(TypeNameString); \ 77 #define TemplateName(TemplateNameString) \ 78 class TemplateNameString##Name \ 81 TemplateNameString##Name() {} \ 82 ClassName(#TemplateNameString); \ 90 #define defineTypeNameWithName(Type, Name) \ 91 const ::Foam::word Type::typeName(Name) 94 #define defineTypeName(Type) \ 95 defineTypeNameWithName(Type, Type::typeName_()) 98 #define defineTemplateTypeNameWithName(Type, Name) \ 100 defineTypeNameWithName(Type, Name) 102 #define defineTemplate2TypeNameWithName(Type, Name) \ 104 defineTypeNameWithName(Type, Name) 107 #define defineTemplateTypeName(Type) \ 108 defineTemplateTypeNameWithName(Type, #Type) 111 #define defineNamedTemplateTypeName(Type) \ 112 defineTemplateTypeNameWithName(Type, Type::typeName_()) 119 #define defineTypeNameAndDebug(Type, DebugSwitch) \ 120 defineTypeName(Type); \ 121 defineDebugSwitch(Type, DebugSwitch) 124 #define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch) \ 125 defineTemplateTypeNameWithName(Type, Name); \ 126 defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) 130 #define defineTemplateTypeNameAndDebug(Type, DebugSwitch) \ 131 defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch) 134 #define defineNamedTemplateTypeNameAndDebug(Type, DebugSwitch) \ 135 defineNamedTemplateTypeName(Type); \ 136 defineNamedTemplateDebugSwitch(Type, DebugSwitch) 143 #define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch) \ 144 defineTemplate2TypeNameWithName(Type, Name); \ 145 defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) 149 #define defineTemplate2TypeNameAndDebug(Type, DebugSwitch) \ 150 defineTemplate2TypeNameAndDebugWithName(Type, #Type, DebugSwitch) Macro definitions for debug switches.