Go to the documentation of this file.
51 IOstreamOption::compression(ifstreamPointer::whichCompression());
73 <<
"Cannot open empty file name"
76 else if (IOstreamOption::COMPRESSED == IOstreamOption::compression())
85 <<
"Could not open file " << pathname
101 <<
"No stream allocated\n"
116 <<
"No stream allocated\n"
161 <<
"file " << this->
name() <<
" does not exist"
166 return const_cast<IFstream&
>(*this);
int debug
Static debugging option.
virtual void print(Ostream &os) const
Print stream description to Ostream.
#define InfoInFunction
Report an information message using Foam::Info.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling file names.
Input from file stream, using an ISstream.
virtual void print(Ostream &os) const
Print stream description.
Generic input stream using a standard (STL) stream.
IFstream & operator()() const
Return a non-const reference to const IFstream.
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void rewind()
Rewind the stream so that it may be read again.
IOstreamOption::compressionType whichCompression() const
Which compression type?
static void check(const int retVal, const char *what)
void reopen_gz(const std::string &pathname_gz)
Special 'rewind' method for compressed stream.
The IOstreamOption is a simple container for options an IOstream can normally have.
OBJstream os(runTime.globalPath()/outputName)
std::istream * get() noexcept
The stream pointer (ifstream or igzstream)
errorManip< error > abort(error &err)
IFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption())
Construct from pathname.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual std::istream & stdStream()
Access to underlying std::istream.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A wrapped std::ifstream with possible compression handling (igzstream) that behaves much like a std::...
virtual void rewind()
Rewind the stream so that it may be read again.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
defineTypeNameAndDebug(combustionModel, 0)