Go to the documentation of this file.
35 template<
class LListBase,
class T>
44 template<
class LListBase,
class T>
56 is.
fatalCheck(
"LList::readList : reading first token");
67 if (delimiter == token::BEGIN_LIST)
69 for (label i=0; i<len; ++i)
81 for (label i=0; i<len; ++i)
96 while (!tok.isPunctuation(token::END_LIST))
111 <<
"incorrect first token, expected <int> or '(', found "
121 template<
class LListBase,
class T>
130 const label len = this->size();
134 (len <= 1 || !shortLen)
139 os << len << token::BEGIN_LIST;
143 for (
const T& val : *
this)
145 if (space)
os << token::SPACE;
151 os << token::END_LIST;
156 os <<
nl << len <<
nl << token::BEGIN_LIST <<
nl;
159 for (
const T& val : *
this)
165 os << token::END_LIST;
173 template<
class LListBase,
class T>
180 template<
class LListBase,
class T>
183 return list.writeList(
os, -1);
void append(const T &item)
Add copy at tail of list.
label labelToken() const
Return label value.
bool isLabel() const noexcept
Token is LABEL.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
Istream & operator>>(Istream &, directionInfo &)
A token holds an item read from Istream.
void clear()
Delete contents of list.
Template class for non-intrusive linked lists.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
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)....
Istream & readList(Istream &is)
Read list from Istream.
bool isPunctuation() const noexcept
Token is PUNCTUATION.
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void putBack(const token &tok)
Put back a token. Only a single put back is permitted.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
LList()=default
Default construct.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write LList with line-breaks when length exceeds shortLen.