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;