Struct AddSubBlockInfo#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct AddSubBlockInfo : public libCZI::AddSubBlockInfoBase#

Information for adding a subblock to a CZI-file with ICziWriter. Here we add the information about the payload-data. We employ a pull-based model, where the caller has to supply callback-functions for delivering the data.

Public Functions

inline AddSubBlockInfo()#

Default constructor.

inline explicit AddSubBlockInfo(const AddSubBlockInfoBase &other)#

Copy-Constructor which copies all information from the specified base-class object.

Parameters:

other – The other object of type AddSubBlockInfoBase from which information will be copied.

inline virtual void Clear() override#

Clears this object to its blank/initial state.

Public Members

size_t sizeData#

The size of the subblock’s data in bytes.

std::function<bool(int callCnt, size_t offset, const void *&ptr, size_t &size)> getData#

The functor will be called to retrieve the subblock’s data. The function must set the arguments ‘ptr’ and ‘size’, and the memory pointed to must be valid until the next call into the functor (or returning from the ‘SyncAddSubBlock’ method). The argument ‘callCnt’ is incremented with each call (starting from 0), and ‘offset’ is incremented by the number of bytes already retrieved. The functor will be called until the amount of bytes specified by ‘sizeData” has been retrieved or if it returns false. If returning false, the subblock-data is filled with zeroes (if necessary) so that ‘sizeData’ bytes are reached.

size_t sizeMetadata#

The size of the subblock’s metadata in bytes (note: max value is (numeric_limits<int>::max() ).

std::function<bool(int callCnt, size_t offset, const void *&ptr, size_t &size)> getMetaData#

The functor will be called to retrieve the subblock’s metadata. The function must set the arguments ‘ptr’ and ‘size’, and the memory pointed to must be valid until the next call into the functor (or returning from the ‘SyncAddSubBlock’ method). The argument ‘callCnt’ is incremented with each call (starting from 0), and ‘offset’ is incremented by the number of bytes already retrieved. The functor will be called until the amount of bytes specified by ‘sizeMetadata” has been retrieved or if it returns false. If returning false, the subblock-metadata is filled with zeroes (if necessary) so that ‘sizeMetadata’ bytes are reached.

size_t sizeAttachment#

The size of the subblock’s attachment in bytes (note: max value is (numeric_limits<int>::max() ).

std::function<bool(int callCnt, size_t offset, const void *&ptr, size_t &size)> getAttachment#

The functor will be called to retrieve the subblock’s attachment. The function must set the arguments ‘ptr’ and ‘size’, and the memory pointed to must be valid until the next call into the functor (or returning from the ‘SyncAddSubBlock’ method). The argument ‘callCnt’ is incremented with each call (starting from 0), and ‘offset’ is incremented by the number of bytes already retrieved. The functor will be called until the amount of bytes specified by ‘sizeAttachment” has been retrieved or if it returns false. If returning false, the subblock-attachment is filled with zeroes (if necessary) so that ‘sizeAttachment’ bytes are reached.