reSIProcate/rutil  9694
Public Member Functions
resip::CountStream Class Reference

Used to count the amount of data written to a stream. More...

#include <CountStream.hxx>

Inheritance diagram for resip::CountStream:
Inheritance graph
[legend]
Collaboration diagram for resip::CountStream:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CountStream (size_t &count)
 Constructs a CountStream with a reference to where the count of bytes written to the stream should be stored.
 ~CountStream ()
 Calls flush on itself to force the update to the count reference passed into the constructor.

Detailed Description

Used to count the amount of data written to a stream.

The actual data written to the stream is not accumulated anywhere. It follows the general pattern of DataStream where the data is accumulated into the reference passed to the constructor. The data is valid after CountStream's destructor is called (ie, flush occurs on destruction).

Definition at line 61 of file CountStream.hxx.


Constructor & Destructor Documentation

CountStream::CountStream ( size_t &  count)

Constructs a CountStream with a reference to where the count of bytes written to the stream should be stored.

Parameters:
countA reference to the size_t where the number of bytes written to the stream after the stream goes out of scope.

Definition at line 77 of file CountStream.cxx.

   : CountBuffer(count), EncodeStream(this)
{
}
CountStream::~CountStream ( )

Calls flush on itself to force the update to the count reference passed into the constructor.

Definition at line 82 of file CountStream.cxx.

{
#ifdef RESIP_USE_STL_STREAMS
   flush();
#endif
}

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