载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Public 属性 | 静态 Public 属性 | 所有成员列表
rapidjson::GenericMemoryBuffer< Allocator > 模板结构体 参考

Represents an in-memory output byte stream. 更多...

`#include <memorybuffer.h>`

## Public 类型
typedef char | Ch

## Public 成员函数
| GenericMemoryBuffer (Allocator *allocator=0, size_t capacity=kDefaultCapacity)
void | Put (Ch c)
void | Flush ()
void | Clear ()
void | ShrinkToFit ()
Ch * | Push (size_t count)
void | Pop (size_t count)
const Ch * | GetBuffer () const
size_t | GetSize () const

## Public 属性
internal::Stack< Allocator > | stack_

## 静态 Public 属性
static const size_t | kDefaultCapacity = 256

## 详细描述

template<typename Allocator = CrtAllocator>
struct rapidjson::GenericMemoryBuffer< Allocator >

Represents an in-memory output byte stream.

This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream.

It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file.

Differences between MemoryBuffer and StringBuffer:

1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer.
2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator.

模板参数

  Allocator | type for allocating memory buffer.

注解
  implements Stream concept

该结构体的文档由以下文件生成:

- include/rapidjson/fwd.h
- include/rapidjson/memorybuffer.h