Go to the documentation of this file.
73 const std::streamsize
count(this->size());
103 return writeChars(
os, this->cdata(), std::streamsize(this->size()));
113 const label len = list.
size();
119 is.
fatalCheck(
"UList<char>::readList(Istream&) : reading first token");
134 const label inputLen = elems.size();
140 <<
"incorrect length for UList. Read "
141 << inputLen <<
" expected " << len
145 this->deepCopy(elems);
157 <<
"incorrect length for UList. Read "
158 << inputLen <<
" expected " << len
169 is.
read(list.
data(), std::streamsize(len));
175 "UList<char>::readList(Istream&) : "
176 "reading binary block"
183 <<
"incorrect first token, expected <int>, found "
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
label labelToken() const
Return label value.
static Ostream & writeChars(Ostream &os, const char *chars, std::streamsize count)
bool isLabel() const noexcept
Token is LABEL.
A class for handling words, derived from Foam::string.
A templated class for holding compound tokens.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
streamFormat format() const noexcept
Get the current stream format.
A token holds an item read from Istream.
virtual Ostream & write(const char c)
Write character.
InfoProxy< token > info() const
Return info proxy for printing token information to a stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void transfer(List< T > &list)
Istream & readList(Istream &is)
Read List contents from Istream.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
T * data() noexcept
Return pointer to the underlying array serving as data storage.
OBJstream os(runTime.globalPath()/outputName)
compound & transferCompoundToken()
Return reference to compound and mark internally as released.
void writeEntry(Ostream &os) const
Write the UList with its compound type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
To & dynamicCast(From &r)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool isCompound() const noexcept
Token is COMPOUND.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void size(const label n)
Older name for setAddressableSize.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Istream & read(token &)=0
Return next token from stream.