ocountstream Class Reference

Trivial output stream for calculating byte counts. More...

Inheritance diagram for ocountstream:
Collaboration diagram for ocountstream:

Public Member Functions

 ocountstream ()
 Default construct. More...
 
countbuf * rdbuf ()
 This hides both signatures of std::basic_ios::rdbuf() More...
 
std::streamsize count () const noexcept
 
void reset (std::streamsize n=0) noexcept
 Reset the count. More...
 
void debug_info (Ostream &os) const
 Some information about the output buffer position/capacity. More...
 

Detailed Description

Trivial output stream for calculating byte counts.

Since all output values are discarded, it can be used as a /dev/null output buffer as well.

Definition at line 48 of file OCountStream.H.

Constructor & Destructor Documentation

◆ ocountstream()

ocountstream ( )
inline

Default construct.

Definition at line 169 of file OCountStream.H.

Member Function Documentation

◆ rdbuf()

countbuf* rdbuf ( )
inline

This hides both signatures of std::basic_ios::rdbuf()

Definition at line 177 of file OCountStream.H.

◆ count()

std::streamsize count ( ) const
inlinenoexcept
Returns
The number of bytes counted

Definition at line 182 of file OCountStream.H.

Referenced by OCountStream::count(), and OCountStream::size().

Here is the caller graph for this function:

◆ reset()

void reset ( std::streamsize  n = 0)
inlinenoexcept

Reset the count.

Definition at line 187 of file OCountStream.H.

References clear(), and n.

Referenced by OCountStream::OCountStream(), OCountStream::reset(), and OCountStream::rewind().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug_info()

void debug_info ( Ostream os) const
inline

Some information about the output buffer position/capacity.

Definition at line 196 of file OCountStream.H.

References os().

Here is the call graph for this function:

The documentation for this class was generated from the following file: