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_;
222 ios_base::iostate ioState_;
249 void setState(ios_base::iostate state)
257 ioState_ = ios_base::iostate(0);
277 ioState_(ios_base::iostate(0)),
312 virtual bool check(
const char* operation)
const;
321 return openClosed_ ==
OPENED;
327 return openClosed_ ==
CLOSED;
333 return ioState_ == 0;
339 return ioState_ & ios_base::eofbit;
345 return ioState_ & (ios_base::badbit | ios_base::failbit);
351 return ioState_ & ios_base::badbit;
355 operator void*()
const
358 ?
reinterpret_cast<void*
>(0)
359 :
reinterpret_cast<void*
>(-1);
456 virtual ios_base::fmtflags
flags()
const = 0;
475 ioState_ |= ios_base::eofbit;
481 ioState_ |= ios_base::failbit;
487 ioState_ |= ios_base::badbit;
491 virtual ios_base::fmtflags
flags(
const ios_base::fmtflags
f) = 0;
494 ios_base::fmtflags
setf(
const ios_base::fmtflags
f)
500 ios_base::fmtflags
setf
502 const ios_base::fmtflags
f,
503 const ios_base::fmtflags mask
510 void unsetf(
const ios_base::fmtflags uf)
537 Ostream&
operator<<(Ostream& os,
const IOstream::versionNumber& vn);
540 Ostream&
operator<<(Ostream& os,
const InfoProxy<IOstream>& ip);
A character and a pointer to a character string.
friend Ostream & operator<<(Ostream &os, const versionNumber &vn)
Ostream operator.
bool operator<=(const versionNumber &vn) const
Is this version the same as or older than the one given.
bool operator>(const versionNumber &vn) const
Is this version newer than the one given.
string str() const
Return the versionNumber as a character string.
int minorVersion() const
Return minor version.
bool operator!=(const versionNumber &vn) const
Are these versionNumbers different?
bool operator>=(const versionNumber &vn) const
This version the same as or newer than the one given.
int majorVersion() const
Return major version.
bool operator==(const versionNumber &vn) const
Are these versionNumbers the same?
int numberToIndex(const scalar num) const
Convert a version number into an index.
bool operator<(const versionNumber &vn) const
Is this version older than the one given.
versionNumber(const scalar num)
Construct from number.
An IOstream is an abstract base class for all input/output systems; be they streams,...
friend Ostream & operator<<(Ostream &os, const streamFormat &sf)
Ostream operator.
bool opened() const
Return true if stream has been opened.
void setEof()
Set stream to have reached eof.
label lineNumber() const
Return current stream line number.
static const versionNumber currentVersion
Current version number.
streamFormat format() const
Return current stream format.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
virtual const fileName & name() const
Return the name of the stream.
static unsigned int precision_
Default precision.
void setGood()
Set stream to be good.
bool fail() const
Return true if next operation will fail.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
streamFormat
Enumeration for the format of data in the stream.
bool operator!() const
Return true if the stream has failed.
void setBad()
Set stream to be bad.
void setState(ios_base::iostate state)
Set stream state.
void setClosed()
Set stream closed.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
versionNumber version() const
Return the stream version.
static unsigned int defaultPrecision()
Return the default precision.
static streamFormat formatEnum(const word &)
Return stream format of given format name.
void unsetf(const ios_base::fmtflags uf)
Unset flags of stream.
bool bad() const
Return true if stream is corrupted.
compressionType compression() const
Return the stream compression.
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
virtual ~IOstream()
Destructor.
compressionType
Enumeration for the format of data in the stream.
virtual ios_base::fmtflags flags() const =0
Return flags of stream.
void setOpened()
Set stream opened.
bool good() const
Return true if next operation might succeed.
streamAccess
Enumeration for whether the stream open or closed.
InfoProxy< IOstream > info() const
Return info proxy.
void setFail()
Set stream to have failed.
bool closed() const
Return true if stream is closed.
static compressionType compressionEnum(const word &)
Return compression of given compression name.
bool eof() const
Return true if end of input seen.
IOstream(streamFormat format, versionNumber version, compressionType compression=UNCOMPRESSED)
Construct setting format and version.
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A class for handling file names.
A class for handling words, derived from string.
volScalarField sf(fieldObject, mesh)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
IOstream & fixed(IOstream &io)
IOstream & dec(IOstream &io)
IOstream & hex(IOstream &io)
IOstream &(* IOstreamManip)(IOstream &)
IOstream & scientific(IOstream &io)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
IOstream & oct(IOstream &io)