15 #ifndef RAPIDJSON_MEMORYBUFFER_H_ 16 #define RAPIDJSON_MEMORYBUFFER_H_ 36 template <
typename Allocator = CrtAllocator>
47 Ch*
Push(
size_t count) {
return stack_.template Push<Ch>(count); }
48 void Pop(
size_t count) {
stack_.template Pop<Ch>(count); }
51 return stack_.template Bottom<Ch>();
65 std::memset(memoryBuffer.
stack_.Push<
char>(n), c, n *
sizeof(c));
70 #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)
Implement specialized version of PutN() with memset() for better performance.
GenericMemoryBuffer MemoryBuffer