Go to the documentation of this file.
50 is.
fatalCheck(
"operator>>(Istream&, List<T>&)");
54 is.
fatalCheck(
"operator>>(Istream&, List<T>&) : reading first token");
56 if (firstToken.isCompound())
62 firstToken.transferCompoundToken(is)
66 else if (firstToken.isLabel())
68 label s = firstToken.labelToken();
75 if (is.
format() == IOstream::ASCII || !contiguous<T>())
82 if (delimiter == token::BEGIN_LIST)
90 "operator>>(Istream&, List<T>&) : reading entry"
101 "operator>>(Istream&, List<T>&) : "
102 "reading the single entry"
119 is.
read(
reinterpret_cast<char*
>(L.data()),
s*
sizeof(
T));
123 "operator>>(Istream&, List<T>&) : reading the binary block"
128 else if (firstToken.isPunctuation())
130 if (firstToken.pToken() != token::BEGIN_LIST)
133 <<
"incorrect first token, expected '(', found "
150 <<
"incorrect first token, expected <int> or '(', found "
163 token firstToken(is);
164 is.putBack(firstToken);
166 if (firstToken.isPunctuation())
168 if (firstToken.pToken() != token::BEGIN_LIST)
171 <<
"incorrect first token, expected '(', found "
streamFormat format() const
Return current stream format.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
A templated class for holding compound tokens.
char readBeginList(const char *funcName)
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
char readEndList(const char *funcName)
A token holds items read from Istream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
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 setSize(const label)
Reset size of List.
List< T > readList(Istream &)
Read a bracket-delimited list, or handle a single value as list of size 1.
Template function to specify if the data of a type are contiguous.
To & dynamicCast(From &r)
Reference type cast template function,.
void putBack(const token &)
Put back token.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Istream & operator>>(Istream &, edgeMesh &)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
virtual Istream & read(token &)=0
Return next token from stream.