Go to the documentation of this file.
35 template<
class LListBase,
class T>
44 template<
class LListBase,
class T>
54 is.
fatalCheck(
"LList::readList : reading first token");
56 if (firstToken.isLabel())
58 const label len = firstToken.labelToken();
65 if (delimiter == token::BEGIN_LIST)
67 for (label i=0; i<len; ++i)
79 for (label i=0; i<len; ++i)
89 else if (firstToken.isPunctuation())
91 if (firstToken.pToken() != token::BEGIN_LIST)
94 <<
"incorrect first token, '(', found " << firstToken.info()
104 lastToken.isPunctuation()
105 && lastToken.pToken() == token::END_LIST
122 <<
"incorrect first token, expected <int> or '(', found "
132 template<
class LListBase,
class T>
139 const label len = this->size();
143 (len <= 1 || !shortLen)
148 os << len << token::BEGIN_LIST;
152 for (
const T& val : *
this)
154 if (space) os << token::SPACE;
160 os << token::END_LIST;
165 os <<
nl << len <<
nl << token::BEGIN_LIST <<
nl;
168 for (
const T& val : *
this)
174 os << token::END_LIST;
182 template<
class LListBase,
class T>
void append(const T &item)
Add copy at tail of list.
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)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual bool check(const char *operation) const
Check IOstream status for given operation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void putBack(const token &tok)
Put back token.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
LList()=default
Null 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.