106 static constexpr
const char*
foamFile =
"FoamFile";
153 word headerClassName_;
174 bool registerObject_;
185 void setBad(
const string&);
325 return headerClassName_;
331 return headerClassName_;
341 const string&
note()
const 355 return registerObject_;
361 return registerObject_;
462 template<
class Stream>
463 static inline Stream&
writeBanner(Stream& os,
bool noHint=
false);
466 template<
class Stream>
470 template<
class Stream>
484 return objState_ ==
GOOD;
489 return objState_ ==
BAD;
510 Ostream& operator<<(Ostream& os, const InfoProxy<IOobject>& ip);
523 return typeGlobal<Type>();
576 return filePath(Type::typeName, typeGlobalFile<Type>());
fileCheckTypes
Enumeration defining the file checking options.
bool typeHeaderOk(const bool checkType)
Read header using typeGlobalFile to find file.
autoPtr< IOobject > clone() const
Clone.
writeOption
Enumeration defining the write options.
static bool fileNameComponents(const fileName &path, fileName &instance, fileName &local, word &name)
Split path into instance, local, name components.
const word & name() const
Return name.
A class for handling file names.
void updateInstance() const
If the instance is a time directory update to the current time.
static Stream & writeBanner(Stream &os, bool noHint=false)
Write the standard OpenFOAM file/dictionary banner.
fileName relativeObjectPath() const
Return complete relativePath + object name.
bool typeGlobal()
Template function for obtaining global status.
void operator=(const IOobject &)
Templated form of IOobject providing type information for file reading and header type checking...
static Stream & writeDivider(Stream &os)
Write the standard file section divider.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
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.
bool typeGlobalFile()
Template function for obtaining global write status.
virtual void rename(const word &newName)
Rename.
const fileName & caseName(const bool global) const
word member() const
Return member (name without the extension)
objectState
Enumeration defining the valid states of an IOobject.
virtual ~IOobject()
Destructor.
word group() const
Return group (extension part of name)
fileName filePath(const word &typeName, const bool global) const
Return complete path + object name if the file exists.
readOption
Enumeration defining the read options.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool readHeader(Istream &)
Read header.
string & note()
Return non-constant access to the optional note.
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
fileName relativePath() const
Return the path relative to the case directory.
const fileName & local() const
void setBad(const string &)
Set the object state to bad.
fileName path(const bool global) const
Return complete path including the processor sub-directory.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static constexpr const char * foamFile
Keyword for the FoamFile header sub-dictionary.
static fileCheckTypes fileModificationChecking
Type of file modification checking.
const fileName & rootPath() const
static const NamedEnum< fileCheckTypes, 4 > fileCheckTypesNames
writeOption writeOpt() const
static Stream & writeEndDivider(Stream &os)
Write the standard end file divider.
A helper class for outputting values to Ostream.
const Time & time() const
Return time.
TypeName("IOobject")
Runtime type information.
bool writeHeader(Ostream &) const
Write header.
bool headerOk()
Read header of local object without type-checking.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
InfoProxy< IOobject > info() const
Return info proxy.
Registry of regIOobjects.
const objectRegistry & db() const
Return the local objectRegistry.
bool & registerObject()
Register object created from this IOobject with registry if true.
readOption readOpt() const
IOobject unregister(const IOobject &io)
const word & headerClassName() const
Return name of the class name read from header.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
fileName objectPath(const bool global) const
Return complete path + object name including the processor.
void warnNoRereading() const
Helper: warn that type does not support re-reading.