46 is.
fatalCheck(
"PtrList::readIstream : reading first token");
63 if (delimiter == token::BEGIN_LIST)
65 for (label i=0; i<len; ++i)
67 T*
p = inew(is).ptr();
72 "PtrList::readIstream : "
79 T*
p = inew(is).ptr();
84 "PtrList::readIstream : "
85 "reading the single entry"
88 for (label i=1; i<len; ++i)
107 while (!tok.isPunctuation(token::END_LIST))
114 <<
"Premature EOF after reading " << tok.info() <<
nl
115 <<
exit(FatalIOError);
118 slList.append(inew(is).ptr());
126 for (
T* ptr : slList)
134 <<
"incorrect first token, expected <int> or '(', found "
136 <<
exit(FatalIOError);
147 this->readIstream(is, inew);
154 this->readIstream(is,
INew<T>());
Non-intrusive singly-linked list.
A helper class when constructing from an Istream or dictionary.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
bool eof() const noexcept
True if end of input seen.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
void putBack(const token &tok)
Put back a token. Only a single put back is permitted.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void readIstream(Istream &is, const INew &inew)
Read from Istream using Istream constructor class.
constexpr PtrList() noexcept
Default construct.
A token holds an item read from Istream.
bool isPunctuation() const noexcept
Token is PUNCTUATION.
bool isLabel() const noexcept
Token is LABEL.
label labelToken() const
Return label value.
patchWriters resize(patchIds.size())
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Istream & operator>>(Istream &, directionInfo &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)