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 defineTypeNameAndDebugWithName(Type, Name, DebugSwitch) \
125 defineTypeNameWithName(Type, Name); \
126 defineDebugSwitchWithName(Type, Name, DebugSwitch)
129 #define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch) \
130 defineTemplateTypeNameWithName(Type, Name); \
131 defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)
135 #define defineTemplateTypeNameAndDebug(Type, DebugSwitch) \
136 defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch)
139 #define defineNamedTemplateTypeNameAndDebug(Type, DebugSwitch) \
140 defineNamedTemplateTypeName(Type); \
141 defineNamedTemplateDebugSwitch(Type, DebugSwitch)
148 #define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch) \
149 defineTemplate2TypeNameWithName(Type, Name); \
150 defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch)
154 #define defineTemplate2TypeNameAndDebug(Type, DebugSwitch) \
155 defineTemplate2TypeNameAndDebugWithName(Type, #Type, DebugSwitch)
Macro definitions for debug switches.