FixedOutputBuffer class
An output buffer implementation that cannot be resized.
Contents
The constructor takes a pointer to the already allocated buffer. The caller remains the owner of this buffer.
If the buffer is not large enough to contain the full output, an exception will be thrown.
The first dip::FixedOutputBuffer::size bytes of this buffer will contain the encoded image data after the image writing function
has done its thing.
Base classes
-
class dip::
OutputBuffer abstract - An abstract base class for output buffers. more...
Constructors, destructors, assignment and conversion operators
- FixedOutputBuffer(dip::uint8* buffer, dip::uint size)
- Constructor.
Functions
- void assure_capacity(dip::uint capacity) override
- Throws an exception if the buffer doesn’t have at least
capacitybytes. - auto capacity() -> dip::uint override
- Returns the capacity of the buffer.
- auto data() -> dip::uint8* override
- Returns a pointer to the data.
- void set_size(dip::uint size) override
- Sets the size of the data stored in the buffer.
- auto size() -> dip::uint override
- Returns the size of the data stored in the buffer.
Function documentation
FixedOutputBuffer( dip::uint8* buffer, dip::uint size)
Constructor.
void assure_capacity( dip::uint capacity) override
Throws an exception if the buffer doesn’t have at least capacity bytes.
dip::uint8* data( ) override
Returns a pointer to the data.