36template<
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 "
113 <<
exit(FatalIOError);
122template<
class LListBase,
class T>
126 this->readIstream(is, inew);
130template<
class LListBase,
class T>
133 this->readIstream(is,
INew<T>());
139template<
class LListBase,
class T>
143 list.readIstream(is,
INew<T>());
151template<
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;
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)....
Template class for non-intrusive linked PtrLists.
const_iterator cbegin() const
Iterator to first item in list with const access.
const const_iterator & cend() const
End of list for forward iterators.
void clear()
Clear the contents of the list.
LPtrList()=default
Default construct.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
Istream & operator>>(Istream &, directionInfo &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)