35template<
class LListBase,
class T>
44template<
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)
73 list.
append(std::move(elem));
83 for (label i=0; i<len; ++i)
98 while (!tok.isPunctuation(token::END_LIST))
104 list.
append(std::move(elem));
113 <<
"incorrect first token, expected <int> or '(', found "
123template<
class LListBase,
class T>
132 const label len = this->size();
136 (len <= 1 || !shortLen)
141 os << len << token::BEGIN_LIST;
145 for (
const T& val : *
this)
147 if (space)
os << token::SPACE;
153 os << token::END_LIST;
158 os <<
nl << len <<
nl << token::BEGIN_LIST <<
nl;
161 for (
const T& val : *
this)
167 os << token::END_LIST;
175template<
class LListBase,
class T>
182template<
class LListBase,
class T>
185 return list.writeList(
os, -1);
bool fatalCheck(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)....
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
void putBack(const token &tok)
Put back a token. Only a single put back is permitted.
Template class for non-intrusive linked lists.
LList()=default
Default construct.
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write LList with line-breaks when length exceeds shortLen.
void clear()
Delete contents of list.
Istream & readList(Istream &is)
Read list from Istream.
void append(const T &elem)
Add copy at back of list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A token holds an item read from Istream.
bool isPunctuation() const noexcept
Token is PUNCTUATION.
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.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Istream & operator>>(Istream &, directionInfo &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)