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>
83 shared_ptr<Buffer> m_buffer;
General-purpose automatically managed/resized buffer.
An output stream that writes to a Buffer.
~OBufferStream() noexcept override
shared_ptr< Buffer > buf()
Return a shared pointer to the underlying buffer.
(implementation detail) A Boost.Iostreams.Sink that appends to a Buffer.
BufferSink(Buffer &container)
std::streamsize write(const char_type *s, std::streamsize n)