106 static constexpr
const char*
foamFile =
"FoamFile";
153 word headerClassName_;
174 bool registerObject_;
185 void setBad(
const string&);
320 return headerClassName_;
326 return headerClassName_;
336 const string&
note()
const
350 return registerObject_;
356 return registerObject_;
393 const fileName&
caseName(
const bool global)
const;
453 template<
class Stream>
454 static inline Stream&
writeBanner(Stream& os,
bool noHint=
false);
457 template<
class Stream>
461 template<
class Stream>
475 return objState_ ==
GOOD;
480 return objState_ ==
BAD;
501 Ostream&
operator<<(Ostream& os,
const InfoProxy<IOobject>& ip);
507 static const bool global =
false;
517 inline IOobject
unregister(
const IOobject& io)
520 uio.registerObject() =
false;
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static Stream & writeBanner(Stream &os, bool noHint=false)
Write the standard OpenFOAM file/dictionary banner.
const fileName & local() const
bool typeHeaderOk(const bool checkType)
Read header using typeGlobalFile to find file.
const fileName & caseName(const bool global) const
fileName filePath(const word &typeName, const bool global) const
Return complete path + object name if the file exists.
const Time & time() const
Return time.
readOption
Enumeration defining the read options.
writeOption writeOpt() const
fileName relativeObjectPath() const
Return complete relativePath + object name.
void warnNoRereading() const
Helper: warn that type does not support re-reading.
static Stream & writeEndDivider(Stream &os)
Write the standard end file divider.
void setBad(const string &)
Set the object state to bad.
bool & registerObject()
Register object created from this IOobject with registry if true.
fileName relativePath() const
Return the path relative to the case directory.
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
const objectRegistry & db() const
Return the local objectRegistry.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
string & note()
Return non-constant access to the optional note.
static bool fileNameComponents(const fileName &path, fileName &instance, fileName &local, word &name)
Split path into instance, local, name components.
readOption readOpt() const
void updateInstance() const
If the instance is a time directory update to the current time.
static constexpr const char * foamFile
Keyword for the FoamFile header sub-dictionary.
autoPtr< IOobject > clone() const
Clone.
bool headerOk()
Read header of local object without type-checking.
const word & headerClassName() const
Return name of the class name read from header.
word group() const
Return group (extension part of name)
objectState
Enumeration defining the valid states of an IOobject.
TypeName("IOobject")
Runtime type information.
static fileCheckTypes fileModificationChecking
Type of file modification checking.
virtual void rename(const word &newName)
Rename.
static Stream & writeDivider(Stream &os)
Write the standard file section divider.
InfoProxy< IOobject > info() const
Return info proxy.
void operator=(const IOobject &)
word member() const
Return member (name without the extension)
bool readHeader(Istream &)
Read header.
const word & name() const
Return name.
const fileName & rootPath() const
static const NamedEnum< fileCheckTypes, 4 > fileCheckTypesNames
static word groupName(Name name, const word &group)
fileCheckTypes
Enumeration defining the file checking options.
writeOption
Enumeration defining the write options.
bool writeHeader(Ostream &) const
Write header.
virtual ~IOobject()
Destructor.
fileName objectPath(const bool global) const
Return complete path + object name including the processor.
fileName path(const bool global) const
Return complete path including the processor sub-directory.
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class for handling file names.
Registry of regIOobjects.
Templated form of IOobject providing type information for file reading and header type checking.
fileName objectPath() const
Return the object path for this Type.
typeIOobject(const IOobject &io)
bool headerOk()
Read header (uses typeGlobalFile to find file) and check.
fileName filePath() const
Return the path for the file for this Type.
A class for handling words, derived from string.
IOobject unregister(const IOobject &io)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
Trait for obtaining global write status.
Trait for obtaining global status.
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...