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)
100 ) <<
"incorrect first token, '(', found " << firstToken.info()
105 is.fatalCheck(
"LPtrList<LListBase, T>::read(Istream&, const INew&)");
110 lastToken.isPunctuation()
111 && lastToken.pToken() == token::END_LIST
115 is.putBack(lastToken);
116 this->append(iNew(is).ptr());
121 "LPtrList<LListBase, T>::read(Istream&, const INew&)" 130 ) <<
"incorrect first token, expected <int> or '(', found " 135 is.fatalCheck(
"LPtrList<LListBase, T>::read(Istream&, const INew&)");
141 template<
class LListBase,
class T>
145 this->
read(is, iNew);
149 template<
class LListBase,
class T>
158 template<
class LListBase,
class T>
170 template<
class LListBase,
class T>
171 Foam::Ostream& Foam::operator<<(Ostream& os, const LPtrList<LListBase, T>& lst)
174 os <<
nl << lst.size();
177 os <<
nl << token::BEGIN_LIST <<
nl;
191 os << token::END_LIST;
194 os.check(
"Ostream& operator<<(Ostream&, const LPtrList<LListBase, T>&)");
FvWallInfoData< WallInfo, label > 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)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
An STL-conforming const_iterator.
Template class for non-intrusive linked PtrLists.
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))
Istream & operator>>(Istream &, directionInfo &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void clear()
Clear the contents of the list.
LPtrList()
Null construct.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A helper class when constructing from an Istream or dictionary.