46template<typename CharType>
50template<typename CharType, typename AllocatorType =
std::allocator<CharType>>
66 v.insert(v.end(), s, s + length);
70 std::vector<CharType, AllocatorType>& v;
75template<
typename CharType>
91 stream.write(s,
static_cast<std::streamsize
>(length));
95 std::basic_ostream<CharType>& stream;
100template<
typename CharType,
typename StringType = std::basic_
string<CharType>>
116 str.append(s, length);
123template<
typename CharType>
144template<
typename CharType,
typename StringType = std::basic_
string<CharType>>
148 template<
typename AllocatorType = std::allocator<CharType>>
#define WPI_JSON_NAMESPACE_END
Definition: abi_macros.h:59
#define WPI_JSON_NAMESPACE_BEGIN
Definition: abi_macros.h:53
Definition: output_adapters.h:146
output_adapter(StringType &s)
Definition: output_adapters.h:157
output_adapter(raw_ostream &os)
Definition: output_adapters.h:160
output_adapter(std::basic_ostream< CharType > &s)
Definition: output_adapters.h:153
output_adapter(std::vector< CharType, AllocatorType > &vec)
Definition: output_adapters.h:149
output adapter for output streams
Definition: output_adapters.h:77
output_stream_adapter(std::basic_ostream< CharType > &s) noexcept
Definition: output_adapters.h:79
void write_character(CharType c) override
Definition: output_adapters.h:83
output adapter for basic_string
Definition: output_adapters.h:102
void write_character(CharType c) override
Definition: output_adapters.h:108
output_string_adapter(StringType &s) noexcept
Definition: output_adapters.h:104
output adapter for byte vectors
Definition: output_adapters.h:52
output_vector_adapter(std::vector< CharType, AllocatorType > &vec) noexcept
Definition: output_adapters.h:54
void write_character(CharType c) override
Definition: output_adapters.h:58
Definition: output_adapters.h:125
raw_ostream_adapter(raw_ostream &s) noexcept
Definition: output_adapters.h:127
void write_character(CharType c) override
Definition: output_adapters.h:131
#define JSON_HEDLEY_NON_NULL(...)
Definition: hedley.h:1288
detail namespace with internal helper functions
Definition: xchar.h:20
std::shared_ptr< output_adapter_protocol< CharType > > output_adapter_t
a type to simplify interfaces
Definition: output_adapters.h:47
static constexpr const velocity::meters_per_second_t c(299792458.0)
Speed of light in vacuum.
abstract output adapter interface
Definition: output_adapters.h:33
output_adapter_protocol(const output_adapter_protocol &)=default
virtual ~output_adapter_protocol()=default
virtual void write_character(CharType c)=0
output_adapter_protocol(output_adapter_protocol &&) noexcept=default
output_adapter_protocol()=default
virtual void write_characters(const CharType *s, std::size_t length)=0