Go to the documentation of this file.
34 template<
class T,
class Key,
class Hash>
38 is.
fatalCheck(
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)");
44 "HashPtrTable<T, Key, Hash>::read(Istream&, const INew&) : "
53 char delimiter = is.
readBeginList(
"HashPtrTable<T, Key, Hash>");
57 if (2*
s > this->tableSize_)
62 if (delimiter == token::BEGIN_LIST)
68 this->
insert(key, inewt(key, is).ptr());
72 "HashPtrTable<T, Key, Hash>::"
73 "read(Istream&, const INew&) : reading entry"
82 ) <<
"incorrect first token, '(', found " << firstToken.
info()
92 if (firstToken.
pToken() != token::BEGIN_LIST)
97 ) <<
"incorrect first token, '(', found " << firstToken.
info()
106 && lastToken.
pToken() == token::END_LIST
113 this->
insert(key, inewt(key, is).ptr());
117 "HashPtrTable<T, Key, Hash>::read(Istream&, const INew&) : "
129 ) <<
"incorrect first token, expected <int> or '(', found "
134 is.
fatalCheck(
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)");
138 template<
class T,
class Key,
class Hash>
151 inewt(
dict.subDict(iter().keyword())).ptr()
157 template<
class T,
class Key,
class Hash>
164 iter = this->begin();
169 const T* ptr = iter();
177 template<
class T,
class Key,
class Hash>
181 this->
read(is, inewt);
185 template<
class T,
class Key,
class Hash>
192 template<
class T,
class Key,
class Hash>
195 this->
read(dict, INew<T>());
201 template<
class T,
class Key,
class Hash>
205 L.
read(is, INew<T>());
211 template<
class T,
class Key,
class Hash>
215 const HashPtrTable<T, Key, Hash>& L
219 os <<
nl << L.size() <<
nl << token::BEGIN_LIST <<
nl;
224 typename HashPtrTable<T, Key, Hash>::const_iterator iter = L.begin();
229 os << iter.key() << token::SPACE << *iter() <<
nl;
233 os << token::END_LIST;
236 os.check(
"Ostream& operator<<(Ostream&, const HashPtrTable&)");
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
char readBeginList(const char *funcName)
bool read(const char *, int32_t &)
HashPtrTable(const label size=128)
Construct given initial table size.
triSurfaceToAgglom resize(surfacesMesh.size())
An STL-conforming const_iterator.
char readEndList(const char *funcName)
A token holds items read from Istream.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
A helper class when constructing from an Istream or dictionary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
InfoProxy< token > info() const
Return info proxy.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void read(Istream &, const INew &inewt)
Read from Istream using given Istream constructor class.
void write(Ostream &os) const
Write.
punctuationToken pToken() const
A list of keyword definitions, which are a keyword followed by any number of values (e....
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManipArg< error, int > exit(error &err, const int errNo=1)
void putBack(const token &)
Put back token.
Istream & operator>>(Istream &, edgeMesh &)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool isPunctuation() const
timeIndices insert(timeIndex, timeDirs[timeI].value())
virtual Istream & read(token &)=0
Return next token from stream.