NGL  6.5
The NCCA Graphics Library
GenericStringBuffer< Encoding, Allocator > Class Template Reference

Represents an in-memory output stream. More...

#include <stringbuffer.h>

+ Collaboration diagram for GenericStringBuffer< Encoding, Allocator >:

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

 GenericStringBuffer (Allocator *allocator=0, size_t capacity=kDefaultCapacity)
 
void Put (Ch c)
 
void Flush ()
 
void Clear ()
 
void ShrinkToFit ()
 
ChPush (size_t count)
 
void Pop (size_t count)
 
const ChGetString () const
 
size_t GetSize () const
 

Public Attributes

internal::Stack< Allocator > stack_
 

Static Public Attributes

static const size_t kDefaultCapacity = 256
 

Private Member Functions

 GenericStringBuffer (const GenericStringBuffer &)
 
GenericStringBufferoperator= (const GenericStringBuffer &)
 

Detailed Description

template<typename Encoding, typename Allocator = CrtAllocator>
class GenericStringBuffer< Encoding, Allocator >

Represents an in-memory output stream.

Template Parameters
EncodingEncoding of the stream.
Allocatortype for allocating memory buffer.
Note
implements Stream concept

Definition at line 35 of file stringbuffer.h.

Member Typedef Documentation

template<typename Encoding , typename Allocator = CrtAllocator>
typedef Encoding::Ch GenericStringBuffer< Encoding, Allocator >::Ch

Definition at line 37 of file stringbuffer.h.

Constructor & Destructor Documentation

template<typename Encoding , typename Allocator = CrtAllocator>
GenericStringBuffer< Encoding, Allocator >::GenericStringBuffer ( Allocator *  allocator = 0,
size_t  capacity = kDefaultCapacity 
)
inline

Definition at line 39 of file stringbuffer.h.

References std::move(), GenericStringBuffer< Encoding, Allocator >::operator=(), and GenericStringBuffer< Encoding, Allocator >::stack_.

+ Here is the call graph for this function:

template<typename Encoding , typename Allocator = CrtAllocator>
GenericStringBuffer< Encoding, Allocator >::GenericStringBuffer ( const GenericStringBuffer< Encoding, Allocator > &  )
private

Member Function Documentation

template<typename Encoding , typename Allocator = CrtAllocator>
void GenericStringBuffer< Encoding, Allocator >::Clear ( )
inline

Definition at line 53 of file stringbuffer.h.

References GenericStringBuffer< Encoding, Allocator >::stack_.

template<typename Encoding , typename Allocator = CrtAllocator>
void GenericStringBuffer< Encoding, Allocator >::Flush ( )
inline

Definition at line 51 of file stringbuffer.h.

template<typename Encoding , typename Allocator = CrtAllocator>
size_t GenericStringBuffer< Encoding, Allocator >::GetSize ( ) const
inline

Definition at line 71 of file stringbuffer.h.

References GenericStringBuffer< Encoding, Allocator >::stack_.

template<typename Encoding , typename Allocator = CrtAllocator>
const Ch* GenericStringBuffer< Encoding, Allocator >::GetString ( ) const
inline

Definition at line 63 of file stringbuffer.h.

References GenericStringBuffer< Encoding, Allocator >::stack_.

template<typename Encoding , typename Allocator = CrtAllocator>
GenericStringBuffer& GenericStringBuffer< Encoding, Allocator >::operator= ( const GenericStringBuffer< Encoding, Allocator > &  )
private

+ Here is the caller graph for this function:

template<typename Encoding , typename Allocator = CrtAllocator>
void GenericStringBuffer< Encoding, Allocator >::Pop ( size_t  count)
inline

Definition at line 61 of file stringbuffer.h.

References GenericStringBuffer< Encoding, Allocator >::stack_.

template<typename Encoding , typename Allocator = CrtAllocator>
Ch* GenericStringBuffer< Encoding, Allocator >::Push ( size_t  count)
inline

Definition at line 60 of file stringbuffer.h.

References GenericStringBuffer< Encoding, Allocator >::stack_.

template<typename Encoding , typename Allocator = CrtAllocator>
void GenericStringBuffer< Encoding, Allocator >::Put ( Ch  c)
inline

Definition at line 50 of file stringbuffer.h.

References GenericStringBuffer< Encoding, Allocator >::stack_.

template<typename Encoding , typename Allocator = CrtAllocator>
void GenericStringBuffer< Encoding, Allocator >::ShrinkToFit ( )
inline

Definition at line 54 of file stringbuffer.h.

References GenericStringBuffer< Encoding, Allocator >::stack_.

Member Data Documentation

template<typename Encoding , typename Allocator = CrtAllocator>
const size_t GenericStringBuffer< Encoding, Allocator >::kDefaultCapacity = 256
static

Definition at line 73 of file stringbuffer.h.

template<typename Encoding , typename Allocator = CrtAllocator>
internal::Stack<Allocator> GenericStringBuffer< Encoding, Allocator >::stack_
mutable

Definition at line 74 of file stringbuffer.h.


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