61 class deleteControlDictPtr
65 deleteControlDictPtr()
68 ~deleteControlDictPtr()
76 debugSwitchesPtr_ = NULL;
77 infoSwitchesPtr_ = NULL;
78 optimisationSwitchesPtr_ = NULL;
83 deleteControlDictPtr deleteControlDictPtr_;
100 IFstream ifs(controlDictFiles[cdfi]);
107 "Cannot open controlDict" 114 return *controlDictPtr_;
120 const char* subDictName,
128 subDictName,
false,
false 131 if (!ePtr || !ePtr->
isDict())
133 cerr<<
"debug::switchSet(const char*, dictionary*&):\n" 134 <<
" Cannot find " << subDictName <<
" in dictionary " 141 subDictPtr = &ePtr->
dict();
150 return switchSet(
"DebugSwitches", debugSwitchesPtr_);
156 return switchSet(
"InfoSwitches", infoSwitchesPtr_);
162 return switchSet(
"OptimisationSwitches", optimisationSwitchesPtr_);
170 name, defaultValue,
false,
false 179 name, defaultValue,
false,
false 188 name, defaultValue,
false,
false 315 if (!debugObjectsPtr_)
320 return *debugObjectsPtr_;
326 if (!infoObjectsPtr_)
331 return *infoObjectsPtr_;
337 if (!optimisationObjectsPtr_)
342 return *optimisationObjectsPtr_;
348 if (!dimensionSetObjectsPtr_)
353 return *dimensionSetObjectsPtr_;
359 if (!dimensionedConstantObjectsPtr_)
364 return *dimensionedConstantObjectsPtr_;
Abstract base class for registered object with I/O. Used in debug symbol registration.
void addInfoObject(const char *name, simpleRegIOobject *obj)
Register info switch read/write object.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dictionary & switchSet(const char *subDictName, dictionary *&subDictPtr)
Internal function to lookup a sub-dictionary from controlDict.
A list of keyword definitions, which are a keyword followed by any number of values (e...
T lookupOrAddDefault(const word &, const T &, bool recursive=false, bool patternMatch=true)
Find and return a T, if not found return the given.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool good() const
Return true if next operation might succeed.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
int optimisationSwitch(const char *name, const int defaultValue=0)
Lookup optimisation switch or add default value.
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
void append(const word &, T *)
Add at tail of dictionary.
const fileName & name() const
Return the dictionary name.
simpleObjectRegistry & debugObjects()
Get access to registered debug switch objects.
int infoSwitch(const char *name, const int defaultValue=0)
Lookup info switch or add default value.
simpleObjectRegistry & optimisationObjects()
Get access to registered optimisation switch objects.
fileNameList findEtcFiles(const fileName &, bool mandatory=false, bool findFirst=false)
Search for files from user/group/shipped directories.
void addDimensionedConstantObject(const char *name, simpleRegIOobject *)
Register DimensionedConstant read/write object.
Functions to search 'etc' directories for configuration files etc.
dictionary & infoSwitches()
The InfoSwitches sub-dictionary in the central controlDict.
void append(const T &)
Append an element at the end of the list.
int debugSwitch(const char *name, const int defaultValue=0)
Lookup debug switch or add default value.
simpleObjectRegistry & infoObjects()
Get access to registered info switch objects.
simpleObjectRegistry & dimensionSetObjects()
Get access to registered dimensionSets switch objects.
Template functions to aid in the implementation of demand driven data.
Object registry for simpleRegIOobject. Maintains ordering.
simpleObjectRegistry & dimensionedConstantObjects()
Get access to registered dimensionedConstant switch objects.
dictionary & optimisationSwitches()
The OptimisationSwitches sub-dictionary in the central controlDict.
void addDimensionSetObject(const char *name, simpleRegIOobject *obj)
Register DimensionSets read/write object.
void addOptimisationObject(const char *name, simpleRegIOobject *obj)
Register optimisation switch read/write object.
dictionary & debugSwitches()
The DebugSwitches sub-dictionary in the central controlDict.
void addDebugObject(const char *name, simpleRegIOobject *obj)
Register debug switch read/write object.
dictionary & controlDict()
The central control dictionary.
void deleteDemandDrivenData(DataPtr &dataPtr)
const T * lookupPtr(const word &) const
Find and return an entry if present, otherwise return NULL.
virtual bool isDict() const
Return true if this entry is a dictionary.
A keyword and a list of tokens is an 'entry'.
#define SafeFatalIOErrorInFunction(ios, msg)
Report an error message using Foam::FatalIOError.