Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
GenericStringBuffer< Encoding, Allocator > Class Template Reference

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

#include <fwd.h>

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

void Clear ()
 
void Flush ()
 
 GenericStringBuffer (Allocator *allocator=0, size_t capacity=kDefaultCapacity)
 
size_t GetLength () const
 Get the length of string in Ch in the string buffer. More...
 
size_t GetSize () const
 Get the size of string in bytes in the string buffer. More...
 
const ChGetString () const
 
void Pop (size_t count)
 
ChPush (size_t count)
 
ChPushUnsafe (size_t count)
 
void Put (Ch c)
 
void PutUnsafe (Ch c)
 
void Reserve (size_t count)
 
void ShrinkToFit ()
 

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 68 of file fwd.h.

Member Typedef Documentation

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

Definition at line 44 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 46 of file stringbuffer.h.

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 74 of file stringbuffer.h.

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

Definition at line 70 of file stringbuffer.h.

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

Get the length of string in Ch in the string buffer.

Definition at line 119 of file stringbuffer.h.

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

Get the size of string in bytes in the string buffer.

Definition at line 113 of file stringbuffer.h.

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

Definition at line 103 of file stringbuffer.h.

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

Definition at line 98 of file stringbuffer.h.

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

Definition at line 90 of file stringbuffer.h.

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

Definition at line 94 of file stringbuffer.h.

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

Definition at line 62 of file stringbuffer.h.

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

Definition at line 66 of file stringbuffer.h.

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

Definition at line 86 of file stringbuffer.h.

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

Definition at line 78 of file stringbuffer.h.

Member Data Documentation

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

Definition at line 124 of file stringbuffer.h.

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

Definition at line 125 of file stringbuffer.h.


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


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:54