26 #ifndef RAPIDJSON_STRINGBUFFER_H_
27 #define RAPIDJSON_STRINGBUFFER_H_
40 template <
typename Encoding,
typename Allocator = CrtAllocator>
42 typedef typename Encoding::Ch
Ch;
52 *
stack_.template Push<Ch>() =
'\0';
53 stack_.template Pop<Ch>(1);
55 return stack_.template Bottom<Ch>();
69 memset(stream.stack_.Push<
char>(
n), c,
n *
sizeof(c));
const unsigned n
Definition: CG3DPackingUnitTest.cpp:32
Concept for allocating, resizing and freeing memory block.
A type-unsafe stack for storing different types of data.
Definition: stack.h:39
Definition: document.h:38
GenericStringBuffer< UTF8<> > StringBuffer
Definition: stringbuffer.h:64
void PutN(GenericWriteStream &stream, char c, size_t n)
Definition: genericstream.h:113
Represents an in-memory output stream.
Definition: stringbuffer.h:41
internal::Stack< Allocator > stack_
Definition: stringbuffer.h:61
size_t Size() const
Definition: stringbuffer.h:58
const char * GetString() const
Definition: stringbuffer.h:50
Encoding::Ch Ch
Definition: stringbuffer.h:42
void Put(Ch c)
Definition: stringbuffer.h:46
static const size_t kDefaultCapacity
Definition: stringbuffer.h:60
void Clear()
Definition: stringbuffer.h:48
GenericStringBuffer(Allocator *allocator=0, size_t capacity=kDefaultCapacity)
Definition: stringbuffer.h:44
UTF-8 encoding.
Definition: rapidjson.h:360