52 fileName fName(typeFilePath<Type>(*
this));
54 ok = fp.
readHeader(*
this, fName, Type::typeName);
55 if (ok && checkType && headerClassName_ != Type::typeName)
58 <<
"unexpected class name " << headerClassName_
59 <<
" expected " << Type::typeName
60 <<
" when reading " << fName <<
endl;
82 << Type::typeName <<
' ' <<
name()
83 <<
" constructed with IOobject::MUST_READ_IF_MODIFIED" 84 " but " << Type::typeName
85 <<
" does not support automatic rereading."
const word & name() const
Return name.
bool typeHeaderOk(const bool checkType=true)
Read header (uses typeFilePath to find file) and check header.
A class for handling file names.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
const fileOperation & fileHandler()
Get current file handler.
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
static fileCheckTypes fileModificationChecking
Type of file modification checking.
#define WarningInFunction
Report a warning using Foam::Warning.
readOption readOpt() const
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.