Go to the documentation of this file.
20 #ifndef __IOstream_hpp__
21 #define __IOstream_hpp__
161 virtual bool check(
const char* operation)
const;
200 return ioState_ & (ios_base::badbit | ios_base::failbit);
210 explicit operator bool()
const
244 virtual ios_base::fmtflags
flags()
const = 0;
280 virtual ios_base::fmtflags
flags(
const ios_base::fmtflags f) = 0;
283 ios_base::fmtflags
setf(
const ios_base::fmtflags f)
289 ios_base::fmtflags
setf
291 const ios_base::fmtflags f,
292 const ios_base::fmtflags mask
344 #endif // __IOstream__hpp__
bool eof() const
Return true if end of input seen.
void setGood()
Set stream to be good.
void setWriteFormat(writeFormat wF)
static unsigned int defaultPrecision()
Return the default precision.
IOstream & fixed(IOstream &io)
IOstream & dec(IOstream &io)
writeFormat writeFormat_
write format
IOstream & scientific(IOstream &io)
IOstream(writeFormat wF)
Construct and set write format.
int32 lineNumber_
The file line.
bool operator!() const
Return true if the stream has failed.
IOstream & hex(IOstream &io)
bool closed() const
Return true if stream is closed.
static word staticName_
Name for any generic stream - normally treat as readonly.
static unsigned int precision_
Default precision, only works for ASCII.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
static unsigned int defaultPrecision(unsigned int prec)
Reset the default precision return the previous value.
virtual ios_base::fmtflags flags() const =0
Return flags of stream.
bool bad() const
Return true if stream is corrupted.
streamAccess openClosed_
Is stream open or closed.
void setBad()
Set stream to be bad.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
bool fail() const
Return true if next operation will fail.
void setClosed()
Set stream closed.
virtual const word & name() const
Return the name of the stream.
bool good() const
Return true if next operation might succeed.
int32 & lineNumber()
Non-const access to the current stream line number.
virtual ~IOstream()=default
Destructor.
bool isBinary() const
Return true if stream format is binray.
bool opened() const
Return true if stream has been opened.
void setState(ios_base::iostate state)
Set stream state.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
void setOpened()
Set stream opened.
void setFail()
Set stream to have failed.
IOstream & oct(IOstream &io)
int32 lineNumber() const
Const access to the current stream line number.
void setEof()
Set stream to have reached eof.
void unsetf(const ios_base::fmtflags f)
Unset flags of stream.
ios_base::iostate ioState_
state
A base calss for input/output streams.
int32 lineNumber(const int32 num)
Set the stream line number return the previous value.
@ OPENED
stream is not open