43 typedef typename Encoding::Ch Ch;
47#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
51 stack_ = std::move(rhs.stack_);
56 void Put(Ch c) { *stack_.template Push<Ch>() = c; }
57 void PutUnsafe(Ch c) { *stack_.template PushUnsafe<Ch>() = c; }
60 void Clear() { stack_.Clear(); }
63 *stack_.template Push<Ch>() =
'\0';
65 stack_.template Pop<Ch>(1);
68 void Reserve(
size_t count) { stack_.template Reserve<Ch>(count); }
69 Ch* Push(
size_t count) {
return stack_.template Push<Ch>(count); }
70 Ch* PushUnsafe(
size_t count) {
return stack_.template PushUnsafe<Ch>(count); }
71 void Pop(
size_t count) { stack_.template Pop<Ch>(count); }
73 const Ch* GetString()
const {
75 *stack_.template Push<Ch>() =
'\0';
76 stack_.template Pop<Ch>(1);
78 return stack_.template Bottom<Ch>();
81 size_t GetSize()
const {
return stack_.GetSize(); }
83 static const size_t kDefaultCapacity = 256;
84 mutable internal::Stack<Allocator> stack_;
void PutUnsafe(Stream &stream, typename Stream::Ch c)
Write character to a stream, presuming buffer is reserved.
定义 stream.h:91
void PutN(FileWriteStream &stream, char c, size_t n)
Implement specialized version of PutN() with memset() for better performance.
定义 filewritestream.h:94