178 virtual
void rewind() = 0;
189 bool readEnd(const
char* funcName);
244 reinterpret_cast<label*
>(
data),
245 byteCount/
sizeof(label)
253 reinterpret_cast<scalar*
>(
data),
254 byteCount/
sizeof(scalar)
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)
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
@ UNCOMPRESSED
compression = false
static const versionNumber currentVersion
The current version number (2.0)
An IOstream is an abstract base class for all input/output systems; be they streams,...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Istream(IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED)
Construct with format, version (compression)
bool getBack(token &tok)
Get the put-back token if there is one.
virtual bool endRawRead()=0
End of low-level raw binary read.
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
virtual Istream & readRaw(char *, std::streamsize)=0
Low-level raw binary read.
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
Istream(IOstreamOption streamOpt=IOstreamOption())
virtual ~Istream()=default
Destructor.
const token & peekBack() const noexcept
Examine putback token without removing it.
bool hasPutback() const noexcept
True if putback token is in use.
virtual void rewind()=0
Rewind the stream so that it may be read again.
Istream(const Istream &)=default
Copy construct.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
void putBack(const token &tok)
Put back a token. Only a single put back is permitted.
virtual Istream & read(token &)=0
Return next token from stream.
Database for solution data, solver performance and other reduced data.
A token holds an item read from Istream.
A class for handling words, derived from Foam::string.
void readContiguous(Istream &is, char *data, std::streamsize byteCount)
Read binary block of contiguous data, possibly with conversion.
double doubleScalar
A typedef for double.
Istream & operator>>(Istream &, directionInfo &)
float floatScalar
A typedef for float.
label readRawLabel(Istream &is)
Read raw label from binary stream.
IOstream &(* IOstreamManip)(IOstream &)
An IOstream manipulator.
Istream &(* IstreamManip)(Istream &)
An Istream manipulator.
A template class to specify if a data type is composed solely of Foam::label elements.
A template class to specify if a data type is composed solely of Foam::scalar elements.