Go to the documentation of this file.
59 class deleteControlDictPtr
63 deleteControlDictPtr()
66 ~deleteControlDictPtr()
74 debugSwitchesPtr_ = NULL;
75 infoSwitchesPtr_ = NULL;
76 optimisationSwitchesPtr_ = NULL;
81 deleteControlDictPtr deleteControlDictPtr_;
98 IFstream ifs(controlDictFiles[cdfi]);
105 "Cannot open controlDict"
112 return *controlDictPtr_;
118 const char* subDictName,
126 subDictName,
false,
false
129 if (!ePtr || !ePtr->
isDict())
131 cerr<<
"debug::switchSet(const char*, dictionary*&):\n"
132 <<
" Cannot find " << subDictName <<
" in dictionary "
139 subDictPtr = &ePtr->
dict();
148 return switchSet(
"DebugSwitches", debugSwitchesPtr_);
154 return switchSet(
"InfoSwitches", infoSwitchesPtr_);
160 return switchSet(
"OptimisationSwitches", optimisationSwitchesPtr_);
168 name, defaultValue,
false,
false
177 name, defaultValue,
false,
false
186 name, defaultValue,
false,
false
313 if (!debugObjectsPtr_)
318 return *debugObjectsPtr_;
324 if (!infoObjectsPtr_)
329 return *infoObjectsPtr_;
335 if (!optimisationObjectsPtr_)
340 return *optimisationObjectsPtr_;
346 if (!dimensionSetObjectsPtr_)
351 return *dimensionSetObjectsPtr_;
357 if (!dimensionedConstantObjectsPtr_)
362 return *dimensionedConstantObjectsPtr_;
A keyword and a list of tokens is an 'entry'.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
dictionary & debugSwitches()
The DebugSwitches sub-dictionary in the central controlDict.
Template functions to aid in the implementation of demand driven data.
int infoSwitch(const char *name, const int defaultValue=0)
Lookup info switch or add default value.
const T * lookupPtr(const word &) const
Find and return an entry if present, otherwise return NULL.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void append(const word &, T *)
Add at tail of dictionary.
void deleteDemandDrivenData(DataPtr &dataPtr)
int optimisationSwitch(const char *name, const int defaultValue=0)
Lookup optimisation switch or add default value.
simpleObjectRegistry & optimisationObjects()
Get access to registered optimisation switch objects.
virtual bool isDict() const
Return true if this entry is a dictionary.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
void append(const T &)
Append an element at the end of the list.
simpleObjectRegistry & debugObjects()
Get access to registered debug switch objects.
simpleObjectRegistry & dimensionSetObjects()
Get access to registered dimensionSets switch objects.
#define SafeFatalIOErrorInFunction(ios, msg)
Report an error message using Foam::FatalIOError.
A list of keyword definitions, which are a keyword followed by any number of values (e....
void addDimensionedConstantObject(const char *name, simpleRegIOobject *)
Register DimensionedConstant read/write object.
simpleObjectRegistry & infoObjects()
Get access to registered info switch objects.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
simpleObjectRegistry & dimensionedConstantObjects()
Get access to registered dimensionedConstant switch objects.
dictionary & infoSwitches()
The InfoSwitches sub-dictionary in the central controlDict.
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
int debugSwitch(const char *name, const int defaultValue=0)
Lookup debug switch or add default value.
errorManipArg< error, int > exit(error &err, const int errNo=1)
fileNameList findEtcFiles(const fileName &, bool mandatory=false, bool findFirst=false)
Search for files from user/group/shipped directories.
void addDebugObject(const char *name, simpleRegIOobject *obj)
Register debug switch read/write object.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void addDimensionSetObject(const char *name, simpleRegIOobject *obj)
Register DimensionSets read/write object.
dictionary & controlDict()
The central control dictionary.
bool good() const
Return true if next operation might succeed.
dictionary & optimisationSwitches()
The OptimisationSwitches sub-dictionary in the central controlDict.
void addInfoObject(const char *name, simpleRegIOobject *obj)
Register info switch read/write object.
void addOptimisationObject(const char *name, simpleRegIOobject *obj)
Register optimisation switch read/write object.
Abstract base class for registered object with I/O. Used in debug symbol registration.
dictionary & switchSet(const char *subDictName, dictionary *&subDictPtr)
Internal function to lookup a sub-dictionary from controlDict.
word name(const complex &)
Return a string representation of a complex.
T lookupOrAddDefault(const word &, const T &, bool recursive=false, bool patternMatch=true)
Find and return a T, if not found return the given.
Object registry for simpleRegIOobject. Maintains ordering.