FunctionObject base class for writing a list of objects registered to the database, on behalf of the inheriting function object, on when those should be written to disk. More...
Public Member Functions | |
writeObjectsBase (const objectRegistry &obr, const Switch &logRef) | |
Construct from objectRegistry and inheriting function object. More... | |
writeObjectsBase (const writeObjectsBase &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~writeObjectsBase () |
Destructor. More... | |
const wordReList & | writeObjectNames () const |
Return const access to the object names requested to be written. More... | |
virtual bool | read (const dictionary &) |
Read the list of objects to be written. More... | |
virtual bool | write () |
Write function. More... | |
void | operator= (const writeObjectsBase &)=delete |
Disallow default bitwise assignment. More... | |
Protected Member Functions | |
void | resetWriteObjectName (const wordRe &name) |
Reset the list of object names to be written to a single regular. More... | |
void | resetWriteObjectNames (const wordReList &names) |
Reset the list of object names to be written. More... | |
virtual wordList | objectNames () |
Get the list of field names to be written. More... | |
virtual void | writeObject (const regIOobject &obj) |
Write the requested registered IO object. More... | |
Protected Attributes | |
const objectRegistry & | writeObr_ |
Reference to the region objectRegistry. More... | |
const Switch & | log_ |
Reference to the inheriting function object's log variable. More... | |
Switch | regExp_ |
Optional switch for regular expression support. More... | |
wordReList | writeObjectNames_ |
Object names requested by the user to be written. More... | |
FunctionObject base class for writing a list of objects registered to the database, on behalf of the inheriting function object, on when those should be written to disk.
FunctionObjects that inherit this class will receive the additional dictionary option objects
which allows selecting which fields of the inherited function should be written to disk when write()
is called.
Example of function object specification:
<functionObjectName> { ... objects (obj1 obj2); ... }
Property | Description | Required | Default value |
---|---|---|---|
objects | List of objects to be written | yes | |
regExp | Switch for regular expression support | no | true |
Note: Regular expressions can also be used in objects
.
Definition at line 103 of file writeObjectsBase.H.
writeObjectsBase | ( | const objectRegistry & | obr, |
const Switch & | logRef | ||
) |
Construct from objectRegistry and inheriting function object.
Definition at line 109 of file writeObjectsBase.C.
Referenced by writeObjectsBase::writeObject().
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 121 of file writeObjectsBase.C.
|
protected |
Reset the list of object names to be written to a single regular.
expression
Definition at line 33 of file writeObjectsBase.C.
References writeObjectsBase::resetWriteObjectNames().
Referenced by writeLocalObjects::read().
|
protected |
Reset the list of object names to be written.
Definition at line 43 of file writeObjectsBase.C.
Referenced by writeObjectsBase::resetWriteObjectName().
|
protectedvirtual |
Get the list of field names to be written.
Reimplemented in writeLocalObjects.
Definition at line 52 of file writeObjectsBase.C.
References Foam::endl(), forAll, objectRegistry::foundObject(), Foam::name(), objectRegistry::names(), Foam::nl, writeObjectsBase::regExp_, List< T >::size(), HashTable< T, Key, Hash >::sortedToc(), HashTable< T, Key, Hash >::toc(), Foam::Warning, writeObjectsBase::writeObject(), writeObjectsBase::writeObjectNames_, and writeObjectsBase::writeObr_.
Referenced by writeObjectsBase::read(), and writeObjectsBase::write().
|
protectedvirtual |
Write the requested registered IO object.
Definition at line 96 of file writeObjectsBase.C.
References Foam::endl(), Foam::Info, writeObjectsBase::log_, IOobject::name(), regIOobject::write(), and writeObjectsBase::writeObjectsBase().
Referenced by NamedEnum< compressibleField, 8 >::names(), writeObjectsBase::objectNames(), and writeObjectsBase::write().
const Foam::wordReList & writeObjectNames | ( | ) | const |
Return const access to the object names requested to be written.
Definition at line 128 of file writeObjectsBase.C.
References writeObjectsBase::writeObjectNames_.
|
virtual |
Read the list of objects to be written.
Reimplemented in writeObjects, wallHeatTransferCoeff, wallShearStress, wallHeatFlux, yPlus, writeLocalObjects, turbulenceIntensity, shearStress, totalEnthalpy, and Qdot.
Definition at line 134 of file writeObjectsBase.C.
References forAll, dictionary::lookup(), dictionary::lookupOrDefault(), writeObjectsBase::objectNames(), writeObjectsBase::regExp_, List< T >::setSize(), List< T >::size(), and writeObjectsBase::writeObjectNames_.
Referenced by writeLocalObjects::read(), and writeObjects::read().
|
virtual |
Write function.
Reimplemented in writeObjects, wallHeatTransferCoeff, wallShearStress, wallHeatFlux, yPlus, turbulenceIntensity, shearStress, totalEnthalpy, and Qdot.
Definition at line 156 of file writeObjectsBase.C.
References UList< T >::empty(), forAll, objectRegistry::lookupObject(), writeObjectsBase::objectNames(), objectRegistry::time(), writeObjectsBase::writeObject(), writeObjectsBase::writeObr_, TimeState::writeTime(), and Time::writeTimeDict().
Referenced by Qdot::write(), shearStress::write(), totalEnthalpy::write(), turbulenceIntensity::write(), yPlus::write(), wallHeatFlux::write(), wallShearStress::write(), wallHeatTransferCoeff::write(), and writeObjects::write().
|
delete |
Disallow default bitwise assignment.
|
protected |
Reference to the region objectRegistry.
Definition at line 111 of file writeObjectsBase.H.
Referenced by writeObjectsBase::objectNames(), and writeObjectsBase::write().
|
protected |
Reference to the inheriting function object's log variable.
Definition at line 114 of file writeObjectsBase.H.
Referenced by writeObjectsBase::writeObject().
|
protected |
Optional switch for regular expression support.
Defaults to true
Definition at line 118 of file writeObjectsBase.H.
Referenced by writeObjectsBase::objectNames(), and writeObjectsBase::read().
|
protected |
Object names requested by the user to be written.
Definition at line 121 of file writeObjectsBase.H.
Referenced by writeLocalObjects::objectNames(), writeObjectsBase::objectNames(), writeObjectsBase::read(), and writeObjectsBase::writeObjectNames().