63 fName = typeFilePath<Type>(*
this,
search);
64 ok = fp.
readHeader(*
this, fName, Type::typeName);
67 if (ok && checkType && headerClassName_ != Type::typeName)
73 <<
"Unexpected class name \"" << headerClassName_
74 <<
"\" expected \"" << Type::typeName
75 <<
"\" when reading " << fName <<
endl;
95 << Type::typeName <<
' ' <<
name()
96 <<
" constructed with IOobject::MUST_READ_IF_MODIFIED but " 97 << Type::typeName <<
" does not support automatic rereading." A class for handling file names.
Ostream & endl(Ostream &os)
Add newline and flush stream.
autoPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler.
An encapsulation of filesystem-related operations.
static void broadcast(Type &value, const label comm=UPstream::worldComm)
Broadcast content (contiguous or non-contiguous) to all processes in communicator.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Reading required, file watched for runTime modification.
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (uses typeFilePath to find file) and check its info.
static fileCheckTypes fileModificationChecking
Type of file modification checking.
#define WarningInFunction
Report a warning using Foam::Warning.
static bool master(const label communicator=worldComm)
Am I the master rank.
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
void warnNoRereading() const
Helper: warn that type does not support re-reading.
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const =0
Read object header from supplied file.