Skip to content
Snippets Groups Projects
Commit a1094deb authored by mattijs's avatar mattijs
Browse files

ENH: className: add debug switch registration

parent f3872c87
Branches
Tags
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -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: \ ...@@ -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) \
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment