35 template<
class LListBase,
class T>
45 "ILList::readIstream : "
49 if (firstToken.isLabel())
51 const label len = firstToken.labelToken();
54 const char delimiter = is.readBeginList(
"ILList");
58 if (delimiter == token::BEGIN_LIST)
60 for (label i=0; i<len; ++i)
62 T*
p = inew(is).ptr();
67 "ILList::readIstream : "
74 T*
p = inew(is).ptr();
79 "ILList::readIstream : "
80 "reading the single entry"
83 for (label i=1; i<len; ++i)
91 is.readEndList(
"ILList");
93 else if (firstToken.isPunctuation())
95 if (firstToken.pToken() != token::BEGIN_LIST)
98 <<
"incorrect first token, '(', found " << firstToken.info()
108 lastToken.isPunctuation()
109 && lastToken.pToken() == token::END_LIST
113 is.putBack(lastToken);
115 T*
p = inew(is).ptr();
125 <<
"incorrect first token, expected <int> or '(', found "
134 template<
class LListBase,
class T>
138 this->readIstream(is, inew);
142 template<
class LListBase,
class T>
145 this->readIstream(is,
INew<T>());
151 template<
class LListBase,
class T>
155 list.readIstream(is,
INew<T>());