15#ifndef RAPIDJSON_MEMORYBUFFER_H_
16#define RAPIDJSON_MEMORYBUFFER_H_
36template <
typename Allocator = CrtAllocator>
51 return stack_.template Bottom<Ch>();
65 std::memset(memoryBuffer.
stack_.Push<
char>(n), c, n *
sizeof(c));
A type-unsafe stack for storing different types of data.
Concept for allocating, resizing and freeing memory block.
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
void PutN(MemoryBuffer &memoryBuffer, char c, size_t n)
Implement specialized version of PutN() with memset() for better performance.
GenericMemoryBuffer MemoryBuffer
Represents an in-memory output byte stream.
const Ch * GetBuffer() const
internal::Stack< Allocator > stack_
GenericMemoryBuffer(Allocator *allocator=0, size_t capacity=kDefaultCapacity)
static const size_t kDefaultCapacity