36 template<
class LListBase,
class T>
46 "LPtrList::readIstream : " 52 const label len = tok.labelToken();
55 const char delimiter = is.readBeginList(
"LPtrList");
59 if (delimiter == token::BEGIN_LIST)
61 for (label i=0; i<len; ++i)
63 T*
p = inew(is).ptr();
68 "LPtrList::readIstream : " 75 T*
p = inew(is).ptr();
80 "LPtrList::readIstream : " 81 "reading the single entry" 84 for (label i=1; i<len; ++i)
86 this->push_back(
p->clone().ptr());
92 is.readEndList(
"LPtrList");
94 else if (tok.isPunctuation(token::BEGIN_LIST))
99 while (!tok.isPunctuation(token::END_LIST))
102 this->push_back(inew(is).ptr());
111 <<
"incorrect first token, expected <int> or '(', found " 122 template<
class LListBase,
class T>
126 this->readIstream(is, inew);
130 template<
class LListBase,
class T>
133 this->readIstream(is,
INew<T>());
139 template<
class LListBase,
class T>
143 list.readIstream(is, INew<T>());
151 template<
class LListBase,
class T>
155 const LPtrList<LListBase, T>& list
159 os <<
nl << list.size() <<
nl << token::BEGIN_LIST <<
nl;
162 for (
auto iter = list.cbegin(); iter != list.cend(); ++iter)
168 os << token::END_LIST;
errorManipArg< error, int > exit(error &err, const int errNo=1)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
Template class for non-intrusive linked PtrLists.
Istream & operator>>(Istream &, directionInfo &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
LPtrList()=default
Default construct.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A helper class when constructing from an Istream or dictionary.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...