33 template<
class T,
class Key,
class Hash>
37 is.fatalCheck(
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)");
43 "HashPtrTable<T, Key, Hash>::read(Istream&, const INew&) : "
47 if (firstToken.isLabel())
49 label s = firstToken.labelToken();
52 char delimiter = is.readBeginList(
"HashPtrTable<T, Key, Hash>");
56 if (2*s > this->tableSize_)
61 if (delimiter == token::BEGIN_LIST)
63 for (label i=0; i<s; i++)
67 insert(key, inewt(key, is).ptr());
71 "HashPtrTable<T, Key, Hash>::"
72 "read(Istream&, const INew&) : reading entry"
80 "HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
82 ) <<
"incorrect first token, '(', found " << firstToken.info()
88 is.readEndList(
"HashPtrTable");
90 else if (firstToken.isPunctuation())
92 if (firstToken.pToken() != token::BEGIN_LIST)
96 "HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
98 ) <<
"incorrect first token, '(', found " << firstToken.info()
106 lastToken.isPunctuation()
107 && lastToken.pToken() == token::END_LIST
111 is.putBack(lastToken);
114 insert(key, inewt(key, is).ptr());
118 "HashPtrTable<T, Key, Hash>::read(Istream&, const INew&) : "
129 "HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
131 ) <<
"incorrect first token, expected <int> or '(', found "
136 is.fatalCheck(
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)");
142 template<
class T,
class Key,
class Hash>
150 template<
class T,
class Key,
class Hash>
159 template<
class T,
class Key,
class Hash>
169 template<
class T,
class Key,
class Hash>
177 os <<
nl << L.size() <<
nl << token::BEGIN_LIST <<
nl;
187 os << iter.key() << token::SPACE << *iter() <<
nl;
191 os << token::END_LIST;
194 os.
check(
"Ostream& operator<<(Ostream&, const HashPtrTable&)");