writeLocalObjects Class Reference

FunctionObject base class for managing a list of objects on behalf of the inheriting function object, on when those should be written to disk. More...

Inheritance diagram for writeLocalObjects:
Collaboration diagram for writeLocalObjects:

Public Member Functions

 writeLocalObjects (const objectRegistry &obr, const Switch &logRef=logFalse)
 Construct from objectRegistry and inheriting function object. More...
 
 writeLocalObjects (const writeLocalObjects &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~writeLocalObjects ()
 Destructor. More...
 
const wordListlocalObjectNames () const
 Return const access to the local object names. More...
 
virtual bool read (const dictionary &)
 Read the list of objects to be written. More...
 
void operator= (const writeLocalObjects &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from writeObjectsBase
 writeObjectsBase (const objectRegistry &obr, const Switch &logRef=logFalse)
 Construct from objectRegistry and inheriting function object. More...
 
 writeObjectsBase (const writeObjectsBase &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~writeObjectsBase ()
 Destructor. More...
 
const wordReListwriteObjectNames () const
 Return const access to the object names requested to be written. More...
 
virtual bool write ()
 Write function. More...
 
void operator= (const writeObjectsBase &)=delete
 Disallow default bitwise assignment. More...
 

Protected Member Functions

void resetLocalObjectName (const word &name)
 Reset the list of local object names from a single word. More...
 
void resetLocalObjectNames (const wordList &names)
 Reset the list of local object names from a wordList. More...
 
virtual wordList objectNames ()
 Get the list of field names to be written. More...
 
- Protected Member Functions inherited from writeObjectsBase
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 void writeObject (const regIOobject &obj)
 Write the requested registered IO object. More...
 

Protected Attributes

wordList localObjectNames_
 Object names that are handled on behalf of the inheritor. More...
 
- Protected Attributes inherited from writeObjectsBase
const objectRegistrywriteObr_
 Reference to the region objectRegistry. More...
 
const Switchlog_
 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...
 

Additional Inherited Members

- Static Protected Attributes inherited from writeObjectsBase
static const Switch logFalse
 False switch to which log_ defaults. More...
 

Detailed Description

FunctionObject base class for managing a list of objects 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. When objects is omitted, it will write all objects and when that list is empty, it will not write any of the inheriting function object's managed objects.

Example of function object specification:

<functionObjectName>
{
    ...
    objects     (obj1 obj2);
    ...
}
Usage
Property Description Required Default value
objects List of objects to be written no ".*"

Note: Regular expressions can also be used in objects.

See also
Foam::functionObject Foam::functionObjects::writeObjectsBase
Source files

Definition at line 97 of file writeLocalObjects.H.

Constructor & Destructor Documentation

◆ writeLocalObjects() [1/2]

writeLocalObjects ( const objectRegistry obr,
const Switch logRef = logFalse 
)

Construct from objectRegistry and inheriting function object.

Definition at line 65 of file writeLocalObjects.C.

◆ writeLocalObjects() [2/2]

writeLocalObjects ( const writeLocalObjects )
delete

Disallow default bitwise copy construction.

◆ ~writeLocalObjects()

~writeLocalObjects ( )
virtual

Destructor.

Definition at line 78 of file writeLocalObjects.C.

Member Function Documentation

◆ resetLocalObjectName()

void resetLocalObjectName ( const word name)
protected

Reset the list of local object names from a single word.

Definition at line 32 of file writeLocalObjects.C.

References List< T >::append(), List< T >::clear(), writeLocalObjects::localObjectNames_, and Foam::name().

Referenced by Qdot::Qdot(), shearStress::shearStress(), totalEnthalpy::totalEnthalpy(), wallHeatFlux::wallHeatFlux(), and wallShearStress::wallShearStress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetLocalObjectNames()

void resetLocalObjectNames ( const wordList names)
protected

Reset the list of local object names from a wordList.

Definition at line 42 of file writeLocalObjects.C.

◆ objectNames()

Foam::wordList objectNames ( )
protectedvirtual

Get the list of field names to be written.

Reimplemented from writeObjectsBase.

Definition at line 52 of file writeLocalObjects.C.

References Foam::subsetStrings().

Here is the call graph for this function:

◆ localObjectNames()

const Foam::wordList & localObjectNames ( ) const

Return const access to the local object names.

Definition at line 85 of file writeLocalObjects.C.

◆ read()

bool read ( const dictionary dict)
virtual

Read the list of objects to be written.

Reimplemented from writeObjectsBase.

Reimplemented in yPlus, wallShearStress, wallHeatTransferCoeff, wallHeatFlux, turbulenceIntensity, totalEnthalpy, shearStress, and Qdot.

Definition at line 91 of file writeLocalObjects.C.

References wordRe::detect, dict, and writeObjectsBase::read().

Referenced by Qdot::read(), shearStress::read(), totalEnthalpy::read(), turbulenceIntensity::read(), wallHeatFlux::read(), wallHeatTransferCoeff::read(), wallShearStress::read(), and yPlus::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const writeLocalObjects )
delete

Disallow default bitwise assignment.

Member Data Documentation

◆ localObjectNames_

wordList localObjectNames_
protected

Object names that are handled on behalf of the inheritor.

Definition at line 107 of file writeLocalObjects.H.

Referenced by writeLocalObjects::resetLocalObjectName().


The documentation for this class was generated from the following files: