Loading...
Searching...
No Matches
ocountstream Class Reference

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

#include <OCountStream.H>

Inheritance diagram for ocountstream:
Collaboration diagram for ocountstream:

Public Member Functions

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

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 47 of file OCountStream.H.

Constructor & Destructor Documentation

◆ ocountstream()

ocountstream ( )
inline

Default construct.

Definition at line 168 of file OCountStream.H.

Member Function Documentation

◆ rdbuf()

countbuf * rdbuf ( )
inline

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

Definition at line 176 of file OCountStream.H.

◆ count()

std::streamsize count ( ) const
inlinenoexcept

The number of bytes counted.

Definition at line 181 of file OCountStream.H.

References Foam::noexcept.

◆ reset()

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

Reset the count.

Definition at line 186 of file OCountStream.H.

References n, and Foam::noexcept.

◆ debug_info()

void debug_info ( Ostream & os) const
inline

Some information about the output buffer position/capacity.

Definition at line 195 of file OCountStream.H.

References os().

Referenced by print().

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

◆ print()

void print ( Ostream & os) const
inline

Information about stream.

Definition at line 203 of file OCountStream.H.

References debug_info(), and os().

Here is the call graph for this function:

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