OpenFOAM logo
Open Source CFD Toolkit

IOobject Class Reference

Inheritance diagram for IOobject:

Inheritance graph
[legend]
Collaboration diagram for IOobject:

Collaboration graph
[legend]
List of all members.

Public Types

enum  objectState { GOOD, BAD }
 Enumeration defining the valid states of an IOobject. More...
enum  readOption { MUST_READ, READ_IF_PRESENT, NO_READ }
 Enumeration defining the read options. More...
enum  writeOption { AUTO_WRITE = 0, NO_WRITE = 1 }
 Enumeration defining the write options. More...

Public Member Functions

 TypeName ("IOobject")
 Runtime type information.
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, registry, io options.
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, local, registry, io options.
autoPtr< IOobject > clone () const
 Clone.
virtual ~IOobject ()
const Time & time () const
 Return time.
const objectRegistry & db () const
 Return the local objectRegistry.
const word & name () const
 Return name.
const word & headerClassName () const
 Return name of the class name read from header.
string & note ()
 Return non-constant access to the optional note.
const string & note () const
 Return the optional note.
virtual void rename (const word &newName)
 Rename.
bool registerObject () const
 Register object created from this IOobject with registry if true.
readOption readOpt () const
readOption & readOpt ()
writeOption writeOpt () const
writeOption & writeOpt ()
const fileName & rootPath () const
const fileName & caseName () const
const fileName & instance () const
fileName & instance ()
const fileName & local () const
fileName path () const
 Return complete path.
fileName path (const word &instance, const fileName &local="") const
 Return complete path with alternative instance and local.
fileName objectPath () const
 Return complete path + object name.
bool readHeader (Istream &)
 Read header.
bool headerOk ()
 Read and check header info.
bool writeHeader (Ostream &) const
 Write header.
bool good () const
bool bad () const
InfoProxy< IOobject > info () const
 Return info proxy.
void operator= (const IOobject &)

Protected Member Functions

Istream * objectStream (const fileName &)
 Construct and return an IFstream for the given file.
Istream * objectStream ()
 Construct and return an IFstream for the object.
void setBad (const string &)
 Set the object state to bad.

Member Enumeration Documentation

enum objectState
 

Enumeration defining the valid states of an IOobject.

Enumeration values:
GOOD 
BAD 

Definition at line 100 of file IOobject.H.

enum readOption
 

Enumeration defining the read options.

Enumeration values:
MUST_READ 
READ_IF_PRESENT 
NO_READ 

Definition at line 107 of file IOobject.H.

enum writeOption
 

Enumeration defining the write options.

Enumeration values:
AUTO_WRITE 
NO_WRITE 

Definition at line 115 of file IOobject.H.


Constructor & Destructor Documentation

IOobject (  const word &  name,
const fileName &  instance,
const objectRegistry &  registry,
readOption  r = NO_READ,
writeOption  w = NO_WRITE,
bool  registerObject = true
) 
 

Construct from name, instance, registry, io options.

IOobject (  const word &  name,
const fileName &  instance,
const fileName &  local,
const objectRegistry &  registry,
readOption  r = NO_READ,
writeOption  w = NO_WRITE,
bool  registerObject = true
) 
 

Construct from name, instance, local, registry, io options.

virtual ~IOobject (   )  [inline, virtual]
 

Definition at line 217 of file IOobject.H.


Member Function Documentation

bool bad (   )  const [inline]
 

Definition at line 351 of file IOobject.H.

const fileName& caseName (   )  const
 

Reimplemented in Time.

autoPtr<IOobject> clone (   )  const [inline]
 

Clone.

Reimplemented in topoSet.

Definition at line 209 of file IOobject.H.

const objectRegistry& db (   )  const
 

Return the local objectRegistry.

Reimplemented in faMesh.

bool good (   )  const [inline]
 

Definition at line 346 of file IOobject.H.

const word& headerClassName (   )  const [inline]
 

Return name of the class name read from header.

Definition at line 238 of file IOobject.H.

bool headerOk (   ) 
 

Read and check header info.

InfoProxy<IOobject> info (   )  const [inline]
 

Return info proxy.

Used to print token information to a stream

Definition at line 363 of file IOobject.H.

fileName& instance (   )  [inline]
 

Definition at line 302 of file IOobject.H.

const fileName& instance (   )  const [inline]
 

Definition at line 297 of file IOobject.H.

const fileName& local (   )  const [inline]
 

Definition at line 307 of file IOobject.H.

References Foam::name().

Here is the call graph for this function:

const word& name (   )  const [inline]
 

Return name.

Reimplemented in IOdictionary, and fvMesh.

Definition at line 232 of file IOobject.H.

const string& note (   )  const [inline]
 

Return the optional note.

Definition at line 250 of file IOobject.H.

string& note (   )  [inline]
 

Return non-constant access to the optional note.

Definition at line 244 of file IOobject.H.

fileName objectPath (   )  const [inline]
 

Return complete path + object name.

Definition at line 323 of file IOobject.H.

Istream* objectStream (   )  [protected]
 

Construct and return an IFstream for the object.

The results is NULL if the stream constuction failed

Istream* objectStream (  const fileName &   )  [protected]
 

Construct and return an IFstream for the given file.

The results is NULL if the stream constuction failed

void operator= (  const IOobject &   ) 
 

Reimplemented in regIOobject.

fileName path (  const word &  instance,
const fileName &  local = ""
)  const
 

Return complete path with alternative instance and local.

fileName path (   )  const
 

Return complete path.

Reimplemented in Time.

bool readHeader (  Istream &   ) 
 

Read header.

readOption& readOpt (   )  [inline]
 

Definition at line 275 of file IOobject.H.

readOption readOpt (   )  const [inline]
 

Definition at line 270 of file IOobject.H.

bool registerObject (   )  const [inline]
 

Register object created from this IOobject with registry if true.

Definition at line 262 of file IOobject.H.

virtual void rename (  const word &  newName  )  [inline, virtual]
 

Rename.

Reimplemented in regIOobject.

Definition at line 256 of file IOobject.H.

const fileName& rootPath (   )  const
 

Reimplemented in Time.

void setBad (  const string &   )  [protected]
 

Set the object state to bad.

const Time& time (   )  const
 

Return time.

Reimplemented in objectRegistry, fvMesh, and faMesh.

TypeName (  "IOobject"   ) 
 

Runtime type information.

bool writeHeader (  Ostream &   )  const
 

Write header.

writeOption& writeOpt (   )  [inline]
 

Definition at line 285 of file IOobject.H.

writeOption writeOpt (   )  const [inline]
 

Definition at line 280 of file IOobject.H.


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org