33 template<
class LListBase,
class T>
39 "LPtrList<LListBase, T>::read(Istream&, const INew&)"
46 "LPtrList<LListBase, T>::read(Istream&, const INew&) : "
50 if (firstToken.isLabel())
52 label s = firstToken.labelToken();
55 char delimiter = is.readBeginList(
"LPtrList<LListBase, T>");
59 if (delimiter == token::BEGIN_LIST)
61 for (label i=0; i<s; i++)
67 "LPtrList<LListBase, T>::read(Istream&, const INew&) : "
74 T* tPtr = iNew(is).ptr();
79 "LPtrList<LListBase, T>::read(Istream&, const INew&) : "
83 for (label i=1; i<s; i++)
85 append(tPtr->clone().ptr());
91 is.readEndList(
"LPtrList<LListBase, T>");
93 else if (firstToken.isPunctuation())
95 if (firstToken.pToken() != token::BEGIN_LIST)
99 "LPtrList<LListBase, T>::read(Istream&, const INew&)",
101 ) <<
"incorrect first token, '(', found " << firstToken.info()
106 is.fatalCheck(
"LPtrList<LListBase, T>::read(Istream&, const INew&)");
111 lastToken.isPunctuation()
112 && lastToken.pToken() == token::END_LIST
116 is.putBack(lastToken);
122 "LPtrList<LListBase, T>::read(Istream&, const INew&)"
130 "LPtrList<LListBase, T>::read(Istream&, const INew&)",
132 ) <<
"incorrect first token, expected <int> or '(', found "
137 is.fatalCheck(
"LPtrList<LListBase, T>::read(Istream&, const INew&)");
143 template<
class LListBase,
class T>
151 template<
class LListBase,
class T>
160 template<
class LListBase,
class T>
172 template<
class LListBase,
class T>
173 Foam::Ostream& Foam::operator<<(Ostream& os, const LPtrList<LListBase, T>& lst)
176 os <<
nl << lst.size();
179 os <<
nl << token::BEGIN_LIST <<
nl;
193 os << token::END_LIST;
196 os.check(
"Ostream& operator<<(Ostream&, const LPtrList<LListBase, T>&)");