MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / output_stream_adapter

Class output_stream_adapter

Source/external/json.hpp:14864–14884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14862/// output adapter for output streams
14863template<typename CharType>
14864class output_stream_adapter : public output_adapter_protocol<CharType>
14865{
14866 public:
14867 explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept
14868 : stream(s)
14869 {}
14870
14871 void write_character(CharType c) override
14872 {
14873 stream.put(c);
14874 }
14875
14876 JSON_HEDLEY_NON_NULL(2)
14877 void write_characters(const CharType* s, std::size_t length) override
14878 {
14879 stream.write(s, static_cast<std::streamsize>(length));
14880 }
14881
14882 private:
14883 std::basic_ostream<CharType>& stream;
14884};
14885#endif // JSON_NO_IO
14886
14887/// output adapter for basic_string

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected