Loading...
Searching...
No Matches
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 the debug information, lookup as Name.
#define registerDebugSwitchWithName(Type, Tag, Name)
 Define the debug information, lookup as Name.
#define defineDebugSwitchWithName(Type, Name, Value)
 Define the debug information, lookup as Name.
#define defineDebugSwitch(Type, Value)
 Define the debug information.
#define defineTemplateDebugSwitchWithName(Type, Name, Value)
 Define the debug information for templates, lookup as Name.
#define defineTemplateDebugSwitch(Type, Value)
 Define the debug information for templates.
#define defineNamedTemplateDebugSwitch(Type, Value)
 Define the debug information directly for templates.
#define defineTemplate2DebugSwitchWithName(Type, Name, Value)
#define defineTemplate2DebugSwitch(Type, Value)
#define defineNamedTemplate2DebugSwitch(Type, Value)

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:
\
static const RegisterDebugSwitch registerDebugSwitch
The unique RegisterDebugSwitch object.

Define the debug information, lookup as Name.

Definition at line 85 of file defineDebugSwitch.H.

◆ registerDebugSwitchWithName

#define registerDebugSwitchWithName ( Type,
Tag,
Name )
Value:
\
class add##Tag##ToDebug \
: \
{ \
public: \
\
/* Construct with given registered name */ \
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:60
Abstract base class for registered object with I/O. Used in debug symbol registration.
virtual void readData(Istream &is)=0
Read.
OBJstream os(runTime.globalPath()/outputName)
auto & name
void addDebugObject(const char *name, simpleRegIOobject *obj)
Register debug switch read/write object.
Definition debug.C:246
dict add("bounds", meshBb)
const bool writeData(pdfDictionary.get< bool >("writeData"))

Define the debug information, lookup as Name.

Definition at line 94 of file defineDebugSwitch.H.

◆ defineDebugSwitchWithName

#define defineDebugSwitchWithName ( Type,
Name,
Value )
Value:
int Type::debug(::Foam::debug::debugSwitch(Name, Value))
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
Definition debug.C:222

Define the debug information, lookup as Name.

Definition at line 129 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 135 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 142 of file defineDebugSwitch.H.

◆ defineTemplateDebugSwitch

#define defineTemplateDebugSwitch ( Type,
Value )
Value:
#define defineTemplateDebugSwitchWithName(Type, Name, Value)
Define the debug information for templates, lookup as Name.

Define the debug information for templates.

Useful with typedefs

Definition at line 151 of file defineDebugSwitch.H.

◆ defineNamedTemplateDebugSwitch

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

Define the debug information directly for templates.

Definition at line 157 of file defineDebugSwitch.H.

◆ defineTemplate2DebugSwitchWithName

#define defineTemplate2DebugSwitchWithName ( Type,
Name,
Value )
Value:

Definition at line 165 of file defineDebugSwitch.H.

◆ defineTemplate2DebugSwitch

#define defineTemplate2DebugSwitch ( Type,
Value )
Value:
#define defineTemplateDebugSwitch(Type, Value)
Define the debug information for templates.

Definition at line 169 of file defineDebugSwitch.H.

◆ defineNamedTemplate2DebugSwitch

#define defineNamedTemplate2DebugSwitch ( Type,
Value )
Value:
#define defineNamedTemplateDebugSwitch(Type, Value)
Define the debug information directly for templates.

Definition at line 173 of file defineDebugSwitch.H.