Go to the documentation of this file.
136 void setState(ios_base::iostate state)
206 virtual bool check(
const char* operation)
const;
239 return ioState_ & (ios_base::badbit | ios_base::failbit);
249 explicit operator bool()
const
290 template<
class T = label>
291 typename std::enable_if<std::is_integral<T>::value,
bool>
::type
299 template<
class T = scalar>
300 typename std::enable_if<std::is_floating_point<T>::value,
bool>
::type
331 virtual ios_base::fmtflags
flags()
const = 0;
367 virtual ios_base::fmtflags
flags(
const ios_base::fmtflags
f) = 0;
370 ios_base::fmtflags
setf(
const ios_base::fmtflags
f)
378 const ios_base::fmtflags
f,
379 const ios_base::fmtflags mask
386 void unsetf(
const ios_base::fmtflags
f)
415 Ostream&
operator<<(Ostream& os,
const InfoProxy<IOstream>& ip);
unsigned labelByteSize() const
The label byte-size associated with the stream.
IOstream(const IOstream &)=default
Copy construct.
bool opened() const
Return true if stream has been opened.
A helper class for outputting values to Ostream.
A class for handling file names.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
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 stream description to Ostream.
void setEof()
Set stream to have reached eof.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
An IOstream is an abstract base class for all input/output systems; be they streams,...
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)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
void setState(ios_base::iostate state)
Set stream state.
IOstream(IOstreamOption streamOpt=IOstreamOption())
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
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.
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.
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.
A character and a pointer to a character string.
unsigned scalarByteSize() const
The scalar byte-size associated with the stream.