|
reSIProcate/rutil
9694
|
Used to count the amount of data written to a stream. More...
#include <CountStream.hxx>


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. | |
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.
| CountStream::CountStream | ( | size_t & | count | ) |
Constructs a CountStream with a reference to where the count of bytes written to the stream should be stored.
| count | A 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
}
1.7.5.1