Classes | Typedefs | Functions
stringbuffer.h File Reference
#include "stream.h"
#include "internal/stack.h"

Go to the source code of this file.

Classes

class  GenericStringBuffer< Encoding, Allocator >
 Represents an in-memory output stream. More...
 

Typedefs

typedef GenericStringBuffer< UTF8<> > StringBuffer
 String buffer with UTF8 encoding. More...
 

Functions

template<typename Encoding , typename Allocator >
void PutReserve (GenericStringBuffer< Encoding, Allocator > &stream, size_t count)
 
template<typename Encoding , typename Allocator >
void PutUnsafe (GenericStringBuffer< Encoding, Allocator > &stream, typename Encoding::Ch c)
 
template<>
void PutN (GenericStringBuffer< UTF8<> > &stream, char c, size_t n)
 Implement specialized version of PutN() with memset() for better performance. More...
 

Typedef Documentation

String buffer with UTF8 encoding.

Definition at line 97 of file stringbuffer.h.

Function Documentation

template<>
void PutN ( GenericStringBuffer< UTF8<> > &  stream,
char  c,
size_t  n 
)
inline

Implement specialized version of PutN() with memset() for better performance.

Definition at line 111 of file stringbuffer.h.

111  {
112  std::memset(stream.stack_.Push<char>(n), c, n * sizeof(c));
113 }
RAPIDJSON_FORCEINLINE T * Push(size_t count=1)
Definition: stack.h:122
std::void_t< T > n
internal::Stack< Allocator > stack_
Definition: stringbuffer.h:88
template<typename Encoding , typename Allocator >
void PutReserve ( GenericStringBuffer< Encoding, Allocator > &  stream,
size_t  count 
)
inline

Definition at line 100 of file stringbuffer.h.

100  {
101  stream.Reserve(count);
102 }
void Reserve(size_t count)
Definition: stringbuffer.h:68
template<typename Encoding , typename Allocator >
void PutUnsafe ( GenericStringBuffer< Encoding, Allocator > &  stream,
typename Encoding::Ch  c 
)
inline

Definition at line 105 of file stringbuffer.h.

105  {
106  stream.PutUnsafe(c);
107 }
void PutUnsafe(Ch c)
Definition: stringbuffer.h:57