38#ifndef Foam_ITstream_H
39#define Foam_ITstream_H
76 void reserveCapacity(
const label nElem,
const bool lazy);
93 const string&
name =
"input"
100 const string&
name =
"input",
126 const string&
name =
"input"
133 const std::string&
input,
135 const string&
name =
"input"
144 const string&
name =
"input"
166 const std::string&
input,
217 return size() - tokenIndex_;
230 void skip(label
n = 1);
278 virtual ios_base::fmtflags
flags()
const
280 return ios_base::fmtflags(0);
284 ios_base::fmtflags
flags(
const ios_base::fmtflags)
286 return ios_base::fmtflags(0);
363 #ifdef Foam_IOstream_extras
381 List<token>&& tokens,
386 ITstream(
name, std::move(tokens), IOstreamOption(fmt, ver))
Representation of a major/minor version number.
The IOstreamOption is a simple container for options an IOstream can normally have.
streamFormat
Data format (ascii | binary)
static const versionNumber currentVersion
The current version number (2.0)
An input stream of tokens.
void append(const token &t, const bool lazy)
virtual fileName & name()
Return stream name for modification.
const token & peek() const
Failsafe peek at what the next read would return,.
std::string toString() const
virtual Istream & read(token &tok)
Return next token from stream.
const token & peekFirst() const
Failsafe peek at the first token in the list.
virtual const fileName & name() const
Get the name of the stream.
virtual bool beginRawRead()
Start of low-level raw binary read.
label tokenIndex() const noexcept
The current token index when reading, or the insertion point.
const token & peekLast() const
Failsafe peek at the last token in the list.
label nRemainingTokens() const noexcept
Number of tokens remaining.
void print(Ostream &os) const
Print stream description to Ostream.
void seek(label pos)
Move tokenIndex to the specified position.
void skip(label n=1)
Move tokenIndex relative to the current position.
ios_base::fmtflags flags(const ios_base::fmtflags)
Set flags of stream - ignored.
label & tokenIndex() noexcept
Non-const access to the current token index.
virtual void rewind()
Rewind the stream so that it may be read again.
static tokenList parse(const UList< char > &input, IOstreamOption streamOpt=IOstreamOption())
virtual ~ITstream()=default
Destructor.
bool hasPutback() const noexcept
True if putback token is in use.
virtual Istream & readRaw(char *data, std::streamsize count)
Low-level raw binary read.
virtual ios_base::fmtflags flags() const
Get stream flags - always 0.
virtual bool endRawRead()
End of low-level raw binary read.
void operator=(const ITstream &is)
Copy assignment, with rewind()
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool hasPutback() const noexcept
True if putback token is in use.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const noexcept
The number of elements in the UList.
Database for solution data, solver performance and other reduced data.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A class for handling file names.
A token holds an item read from Istream.
A class for handling words, derived from Foam::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
OBJstream os(runTime.globalPath()/outputName)
dimensionedScalar pos(const dimensionedScalar &ds)
static Istream & input(Istream &is, IntRange< T > &range)
double doubleScalar
A typedef for double.
float floatScalar
A typedef for float.