defineDebugSwitch.H File Reference

Macro definitions for debug switches. More...

Include dependency graph for defineDebugSwitch.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RegisterDebugSwitch< Type >
 Define the debug information, lookup as name. More...
 

Namespaces

namespace  Foam
 Namespace for OpenFOAM.
 

Macros

#define registerTemplateDebugSwitchWithName(Type, Name)
 
#define registerDebugSwitchWithName(Type, Tag, Name)
 Define the debug information, lookup as Name. More...
 
#define defineDebugSwitchWithName(Type, Name, Value)    int Type::debug(::Foam::debug::debugSwitch(Name, Value))
 Define the debug information, lookup as Name. More...
 
#define defineDebugSwitch(Type, Value)
 Define the debug information. More...
 
#define defineTemplateDebugSwitchWithName(Type, Name, Value)
 Define the debug information for templates, lookup as Name. More...
 
#define defineTemplate2DebugSwitchWithName(Type, Name, Value)
 Define the debug information for templates sub-classes, lookup as Name. More...
 
#define defineTemplateDebugSwitch(Type, Value)    defineTemplateDebugSwitchWithName(Type, #Type, Value)
 Define the debug information for templates. More...
 
#define defineNamedTemplateDebugSwitch(Type, Value)    defineTemplateDebugSwitchWithName(Type, Type::typeName_(), Value)
 Define the debug information directly for templates. More...
 
#define defineTemplate2DebugSwitch(Type, Value)    defineTemplate2DebugSwitchWithName(Type, #Type, Value)
 Define the debug information for templates. More...
 
#define defineNamedTemplate2DebugSwitch(Type, Value)    defineTemplate2DebugSwitchWithName(Type, Type::typeName_(), Value)
 Define the debug information directly for templates. More...
 

Detailed Description

Macro definitions for debug switches.

Original source file defineDebugSwitch.H

Definition in file defineDebugSwitch.H.

Macro Definition Documentation

◆ registerTemplateDebugSwitchWithName

#define registerTemplateDebugSwitchWithName (   Type,
  Name 
)
Value:
template<> \
static const RegisterDebugSwitch registerDebugSwitch
The unique RegisterDebugSwitch object.

Definition at line 84 of file defineDebugSwitch.H.

◆ registerDebugSwitchWithName

#define registerDebugSwitchWithName (   Type,
  Tag,
  Name 
)
Value:
class add##Tag##ToDebug \
: \
{ \
public: \
\
explicit add##Tag##ToDebug(const char* name) \
: \
::Foam::simpleRegIOobject(::Foam::debug::addDebugObject, name) \
{} \
\
virtual ~add##Tag##ToDebug() = default; \
\
virtual void readData(::Foam::Istream& is) \
{ \
is >> Type::debug; \
} \
\
virtual void writeData(::Foam::Ostream& os) const \
{ \
os << Type::debug; \
} \
\
add##Tag##ToDebug(const add##Tag##ToDebug&) = delete; \
void operator=(const add##Tag##ToDebug&) = delete; \
}; \
add##Tag##ToDebug add##Tag##ToDebug_(Name)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Abstract base class for registered object with I/O. Used in debug symbol registration.
virtual void writeData(Ostream &os) const =0
Write.
virtual void readData(Istream &is)=0
Read.
OBJstream os(runTime.globalPath()/outputName)
void addDebugObject(const char *name, simpleRegIOobject *obj)
Register debug switch read/write object.
Definition: debug.C:249
dict add("bounds", meshBb)

Define the debug information, lookup as Name.

Definition at line 91 of file defineDebugSwitch.H.

◆ defineDebugSwitchWithName

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

Define the debug information, lookup as Name.

Definition at line 122 of file defineDebugSwitch.H.

◆ defineDebugSwitch

#define defineDebugSwitch (   Type,
  Value 
)
Value:
defineDebugSwitchWithName(Type, Type::typeName_(), Value); \
registerDebugSwitchWithName(Type, Type, Type::typeName_())
#define defineDebugSwitchWithName(Type, Name, Value)
Define the debug information, lookup as Name.

Define the debug information.

Definition at line 126 of file defineDebugSwitch.H.

◆ defineTemplateDebugSwitchWithName

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

Define the debug information for templates, lookup as Name.

Definition at line 131 of file defineDebugSwitch.H.

◆ defineTemplate2DebugSwitchWithName

#define defineTemplate2DebugSwitchWithName (   Type,
  Name,
  Value 
)
Value:
template<> \
defineDebugSwitchWithName(Type, Name, Value); \
registerTemplateDebugSwitchWithName(Type, Name)

Define the debug information for templates sub-classes, lookup as Name.

Definition at line 137 of file defineDebugSwitch.H.

◆ defineTemplateDebugSwitch

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

Define the debug information for templates.

Useful with typedefs

Definition at line 144 of file defineDebugSwitch.H.

◆ defineNamedTemplateDebugSwitch

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

Define the debug information directly for templates.

Definition at line 148 of file defineDebugSwitch.H.

◆ defineTemplate2DebugSwitch

#define defineTemplate2DebugSwitch (   Type,
  Value 
)     defineTemplate2DebugSwitchWithName(Type, #Type, Value)

Define the debug information for templates.

Useful with typedefs

Definition at line 154 of file defineDebugSwitch.H.

◆ defineNamedTemplate2DebugSwitch

#define defineNamedTemplate2DebugSwitch (   Type,
  Value 
)     defineTemplate2DebugSwitchWithName(Type, Type::typeName_(), Value)

Define the debug information directly for templates.

Definition at line 158 of file defineDebugSwitch.H.