Go to the documentation of this file.
34 #ifndef OScountStream_H
35 #define OScountStream_H
55 std::streamsize size_;
75 std::ios_base::openmode which = std::ios_base::in|std::ios_base::out
91 std::streamsize
size()
const
99 os <<
"count=" << size_;
113 virtual public std::ios,
133 this->pubseekpos(0, std::ios_base::out);
184 std::streamsize
size()
const
OCountStreamAllocator(std::streamsize precount=0)
Default construct, or with precount size.
streamFormat format() const noexcept
Get the current stream format.
static const versionNumber currentVersion
The current version number (2.0)
virtual void print(Ostream &os) const
Print stream description to Ostream.
A streambuf class for determining byte counts.
stream_type stream_
The output stream.
void printBufInfo(Ostream &os) const
Some information about the number of bytes counted.
Representation of a major/minor version number.
ocountstream()
Default construct.
virtual const fileName & name() const
Return the name of the stream.
OSstream(const OSstream &)=default
Copy construct.
Generic output stream using a standard (STL) stream.
versionNumber version() const noexcept
Get the stream version.
streamFormat
Data format (ascii | binary)
virtual int overflow(int c=EOF)
Handle output counting via overflow.
An output stream for calculating byte counts.
OCountStream(streamFormat format=ASCII, versionNumber version=currentVersion)
Default construct.
virtual std::streampos seekpos(std::streampos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out)
Set position pointer to absolute position.
countstreambuf(std::streamsize precount=0)
Default construct, or with precount size.
void printBufInfo(Ostream &os) const
Trivial output stream for calculating byte counts.
virtual void rewind()
Rewind the stream, reset the count, clearing any old errors.
void setGood()
Set stream to be good.
OCountStream(const OCountStream &str)
Copy construct.
std::streamsize size() const
The number of bytes counted.
void rewind()
Rewind the stream, reset the count.
std::streamsize size() const
const dimensionedScalar c
Speed of light in a vacuum.
void rewind()
Rewind the stream, reset the count.
An stream/stream-buffer allocator for counting.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
countstreambuf buf_
The stream buffer.