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

Member Typedef Documentation

◆ stream_type

typedef std::ostream stream_type
protected

Definition at line 196 of file OCountStream.H.

Constructor & Destructor Documentation

◆ OCountStreamAllocator()

OCountStreamAllocator ( std::streamsize  precount = 0)
inlineprotected

Default construct, or with precount size.

Definition at line 208 of file OCountStream.H.

Member Function Documentation

◆ printBufInfo()

void printBufInfo ( Ostream os) const
inlineprotected

Definition at line 217 of file OCountStream.H.

References OCountStreamAllocator::buf_, os(), 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 227 of file OCountStream.H.

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

Here is the call graph for this function:

◆ rewind()

void rewind ( )
inline

Rewind the stream, reset the count.

Definition at line 233 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 202 of file OCountStream.H.

Referenced by OCountStreamAllocator::rewind().


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