15 #ifndef RAPIDJSON_STRINGBUFFER_H_ 16 #define RAPIDJSON_STRINGBUFFER_H_ 20 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS 34 template <
typename Encoding,
typename Allocator = CrtAllocator>
37 typedef typename Encoding::Ch
Ch;
41 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS 56 *
stack_.template Push<Ch>() =
'\0';
58 stack_.template Pop<Ch>(1);
65 *
stack_.template Push<Ch>() =
'\0';
66 stack_.template Pop<Ch>(1);
68 return stack_.template Bottom<Ch>();
88 std::memset(
stream.stack_.Push<
char>(n), c, n *
sizeof(c));
93 #endif // RAPIDJSON_STRINGBUFFER_H_ Represents an in-memory output stream.
static const size_t kDefaultCapacity
const Ch * GetString() const
void PutN(GenericStringBuffer< UTF8<> > &stream, char c, size_t n)
Implement specialized version of PutN() with memset() for better performance.
GenericStringBuffer< UTF8<> > StringBuffer
String buffer with UTF8 encoding.
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
fmt::BufferedFile & move(fmt::BufferedFile &f)
GenericStringBuffer & operator=(const GenericStringBuffer &)
GLuint GLuint GLsizei count
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
A type-unsafe stack for storing different types of data.
internal::Stack< Allocator > stack_
common definitions and configuration
GenericStringBuffer(Allocator *allocator=0, size_t capacity=kDefaultCapacity)