60 is.
fatalCheck(
"List<T>::readList(Istream&) : reading first token");
70 tok.transferCompoundToken(is)
74 else if (tok.isLabel())
78 const label len = tok.labelToken();
83 if (is.
format() == IOstreamOption::BINARY && is_contiguous<T>::value)
89 Detail::readContiguous<T>
98 "List<T>::readList(Istream&) : " 99 "reading the binary block" 106 const char delimiter = is.readBeginList(
"List");
110 if (delimiter == token::BEGIN_LIST)
112 for (label i=0; i<len; ++i)
118 "List<T>::readList(Istream&) : " 132 "List<T>::readList(Istream&) : " 133 "reading the single entry" 136 for (label i=0; i<len; ++i)
144 is.readEndList(
"List");
147 else if (tok.isPunctuation(token::BEGIN_LIST))
155 list = std::move(sll);
160 <<
"incorrect first token, expected <int> or '(', found "
errorManipArg< error, int > exit(error &err, const int errNo=1)
void resize(const label len)
Adjust allocated size of list.
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
A token holds an item read from Istream.
char * data_bytes() noexcept
Return pointer to the underlying array serving as data storage,.
A templated class for holding compound tokens.
void clear()
Clear the list, i.e. set size to zero.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Istream & readList(Istream &is)
Read List from Istream, discarding contents of existing List.
Type & dynamicCast(U &obj)
A dynamic_cast (for references) that generates FatalError on failed casts.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Non-intrusive singly-linked list.
constexpr List() noexcept
Default construct.
streamFormat format() const noexcept
Get the current stream format.
std::streamsize size_bytes() const noexcept
Number of contiguous bytes for the List data.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...