Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for writeLocalObjects:
Collaboration graph
[legend]

Public Member Functions

 writeLocalObjects (const objectRegistry &obr, const Switch &logRef)
 Construct from objectRegistry and inheriting function object. 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...
 
- Public Member Functions inherited from writeObjectsBase
 writeObjectsBase (const objectRegistry &obr, const Switch &logRef)
 Construct from objectRegistry and inheriting function object. 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...
 

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...
 
wordReList writeObjectNames_
 Object names requested by the user to be written. 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()

writeLocalObjects ( const objectRegistry obr,
const Switch logRef 
)

Construct from objectRegistry and inheriting function object.

Definition at line 66 of file writeLocalObjects.C.

◆ ~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 33 of file writeLocalObjects.C.

References writeLocalObjects::resetLocalObjectNames().

Here is the call graph for this function:

◆ resetLocalObjectNames()

void resetLocalObjectNames ( const wordList names)
protected

Reset the list of local object names from a wordList.

Definition at line 43 of file writeLocalObjects.C.

Referenced by writeLocalObjects::resetLocalObjectName().

Here is the caller graph for this function:

◆ 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 writeLocalObjects::localObjectNames_, Foam::subsetStrings(), and writeObjectsBase::writeObjectNames_.

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.

References writeLocalObjects::localObjectNames_.

◆ read()

bool read ( const dictionary dict)
virtual

Read the list of objects to be written.

Reimplemented from writeObjectsBase.

Reimplemented in wallHeatTransferCoeff, wallShearStress, wallHeatFlux, yPlus, and turbulenceIntensity.

Definition at line 91 of file writeLocalObjects.C.

References wordRe::detect, dictionary::found(), writeObjectsBase::read(), and writeObjectsBase::resetWriteObjectName().

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

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

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::localObjectNames(), and writeLocalObjects::objectNames().


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