46 os <<
nl << label(count) <<
nl;
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 "
streamFormat format() const noexcept
Get the current stream format.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & read(token &)=0
Return next token from stream.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &list)
virtual Ostream & write(const char c)
Write character.
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...
T * data() noexcept
Return pointer to the underlying array serving as data storage.
void writeEntry(Ostream &os) const
Write the UList with its compound type.
void size(const label n)
Older name for setAddressableSize.
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
Istream & readList(Istream &is)
Read List contents from Istream.
A templated class for holding compound tokens.
A token holds an item read from Istream.
compound & transferCompoundToken()
Return reference to compound and mark internally as released.
bool isLabel() const noexcept
Token is LABEL.
label labelToken() const
Return label value.
InfoProxy< token > info() const
Return info proxy for printing token information to a stream.
bool isCompound() const noexcept
Token is COMPOUND.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
To & dynamicCast(From &r)
static Ostream & writeChars(Ostream &os, const char *chars, std::streamsize count)