mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: className: add debug switch registration
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -137,6 +137,30 @@ public: \
|
|||||||
// definitions (debug information only)
|
// definitions (debug information only)
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
//- Define the debug information, lookup as \a Name
|
||||||
|
#define registerDebugSwitchWithName(Type,Tag,Name)\
|
||||||
|
class add##Tag##ToDebug\
|
||||||
|
:\
|
||||||
|
public ::Foam::simpleRegIOobject\
|
||||||
|
{\
|
||||||
|
public:\
|
||||||
|
add##Tag##ToDebug(const char* name)\
|
||||||
|
:\
|
||||||
|
::Foam::simpleRegIOobject(Foam::debug::addDebugObject, name)\
|
||||||
|
{}\
|
||||||
|
virtual ~add##Tag##ToDebug()\
|
||||||
|
{}\
|
||||||
|
virtual void readData(Foam::Istream& is)\
|
||||||
|
{\
|
||||||
|
Type::debug = readLabel(is);\
|
||||||
|
}\
|
||||||
|
virtual void writeData(Foam::Ostream& os) const\
|
||||||
|
{\
|
||||||
|
os << Type::debug;\
|
||||||
|
}\
|
||||||
|
};\
|
||||||
|
add##Tag##ToDebug add##Tag##ToDebug_(Name)
|
||||||
|
|
||||||
|
|
||||||
//- Define the debug information, lookup as \a Name
|
//- Define the debug information, lookup as \a Name
|
||||||
#define defineDebugSwitchWithName(Type, Name, DebugSwitch) \
|
#define defineDebugSwitchWithName(Type, Name, DebugSwitch) \
|
||||||
|
|||||||
Reference in New Issue
Block a user