OCountStreamAllocator Class Reference

An stream/stream-buffer allocator for counting. More...

Inheritance diagram for OCountStreamAllocator:
[legend]
Collaboration diagram for OCountStreamAllocator:
[legend]

Public Member Functions

std::streamsize size () const
 The number of bytes counted. More...
 
void rewind ()
 Rewind the stream, reset the count. More...
 

Protected Types

typedef std::ostream stream_type
 

Protected Member Functions

 OCountStreamAllocator (std::streamsize precount=0)
 Default construct, or with precount size. More...
 
void printBufInfo (Ostream &os) const
 

Protected Attributes

countstreambuf buf_
 The stream buffer. More...
 
stream_type stream_
 The output stream. More...
 

Detailed Description

An stream/stream-buffer allocator for counting.

Definition at line 146 of file OCountStream.H.

Member Typedef Documentation

◆ stream_type

typedef std::ostream stream_type
protected

Definition at line 152 of file OCountStream.H.

Constructor & Destructor Documentation

◆ OCountStreamAllocator()

OCountStreamAllocator ( std::streamsize  precount = 0)
inlineprotected

Default construct, or with precount size.

Definition at line 164 of file OCountStream.H.

Member Function Documentation

◆ printBufInfo()

void printBufInfo ( Ostream os) const
inlineprotected

Definition at line 173 of file OCountStream.H.

References OCountStreamAllocator::buf_, and countstreambuf::printBufInfo().

Here is the call graph for this function:

◆ size()

std::streamsize size ( ) const
inline

The number of bytes counted.

Definition at line 183 of file OCountStream.H.

References OCountStreamAllocator::buf_, and countstreambuf::size().

Here is the call graph for this function:

◆ rewind()

void rewind ( )
inline

Rewind the stream, reset the count.

Definition at line 189 of file OCountStream.H.

References OCountStreamAllocator::buf_, and OCountStreamAllocator::stream_.

Referenced by OCountStream::rewind().

Here is the caller graph for this function:

Member Data Documentation

◆ buf_

countstreambuf buf_
protected

◆ stream_

stream_type stream_
protected

The output stream.

Definition at line 158 of file OCountStream.H.

Referenced by OCountStreamAllocator::rewind().


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