cphot 0.1
A C++ tool for computing photometry from spectra.
|
|
Go to the documentation of this file.
15 #ifndef RAPIDJSON_STRINGBUFFER_H_
16 #define RAPIDJSON_STRINGBUFFER_H_
21 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
27 #if defined(__clang__)
29 RAPIDJSON_DIAG_OFF(
c++98-compat)
40 template <
typename Encoding,
typename Allocator = CrtAllocator>
43 typedef typename Encoding::Ch
Ch;
47 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
51 stack_ = std::move(rhs.stack_);
63 *
stack_.template Push<Ch>() =
'\0';
65 stack_.template Pop<Ch>(1);
71 void Pop(
size_t count) {
stack_.template Pop<Ch>(count); }
75 *
stack_.template Push<Ch>() =
'\0';
76 stack_.template Pop<Ch>(1);
78 return stack_.template Bottom<Ch>();
95 template<
typename Encoding,
typename Allocator>
100 template<
typename Encoding,
typename Allocator>
108 std::memset(stream.stack_.Push<
char>(n),
c, n *
sizeof(
c));
113 #if defined(__clang__)
117 #endif // RAPIDJSON_STRINGBUFFER_H_
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Concept for allocating, resizing and freeing memory block.
void PutReserve(GenericStringBuffer< Encoding, Allocator > &stream, size_t count)
GenericStringBuffer< UTF8<> > StringBuffer
String buffer with UTF8 encoding.
internal::Stack< Allocator > stack_
Represents an in-memory output stream.
GenericStringBuffer(Allocator *allocator=0, size_t capacity=kDefaultCapacity)
void PutN(GenericStringBuffer< UTF8<> > &stream, char c, size_t n)
Implement specialized version of PutN() with memset() for better performance.
const Ch * GetString() const
static const size_t kDefaultCapacity
A type-unsafe stack for storing different types of data.
Ch * PushUnsafe(size_t count)
void PutUnsafe(GenericStringBuffer< Encoding, Allocator > &stream, typename Encoding::Ch c)
void Reserve(size_t count)