24 #ifndef NDN_CXX_ENCODING_BUFFER_STREAM_HPP
25 #define NDN_CXX_ENCODING_BUFFER_STREAM_HPP
29 #include <boost/iostreams/concepts.hpp>
30 #include <boost/iostreams/stream.hpp>
45 write(
const char_type* s, std::streamsize n);
69 class OBufferStream :
public boost::iostreams::stream<detail::BufferSink>
79 std::shared_ptr<Buffer>
83 std::shared_ptr<Buffer> m_buffer;
General-purpose automatically managed/resized buffer.
An output stream that writes to a Buffer.
std::shared_ptr< Buffer > buf()
Return a shared pointer to the underlying buffer.
~OBufferStream() noexcept override
(implementation detail) A Boost.Iostreams.Sink that appends to a Buffer.
BufferSink(Buffer &container)
std::streamsize write(const char_type *s, std::streamsize n)