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)
63 this->append(iNew(is).ptr());
67 "LPtrList<LListBase, T>::read(Istream&, const INew&) : " 74 T* tPtr = iNew(is).ptr();
79 "LPtrList<LListBase, T>::read(Istream&, const INew&) : " 85 this->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);
117 this->append(iNew(is).ptr());
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>
147 this->
read(is, iNew);
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>&)");
Template class for non-intrusive linked PtrLists.
An STL-conforming const_iterator.
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 ))
void clear()
Clear the contents of the list.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A helper class when constructing from an Istream or dictionary.
LPtrList()
Null construct.
Istream & operator>>(Istream &, edgeMesh &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool read(const char *, int32_t &)
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.