19 #ifndef RAPIDJSON_MEMORYBUFFER_H_ 20 #define RAPIDJSON_MEMORYBUFFER_H_ 43 template <
typename Allocator = CrtAllocator>
49 :
stack_(allocator, capacity) {}
56 Ch *
Push(
size_t count) {
return stack_.template Push<Ch>(count); }
57 void Pop(
size_t count) {
stack_.template Pop<Ch>(count); }
73 std::memset(memoryBuffer.
stack_.Push<
char>(n), c, n *
sizeof(c));
78 #endif // RAPIDJSON_MEMORYBUFFER_H_ static const size_t kDefaultCapacity
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Represents an in-memory output byte stream.
A type-unsafe stack for storing different types of data.
GenericMemoryBuffer(Allocator *allocator=0, size_t capacity=kDefaultCapacity)
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
const Ch * GetBuffer() const
internal::Stack< Allocator > stack_
void PutN(MemoryBuffer &memoryBuffer, char c, size_t n)
GenericMemoryBuffer MemoryBuffer