100 scalar versionNumber_;
130 return int(10*num + SMALL);
136 return int(versionNumber_);
154 return index_ == vn.index_;
160 return index_ != vn.index_;
166 return index_ < vn.index_;
172 return index_ <= vn.index_;
178 return index_ > vn.index_;
184 return index_ >= vn.index_;
225 ios_base::iostate ioState_;
252 void setState(ios_base::iostate state)
260 ioState_ = ios_base::iostate(0);
280 ioState_(ios_base::iostate(0)),
315 virtual bool check(
const char* operation)
const;
324 return openClosed_ ==
OPENED;
330 return openClosed_ ==
CLOSED;
336 return ioState_ == 0;
342 return ioState_ & ios_base::eofbit;
348 return ioState_ & (ios_base::badbit | ios_base::failbit);
354 return ioState_ & ios_base::badbit;
358 operator void*()
const 361 ?
reinterpret_cast<void*
>(0)
362 : reinterpret_cast<void*>(-1);
459 virtual ios_base::fmtflags
flags()
const = 0;
478 ioState_ |= ios_base::eofbit;
484 ioState_ |= ios_base::failbit;
490 ioState_ |= ios_base::badbit;
494 virtual ios_base::fmtflags
flags(
const ios_base::fmtflags
f) = 0;
497 ios_base::fmtflags
setf(
const ios_base::fmtflags f)
505 const ios_base::fmtflags f,
506 const ios_base::fmtflags mask
513 void unsetf(
const ios_base::fmtflags uf)
543 Ostream& operator<<(Ostream& os, const InfoProxy<IOstream>& ip);
bool eof() const
Return true if end of input seen.
versionNumber(const scalar num)
Construct from number.
bool operator!() const
Return true if the stream has failed.
static streamFormat formatEnum(const word &)
Return stream format of given format name.
streamFormat format() const
Return current stream format.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static compressionType compressionEnum(const word &)
Return compression of given compression name.
A class for handling file names.
void unsetf(const ios_base::fmtflags uf)
Unset flags of stream.
void setClosed()
Set stream closed.
string str() const
Return the versionNumber as a character string.
static const versionNumber originalVersion
Original version number.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
IOstream & hex(IOstream &io)
InfoProxy< IOstream > info() const
Return info proxy.
virtual ios_base::fmtflags flags() const =0
Return flags of stream.
void setGood()
Set stream to be good.
static unsigned int defaultPrecision()
Return the default precision.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
streamAccess
Enumeration for whether the stream open or closed.
bool good() const
Return true if next operation might succeed.
int majorVersion() const
Return major version.
bool operator>(const versionNumber &vn)
Is this version newer than the one given.
IOstream & fixed(IOstream &io)
void setFail()
Set stream to have failed.
IOstream & oct(IOstream &io)
virtual ~IOstream()
Destructor.
A character and a pointer to a character string.
void setBad()
Set stream to be bad.
bool operator==(const versionNumber &vn)
Are these versionNumbers the same?
A class for handling words, derived from string.
bool operator>=(const versionNumber &vn)
This version the same as or newer than the one given.
streamFormat
Enumeration for the format of data in the stream.
int minorVersion() const
Return minor version.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
versionNumber version() const
Return the stream version.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
bool operator!=(const versionNumber &vn)
Are these versionNumbers different?
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual const fileName & name() const
Return the name of the stream.
bool fail() const
Return true if next operation will fail.
volScalarField sf(fieldObject, mesh)
bool closed() const
Return true if stream is closed.
bool bad() const
Return true if stream is corrupted.
bool operator<(const versionNumber &vn)
Is this version older than the one given.
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
static unsigned int precision_
Default precision.
void setEof()
Set stream to have reached eof.
friend Ostream & operator<<(Ostream &os, const versionNumber &vn)
Ostream operator.
A helper class for outputting values to Ostream.
void setOpened()
Set stream opened.
static const versionNumber currentVersion
Current version number.
label lineNumber() const
Return current stream line number.
friend Ostream & operator<<(Ostream &os, const streamFormat &sf)
Ostream operator.
IOstream & dec(IOstream &io)
int numberToIndex(const scalar num) const
Convert a version number into an index.
void setState(ios_base::iostate state)
Set stream state.
compressionType compression() const
Return the stream compression.
bool operator<=(const versionNumber &vn)
Is this version the same as or older than the one given.
IOstream &(* IOstreamManip)(IOstream &)
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
bool opened() const
Return true if stream has been opened.
IOstream & scientific(IOstream &io)
IOstream(streamFormat format, versionNumber version, compressionType compression=UNCOMPRESSED)
Construct setting format and version.