Go to the documentation of this file.
49 Info<<
"IFstreamAllocator::IFstreamAllocator(const fileName&) : "
50 "cannot open null file " <<
endl;
56 ifPtr_ =
new ifstream(pathname.c_str(),
57 ios_base::in|ios_base::binary);
64 Info<<
"IFstreamAllocator::IFstreamAllocator(const fileName&) : "
65 "decompressing " << pathname +
".gz" <<
endl;
70 ifPtr_ =
new igzstream((pathname +
".gz").c_str());
99 "IFstream.sourceFile_",
108 setState(ifPtr_->rdstate());
114 Info<<
"IFstream::IFstream(const fileName&,"
115 "streamFormat=ASCII,"
116 "versionNumber=currentVersion) : "
117 "could not open file for input"
177 if (
isFile(pathname_,
true))
179 check(
"IFstream::operator()");
185 <<
"file " << pathname_ <<
" does not exist"
190 return const_cast<IFstream&
>(*this);
IOstream::compressionType compression_
word format(conversionProperties.lookup("format"))
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
virtual istream & stdStream()
Access to underlying std::istream.
A class for handling file names.
An IOstream is an abstract base class for all input/output systems; be they streams,...
IFstream & operator()() const
Return a non-const reference to const IFstream.
IFstreamAllocator(const fileName &pathname)
Construct from pathname.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
errorManip< error > abort(error &err)
bool isFile(const fileName &, const bool checkGzip=true)
Does the name exist as a FILE in the file system?
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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 std::istream with ability to handle compressed files.
#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)
~IFstreamAllocator()
Destructor.
streamFormat
Enumeration for the format of data in the stream.