#include <Stream.h>

Inheritance diagram for SBufStreamBuf:
Collaboration diagram for SBufStreamBuf:

Public Member Functions

 SBufStreamBuf (SBuf aBuf)
 initialize streambuf; use supplied SBuf as backing store More...
 
SBuf getBuf ()
 get a copy of the stream's contents More...
 
void clearBuf ()
 clear the stream's store More...
 

Protected Member Functions

virtual int_type overflow (int_type aChar=traits_type::eof())
 
virtual int sync ()
 push the streambuf to the backing SBuf More...
 
virtual std::streamsize xsputn (const char *chars, std::streamsize number)
 

Private Member Functions

 SBufStreamBuf ()
 

Private Attributes

SBuf theBuf
 

Detailed Description

streambuf class for a SBuf-backed stream interface.

Auxiliary class to be able to leverage an ostream generating SBuf's analogous to std::ostrstream.

Definition at line 21 of file Stream.h.

Constructor & Destructor Documentation

SBufStreamBuf::SBufStreamBuf ( SBuf  aBuf)
inlineexplicit

Definition at line 25 of file Stream.h.

SBufStreamBuf::SBufStreamBuf ( )
private

Member Function Documentation

void SBufStreamBuf::clearBuf ( )
inline

Definition at line 33 of file Stream.h.

References SBuf::clear(), and theBuf.

SBuf SBufStreamBuf::getBuf ( )
inline

Definition at line 28 of file Stream.h.

References theBuf.

virtual int_type SBufStreamBuf::overflow ( int_type  aChar = traits_type::eof())
inlineprotectedvirtual

Definition at line 38 of file Stream.h.

References SBuf::append(), sync(), and theBuf.

virtual int SBufStreamBuf::sync ( void  )
inlineprotectedvirtual

Definition at line 56 of file Stream.h.

References SBuf::append(), and theBuf.

Referenced by overflow().

virtual std::streamsize SBufStreamBuf::xsputn ( const char *  chars,
std::streamsize  number 
)
inlineprotectedvirtual

write multiple characters to the store entry

Note
this is an optimisation consistent with std::streambuf API

Definition at line 68 of file Stream.h.

References SBuf::append(), and theBuf.

Member Data Documentation

SBuf SBufStreamBuf::theBuf
private

Definition at line 76 of file Stream.h.

Referenced by clearBuf(), getBuf(), overflow(), sync(), and xsputn().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors