34bool Foam::IOField<Type>::readIOcontents(
bool readOnProc)
36 if (isReadRequired() || (isReadOptional() && headerOk()))
39 Istream& is = readStream(typeName, readOnProc);
54Foam::label Foam::IOField<T>::readIOsize()
58 if (isReadRequired() || (isReadOptional() && headerOk()))
60 Istream& is = readStream(typeName);
64 const bool quick = tok.isLabel();
69 count = tok.labelToken();
107 readIOcontents(readOnProc);
131 if (!readIOcontents())
146 if (!readIOcontents())
172 const bool reuse = tfld.movable();
179 if (!readIOcontents() && !reuse)
192 const Field<Type>& content
215 IOField<Type> reader(rio);
216 reader.readOpt(rOpt);
218 return reader.readIOsize();
232 IOField<Type> reader(rio);
251 os << contentRef_.cref();
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
void operator=(const Field< Type > &)
Copy assignment.
constexpr Field() noexcept
Default construct.
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
IOFieldRef()=delete
No default construct.
IOField(const IOField &)=default
Default copy construct.
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
static Field< Type > readContents(const IOobject &io)
Read and return contents. The IOobject will not be registered.
static label readContentsSize(const IOobject &io)
Read and return content size, -1 if not read.
@ NO_REGISTER
Do not request registration (bool: false).
readOption readOpt() const noexcept
Get the read option.
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void warnNoRereading() const
Helper: warn that type does not support re-reading.
void resetHeader(const word &newName=word::null)
Clear various bits (headerClassName, note, sizeof...) that would be obtained when reading from a file...
void transfer(List< Type > &list)
void resize(const label len)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
A class for managing temporary objects.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
OBJstream os(runTime.globalPath()/outputName)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.