Go to the documentation of this file.
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->
append(p->clone().ptr());
92 is.readEndList(
"LPtrList");
94 else if (tok.isPunctuation(token::BEGIN_LIST))
99 while (!tok.isPunctuation(token::END_LIST))
102 this->
append(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;
const_iterator cbegin() const
Iterator to first item in list with const access.
Istream & operator>>(Istream &, directionInfo &)
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
Template class for non-intrusive linked PtrLists.
A helper class when constructing from an Istream or dictionary.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
const const_iterator & cend() const
End of list for forward iterators.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
LPtrList()=default
Null construct.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void clear()
Clear the contents of the list.