blocxx
Public Member Functions | Protected Member Functions | Private Attributes | Friends
BLOCXX_NAMESPACE::OStringStreamBuf Class Reference

#include <StringStream.hpp>

Inheritance diagram for BLOCXX_NAMESPACE::OStringStreamBuf:
BLOCXX_NAMESPACE::BaseStreamBuffer

List of all members.

Public Member Functions

 OStringStreamBuf (size_t size)
virtual ~OStringStreamBuf ()
String toString () const
String releaseString ()
size_t length () const
const char * c_str () const
void reset ()
- Public Member Functions inherited from BLOCXX_NAMESPACE::BaseStreamBuffer
 BaseStreamBuffer (EDirectionFlag direction, size_t bufSize=BASE_BUF_SIZE)
 Create a base stream buffer.
 ~BaseStreamBuffer ()

Protected Member Functions

virtual int buffer_to_device (const char *c, int n)
 Writes the buffer to the "device".
- Protected Member Functions inherited from BLOCXX_NAMESPACE::BaseStreamBuffer
int underflow ()
std::streamsize xsputn (const char *s, std::streamsize n)
virtual int overflow (int c)
virtual int sync ()
virtual void initBuffers ()
virtual void initGetBuffer ()
virtual void initPutBuffer ()
virtual int buffer_from_device (char *c, int n)
 Fill the buffer from the "device".

Private Attributes

StringBuffer m_buf

Friends

class OStringStream

Additional Inherited Members

- Public Types inherited from BLOCXX_NAMESPACE::BaseStreamBuffer
enum  EDirectionFlag { E_IN, E_OUT, E_IN_OUT }

Detailed Description

Definition at line 100 of file StringStream.hpp.


Constructor & Destructor Documentation

BLOCXX_NAMESPACE::OStringStreamBuf::OStringStreamBuf ( size_t  size)

Definition at line 46 of file StringStream.cpp.

BLOCXX_NAMESPACE::OStringStreamBuf::~OStringStreamBuf ( )
virtual

Definition at line 51 of file StringStream.cpp.


Member Function Documentation

int BLOCXX_NAMESPACE::OStringStreamBuf::buffer_to_device ( const char *  c,
int  n 
)
protectedvirtual

Writes the buffer to the "device".

Parameters:
cA pointer to the start of the buffer
nthe number of bytes to write
Returns:
-1 if error, 0 if the entire buffer was written.

Reimplemented from BLOCXX_NAMESPACE::BaseStreamBuffer.

Definition at line 80 of file StringStream.cpp.

References BLOCXX_NAMESPACE::StringBuffer::append(), and m_buf.

const char * BLOCXX_NAMESPACE::OStringStreamBuf::c_str ( ) const
size_t BLOCXX_NAMESPACE::OStringStreamBuf::length ( ) const
String BLOCXX_NAMESPACE::OStringStreamBuf::releaseString ( )
void BLOCXX_NAMESPACE::OStringStreamBuf::reset ( )
String BLOCXX_NAMESPACE::OStringStreamBuf::toString ( ) const

Friends And Related Function Documentation

friend class OStringStream
friend

Definition at line 115 of file StringStream.hpp.


Member Data Documentation

StringBuffer BLOCXX_NAMESPACE::OStringStreamBuf::m_buf
private

Definition at line 114 of file StringStream.hpp.

Referenced by buffer_to_device(), c_str(), length(), releaseString(), reset(), and toString().


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