36 if (isReadRequired() || (isReadOptional() && headerOk()))
38 readStream(typeName) >> *
this;
55 warnNoRereading<IOField<Type>>();
67 warnNoRereading<IOField<Type>>();
85 if (valid && haveFile)
100 warnNoRereading<IOField<Type>>();
112 warnNoRereading<IOField<Type>>();
127 warnNoRereading<IOField<Type>>();
142 warnNoRereading<IOField<Type>>();
155 const bool reuse = tfld.movable();
162 if (!readContents() && !reuse)
188 os << static_cast<const Field<Type>&>(*this);
196 os << contentRef_.cref();
void resize(const label len)
Adjust allocated size of list.
void transfer(List< Type > &list)
Transfer the contents of the argument List into this list and annul the argument list.
IOFieldRef()=delete
No default construct.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
bool headerOk()
Read and check header info. Does not check the headerClassName.
IOField(const IOField &)=default
Default copy construct.
bool isReadOptional() const noexcept
True if (READ_IF_PRESENT) bits are set.
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
static const char *const typeName
Typename for Field.
Istream & readStream(const word &, const bool valid=true)
Return Istream and check object type against that given.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Generic templated field type.
void close()
Close Istream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void operator=(const IOField< Type > &rhs)
Copy assignment of entries.
OBJstream os(runTime.globalPath()/outputName)
void operator=(const Field< Type > &)
Copy assignment.
bool isReadRequired() const noexcept
True if (MUST_READ | MUST_READ_IF_MODIFIED) bits are set.
bool good() const noexcept
True if next operation might succeed.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
A primitive field of type <T> with automated input and output.