Go to the documentation of this file.
136 void setState(ios_base::iostate state)
198 virtual bool check(
const char* operation)
const;
231 return ioState_ & (ios_base::badbit | ios_base::failbit);
241 explicit operator bool()
const
282 template<
class T = label>
283 typename std::enable_if<std::is_integral<T>::value,
bool>
::type
291 template<
class T = scalar>
292 typename std::enable_if<std::is_floating_point<T>::value,
bool>
::type
323 virtual ios_base::fmtflags
flags()
const = 0;
359 virtual ios_base::fmtflags
flags(
const ios_base::fmtflags
f) = 0;
362 ios_base::fmtflags
setf(
const ios_base::fmtflags
f)
370 const ios_base::fmtflags
f,
371 const ios_base::fmtflags mask
378 void unsetf(
const ios_base::fmtflags
f)
407 Ostream&
operator<<(Ostream& os,
const InfoProxy<IOstream>& ip);
unsigned labelByteSize() const
The label byte-size associated with the stream.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
bool opened() const
Return true if stream has been opened.
A helper class for outputting values to Ostream.
A class for handling file names.
bool fail() const
Return true if next operation will fail.
bool eof() const
Return true if end of input seen.
IOstream &(* IOstreamManip)(IOstream &)
An IOstream manipulator.
virtual void print(Ostream &os) const
Print description of IOstream to Ostream.
void setEof()
Set stream to have reached eof.
An IOstream is an abstract base class for all input/output systems; be they streams,...
streamFormat format() const noexcept
Get the current stream format.
IOstream & oct(IOstream &io)
virtual ~IOstream()=default
Destructor.
static unsigned int precision_
Default precision.
unsigned short labelByteSize_
The label byte-size (could also be stored as byte)
void setOpened()
Set stream opened.
ios_base::iostate ioState_
unsigned short scalarByteSize_
The scalar byte-size (could also be stored as byte)
void setState(ios_base::iostate state)
Set stream state.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Representation of a major/minor version number.
label lineNumber_
The file line.
IOstream & dec(IOstream &io)
bool operator!() const
Return true if the stream has failed.
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const
IOstream(const IOstreamOption option)
Construct with specified stream option.
void setLabelByteSize(unsigned nbytes)
Set the label byte-size associated with the stream.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
The IOstreamOption is a simple container for options an IOstream can normally have....
InfoProxy< IOstream > info() const
Return info proxy.
label & lineNumber()
Non-const access to the current stream line number.
virtual const fileName & name() const
Return the name of the stream.
bool closed() const
Return true if stream is closed.
versionNumber version() const noexcept
Get the stream version.
void setClosed()
Set stream closed.
IOstream & fixed(IOstream &io)
streamFormat
Data format (ascii | binary)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void setScalarByteSize(unsigned nbytes)
Set the scalar byte-size associated with the stream.
bool bad() const
Return true if stream is corrupted.
IOstream & scientific(IOstream &io)
static fileName staticName_
Name for any generic stream - normally treat as readonly.
IOstream & hex(IOstream &io)
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
virtual ios_base::fmtflags flags() const =0
Return flags of stream.
void unsetf(const ios_base::fmtflags f)
Unset flags of stream.
IOstreamOption() noexcept
Construct null. (default: ASCII, uncompressed, currentVersion)
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const
static unsigned int defaultPrecision()
Return the default precision.
void setGood()
Set stream to be good.
streamAccess
Enumeration for stream open/closed state.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
label lineNumber() const
Const access to the current stream line number.
void setBad()
Set stream to be bad.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
void setFail()
Set stream to have failed.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool good() const
Return true if next operation might succeed.
compressionType compression() const noexcept
Get the stream compression.
A character and a pointer to a character string.
Ostream & operator<<(Ostream &, const boundaryPatch &)
unsigned scalarByteSize() const
The scalar byte-size associated with the stream.