bes  Updated for version 3.20.10
GenericStringBuffer< Encoding, Allocator > Class Template Reference

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

#include <stringbuffer.h>

Collaboration diagram for GenericStringBuffer< Encoding, Allocator >:
Collaboration graph

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 Ch * GetString () const
 
void Pop (size_t count)
 
Ch * Push (size_t count)
 
Ch * PushUnsafe (size_t count)
 
void Put (Ch c)
 
void PutUnsafe (Ch c)
 
void Reserve (size_t count)
 
void ShrinkToFit ()
 

Public Attributes

internal::Stack< Allocatorstack_
 

Static Public Attributes

static const size_t kDefaultCapacity = 256
 

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

Member Function Documentation

◆ GetLength()

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

◆ GetSize()

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


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