OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

IOobject Class Reference

Inheritance diagram for IOobject:

Inheritance graph
[legend]
Collaboration diagram for IOobject:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 92 of file IOobject.H.


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.
fileName filePath () const
 Return complete path + object name if the file exists.
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 &)

Static Public Member Functions

template<class Stream>
static void writeBanner (Stream &os)
 Write the standard OpenFOAM file/dictionary banner.
template<class Stream>
static void writeLogBanner (Stream &os)
 Write the standard OpenFOAM log banner.
template<class Stream>
static void writeDivider (Stream &os)
 Write the standard file section divider.

Protected Member Functions

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

Member Enumeration Documentation

Enumeration defining the valid states of an IOobject.

Enumerator:
GOOD 
BAD 

Definition at line 100 of file IOobject.H.

enum readOption

Enumeration defining the read options.

Enumerator:
MUST_READ 
READ_IF_PRESENT 
NO_READ 

Definition at line 107 of file IOobject.H.

Enumeration defining the write options.

Enumerator:
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 211 of file IOobject.H.


Member Function Documentation

Istream* objectStream (  )  [protected]

Construct and return an IFstream for the object.

The results is NULL if the stream constuction failed

void setBad ( const string &   )  [protected]

Set the object state to bad.

TypeName ( "IOobject"   ) 

Runtime type information.

const Time& time (  )  const

Return time.

Reimplemented in objectRegistry, and fvMesh.

const word& name (  )  const [inline]

Return name.

Reimplemented in IOdictionary, and fvMesh.

Definition at line 226 of file IOobject.H.

const word& headerClassName (  )  const [inline]

Return name of the class name read from header.

Definition at line 232 of file IOobject.H.

string& note (  )  [inline]

Return non-constant access to the optional note.

Definition at line 238 of file IOobject.H.

const string& note (  )  const [inline]

Return the optional note.

Definition at line 244 of file IOobject.H.

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

Rename.

Reimplemented in regIOobject.

Definition at line 250 of file IOobject.H.

bool registerObject (  )  const [inline]

Register object created from this IOobject with registry if true.

Definition at line 256 of file IOobject.H.

readOption readOpt (  )  const [inline]

Definition at line 264 of file IOobject.H.

readOption& readOpt (  )  [inline]

Definition at line 269 of file IOobject.H.

writeOption writeOpt (  )  const [inline]

Definition at line 274 of file IOobject.H.

writeOption& writeOpt (  )  [inline]

Definition at line 279 of file IOobject.H.

const fileName& rootPath (  )  const

Reimplemented in Time.

const fileName& caseName (  )  const

Reimplemented in Time.

fileName& instance (  )  [inline]

Definition at line 296 of file IOobject.H.

const fileName& local (  )  const [inline]

Definition at line 301 of file IOobject.H.

fileName path (  )  const

Return complete path.

Reimplemented in Time.

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

Return complete path with alternative instance and local.

fileName objectPath (  )  const [inline]

Return complete path + object name.

Definition at line 317 of file IOobject.H.

fileName filePath (  )  const

Return complete path + object name if the file exists.

either in the case/processor or case otherwise null

bool readHeader ( Istream &   ) 

Read header.

bool headerOk (  ) 

Read and check header info.

void writeBanner ( Stream &  os  )  [inline, static]

Write the standard OpenFOAM file/dictionary banner.

Definition at line 37 of file IOobjectI.H.

References Foam::FOAMversion.

void writeLogBanner ( Stream &  os  )  [inline, static]

Write the standard OpenFOAM log banner.

Definition at line 61 of file IOobjectI.H.

References Foam::FOAMversion.

void writeDivider ( Stream &  os  )  [inline, static]

Write the standard file section divider.

Definition at line 85 of file IOobjectI.H.

bool writeHeader ( Ostream &   )  const

Write header.

bool good (  )  const [inline]

Definition at line 358 of file IOobject.H.

bool bad (  )  const [inline]

Definition at line 363 of file IOobject.H.

InfoProxy<IOobject> info (  )  const [inline]

Return info proxy.

Used to print token information to a stream

Definition at line 375 of file IOobject.H.

void operator= ( const IOobject &   ) 

Reimplemented in regIOobject.


The documentation for this class was generated from the following files: Copyright © 2000-2007 OpenCFD Ltd