OutputBuffer class
An abstract base class for output buffers.
Contents
- Reference
Some image writing functions can write the file to a memory buffer. They do so through an object derived from this class.
Derived classes
-
class dip::
FixedOutputBuffer - An output buffer implementation that cannot be resized. more...
-
class dip::
SimpleOutputBuffer - A simple output buffer implementation. more...
Functions
- void assure_capacity(dip::uint ) virtual
- Increases the buffer’s
dip::OutputBuffer::capacityto be at leastcapacity. This is used by the writing functions when the buffer is full. Can throw an exception if the buffer implementation doesn’t support resizing. - auto capacity() -> dip::uint virtual
- Returns the capacity of the buffer (i.e. the size of the memory allocated for the buffer).
- auto data() -> dip::uint8* pure virtual
- Returns a pointer to the data.
- void set_size(dip::uint ) virtual
- Sets the size of the data stored in the buffer. Must never be larger than
dip::OutputBuffer::capacityor bad things will happen. - auto size() -> dip::uint virtual
- Returns the size of the data stored in the buffer.
Function documentation
void set_size( dip::uint ) virtual
Sets the size of the data stored in the buffer. Must never be larger than dip::OutputBuffer::capacity or bad things will happen.
void assure_capacity( dip::uint ) virtual
Increases the buffer’s dip::OutputBuffer::capacity to be at least capacity. This is used by the writing functions
when the buffer is full. Can throw an exception if the buffer implementation doesn’t support resizing.
dip::uint8* data( ) pure virtual
Returns a pointer to the data.