44 typedef typename Encoding::Ch Ch;
48#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
52 stack_ = std::move(rhs.stack_);
57 void Put(Ch c) { *stack_.template Push<Ch>() = c; }
58 void PutUnsafe(Ch c) { *stack_.template PushUnsafe<Ch>() = c; }
61 void Clear() { stack_.Clear(); }
64 *stack_.template Push<Ch>() =
'\0';
66 stack_.template Pop<Ch>(1);
69 void Reserve(
size_t count) { stack_.template Reserve<Ch>(count); }
70 Ch* Push(
size_t count) {
return stack_.template Push<Ch>(count); }
71 Ch* PushUnsafe(
size_t count) {
return stack_.template PushUnsafe<Ch>(count); }
72 void Pop(
size_t count) { stack_.template Pop<Ch>(count); }
74 const Ch* GetString()
const {
76 *stack_.template Push<Ch>() =
'\0';
77 stack_.template Pop<Ch>(1);
79 return stack_.template Bottom<Ch>();
83 size_t GetSize()
const {
return stack_.GetSize(); }
86 size_t GetLength()
const {
return stack_.GetSize() /
sizeof(Ch); }
88 static const size_t kDefaultCapacity = 256;