SimpleOutputBuffer class
A simple output buffer implementation.
Contents
The constructor takes a std::vector< dip::uint8 >
by reference. This vector needs to remain in scope wherever the
SimpleOutputBuffer
object is in scope. The first dip::SimpleOutputBuffer::size
bytes of this vector will contain the encoded image
data after the image writing function has done its thing.
Base classes
-
class dip::
OutputBuffer abstract - A pure virtual base class for output buffers.
Constructors, destructors, assignment and conversion operators
- SimpleOutputBuffer(std::vector<dip::uint8>& buffer)
- Constructor.
Functions
- auto size() -> dip::uint override
- Returns the size of the data stored in the buffer.
- void set_size(dip::uint size) override
- Sets the size of the data stored in the buffer.
- auto capacity() -> dip::uint override
- Returns the capacity of the buffer.
- void assure_capacity(dip::uint capacity) override
- Increases the buffer’s
dip::SimpleOutputBuffer::capacity
to be at leastcapacity
. This call invalidates the pointer previously returned bydip::SimpleOutputBuffer::data
. - auto data() -> dip::uint8* override
- Returns a pointer to the data.