73 <<
"Cannot open empty file name" 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);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
label lineNumber_
The file line.
A wrapped std::ifstream with possible compression handling (igzstream) that behaves much like a std::...
bool opened() const noexcept
True if stream has been opened.
IFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption())
Construct from pathname, default or specified stream options.
A class for handling file names.
void setClosed() noexcept
Set stream closed.
virtual const fileName & name() const
The name of the input serial stream. (eg, the name of the Fstream file name)
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void setState(std::ios_base::iostate state) noexcept
Set stream state.
IOstreamOption::compressionType whichCompression() const
Which compression type?
virtual std::istream & stdStream()
Access to underlying std::istream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
InfoProxy< IOstream > info() const noexcept
Return info proxy, used to print IOstream information to a stream.
void reopen_gz(const std::string &pathname)
Special 'rewind' method for compressed stream.
A simple container for options an IOstream can normally have.
virtual void rewind()
Rewind the stream so that it may be read again.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void setBad()
Set stream state to be 'bad'.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
std::istream * get() noexcept
The stream pointer (ifstream or igzstream)
virtual void print(Ostream &os) const
Print stream description to Ostream.
errorManip< error > abort(error &err)
virtual void print(Ostream &os) const
Print stream description.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
compressionType compression() const noexcept
Get the stream compression.
Input from file stream, using an ISstream.
static void check(const int retVal, const char *what)
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
Generic input stream using a standard (STL) stream.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool good() const noexcept
True if next operation might succeed.
IFstream & operator()() const
Return a non-const reference to const IFstream.
virtual void rewind()
Rewind the stream so that it may be read again.
void setOpened() noexcept
Set stream opened.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
#define InfoInFunction
Report an information message using Foam::Info.