39#ifndef Foam_IFstream_H
40#define Foam_IFstream_H
120 virtual std::istream&
stdStream()
override;
123 virtual const std::istream&
stdStream()
const override;
127 virtual void rewind()
override;
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
IFstream(const fileName &pathname, IOstreamOption::streamFormat fmt)
Construct from pathname and format.
IFstream & operator()() const
Return a non-const reference to const IFstream.
virtual void rewind() override
Rewind the stream so that it may be read again.
~IFstream()=default
Destructor.
IFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption())
Construct from pathname, default or specified stream options.
virtual void print(Ostream &os) const override
Print stream description.
std::streamsize fileSize() const
Return the size of the underlying file (-1 on error). This corresponds to Foam::fileSize() but with e...
ClassName("IFstream")
Declare type-name (with debug switch).
static DynamicList< char > readContents(const fileName &pathname)
Get file contents from specified file (compressed/uncompressed). Returns an empty list if the file ca...
virtual std::istream & stdStream() override
Access to underlying std::istream.
A simple container for options an IOstream can normally have.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression.
streamFormat
Data format (ascii | binary | coherent).
Generic input stream using a standard (STL) stream.
virtual const fileName & name() const override
The name of the input serial stream. (eg, the name of the Fstream file name).
ISstream & get(char &c)
Raw, low-level get character function.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A class for handling file names.
A wrapped std::ifstream with possible compression handling (igzstream) that behaves much like a std::...
Macro definitions for declaring ClassName(), NamespaceName(), etc.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
OBJstream os(runTime.globalPath()/outputName)