NCBI C++ ToolKit
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
rapidjson::GenericStringBuffer< Encoding, Allocator > Class Template Reference

Search Toolkit Book for rapidjson::GenericStringBuffer

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

#include <misc/jsonwrapp/rapidjson11/stringbuffer.h>

+ Collaboration diagram for rapidjson::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 PutUnsafe (Ch c)
 
void Flush ()
 
void Clear ()
 
void ShrinkToFit ()
 
void Reserve (size_t count)
 
ChPush (size_t count)
 
ChPushUnsafe (size_t count)
 
void Pop (size_t count)
 
const ChGetString () const
 
size_t GetSize () const
 Get the size of string in bytes in the string buffer. More...
 
size_t GetLength () const
 Get the length of string in Ch in the string buffer. More...
 

Public Attributes

internal::Stack< Allocatorstack_
 

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 rapidjson::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 Typedef Documentation

◆ Ch

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

Definition at line 43 of file stringbuffer.h.

Constructor & Destructor Documentation

◆ GenericStringBuffer() [1/2]

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

Definition at line 45 of file stringbuffer.h.

◆ GenericStringBuffer() [2/2]

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

Member Function Documentation

◆ Clear()

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

Definition at line 60 of file stringbuffer.h.

◆ Flush()

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

Definition at line 58 of file stringbuffer.h.

◆ GetLength()

template<typename Encoding , typename Allocator = CrtAllocator>
size_t rapidjson::GenericStringBuffer< Encoding, Allocator >::GetLength ( void  ) 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 rapidjson::GenericStringBuffer< Encoding, Allocator >::GetSize ( void  ) const
inline

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

Definition at line 82 of file stringbuffer.h.

◆ GetString()

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

◆ operator=()

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

◆ Pop()

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

Definition at line 71 of file stringbuffer.h.

◆ Push()

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

Definition at line 69 of file stringbuffer.h.

◆ PushUnsafe()

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

Definition at line 70 of file stringbuffer.h.

◆ Put()

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

Definition at line 56 of file stringbuffer.h.

◆ PutUnsafe()

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

Definition at line 57 of file stringbuffer.h.

Referenced by rapidjson::PutUnsafe().

◆ Reserve()

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

Definition at line 68 of file stringbuffer.h.

Referenced by rapidjson::PutReserve().

◆ ShrinkToFit()

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

Definition at line 61 of file stringbuffer.h.

Member Data Documentation

◆ kDefaultCapacity

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

Definition at line 87 of file stringbuffer.h.

◆ stack_

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

Definition at line 88 of file stringbuffer.h.


The documentation for this class was generated from the following files:
Modified on Tue Apr 23 07:36:51 2024 by modify_doxy.py rev. 669887