Class CCziWriterInfo#
Defined in File libCZI_Write.h
Inheritance Relationships#
Base Type#
public libCZI::ICziWriterInfo
(Class ICziWriterInfo)
Class Documentation#
-
class CCziWriterInfo : public libCZI::ICziWriterInfo#
An implementation of the ICziWriterInfo-interface.
Public Functions
-
inline CCziWriterInfo()#
Default constructor - sets all information to “invalid” and sets fileGuid to GUID_NULL.
-
inline explicit CCziWriterInfo(const GUID &fileGuid, int mMin = 1, int mMax = -1)#
Constructor - leaves the bounds undefined.
- Parameters:
fileGuid – The GUID to be set as the CZI’s file-guid. If this is GUID_NULL (all 0’s), then we will create a new Guid and use it.
mMin – (Optional) The minimum for the M-index (inclusive).
mMax – (Optional) The maximum for the M-index (inclusive).
-
inline CCziWriterInfo(const GUID &fileGuid, const IDimBounds &bounds, int mMin = 1, int mMax = -1)#
Constructor.
- Parameters:
fileGuid – The GUID to be set as the CZI’s file-guid. If this is GUID_NULL (all 0’s), then we will create a new Guid and use it.
bounds – The bounds.
mMin – (Optional) The minimum for the M-index (inclusive).
mMax – (Optional) The maximum for the M-index (inclusive).
-
inline virtual const IDimBounds *GetDimBounds() const override#
Gets bounds for the subblocks we are going to add to the CZI. If this is a valid bounds, then the coordinates of each subblock added are checked against this bounds. In case of a violation, an LibCZIWriteException-exception is thrown.
- Returns:
Null if the bounds is not specified, else the bounds for the subblock’s coordinates we want to add.
-
inline virtual const GUID &GetFileGuid() const override#
Gets file’s unique identifier. If we report GUID_NULL, then the file-writer will create a GUID on its own.
- Returns:
The file’s unique identifier.
-
inline virtual bool TryGetMIndexMinMax(int *min, int *max) const override#
Attempts to get the minimum and the maximum (inclusive) for the m-index. If returning a valid interval (ie. if the return value is true), then the M-coordinate of each subblock added is checked against this. Furthermore, in this case we require that all subblocks have a valid M-index.
- Parameters:
min – [out] If non-null will receive the minimum M-index (inclusive).
max – [out] If non-null will receive the maximum M-index (inclusive).
- Returns:
True if it succeeds, false the is no bounds for the M-index.
-
inline virtual bool TryGetReservedSizeForAttachmentDirectory(size_t *size) const override#
Query whether to reserve space for the attachment-directory-segment at the start of the file. If returning true, the value returned for size has the following meaning: if it is >0, it is interpreted as the number of attachment-entries (ie. how many attachments can be put into the CZI). If it is 0 (and returning true), some default is used. If returning false, no space is reserved, and the attachment-directory is put at the end of the CZI. If the reserved space is not sufficient, then the attachment-directory-segment is put at the end of the CZI (and the reserved space is unused).
- Parameters:
size – [out] If returning true, then this gives the number of attachment-entries to reserve.
- Returns:
True if space for the attachment-directory-segment is to be reserved, false otherwise.
-
inline virtual bool TryGetReservedSizeForSubBlockDirectory(size_t *size) const override#
Query whether to reserve space for the subblock-directory-segment at the start of the file. If returning true, the value returned for size has the following meaning: if it is >0, it is interpreted as the number of subblock-entries (ie. how many subblocks can be put into the CZI). If it is 0 (and returning true), some default is used. If returning false, no space is reserved, and the subblock-directory is put at the end of the CZI. If the reserved space is not sufficient, then the subblock-directory-segment is put at the end of the CZI (and the reserved space is unused).
- Parameters:
size – [out] If returning true, then this gives the number of subblock-entries to reserve.
- Returns:
True if space for the subblock-directory-segment is to be reserved, false otherwise.
-
inline virtual bool TryGetReservedSizeForMetadataSegment(size_t *size) const override#
Query whether to reserve space for the metadata-segment at the start of the file. If returning true, the value returned for size has the following meaning: if it is >0, it is interpreted as the number of bytes available for the metadata-segment. If it is 0 (and returning true), some default is used. If returning false, no space is reserved, and the metadata-segment is put at the end of the CZI. If the reserved space is not sufficient, then the metadata-segment is put at the end of the CZI (and the reserved space is unused).
- Parameters:
size – [out] If returning true, then this gives the number of bytes to be reserved in the metadata-segment.
- Returns:
True if space (in bytes) for the metadata is to be reserved, false otherwise.
-
inline void SetFileGuid(const GUID &guid)#
Sets the file Guid.
- Parameters:
guid – The CZI-document’S Guid. If null Guid is given, then a new Guid will be created.
-
inline void SetReservedSizeForAttachmentsDirectory(bool reserveSpace, size_t s)#
Sets reserved size for the “attachments directory”.
- Parameters:
reserveSpace – True to reserve space.
s – The size (in bytes) to reserve for the “attachments directory”.
-
inline void SetReservedSizeForSubBlockDirectory(bool reserveSpace, size_t s)#
Sets reserved size for the “subblock directory”.
- Parameters:
reserveSpace – True to reserve space.
s – The size (in bytes) to reserve for the “subblock directory”.
-
inline void SetReservedSizeForMetadataSegment(bool reserveSpace, size_t s)#
Sets reserved size for the “metadata segment”.
- Parameters:
reserveSpace – True to reserve space.
s – The size (in bytes) to reserve for the “metadata segment”.
-
inline void SetDimBounds(const IDimBounds *bounds)#
Sets the bounds. If null is specified, then we report “no valid bounds” with ‘GetDimBounds()’.
- Parameters:
bounds – The bounds (may be nullptr).
-
inline void SetMIndexBounds(int mMin, int mMax)#
Sets the M-index bounds. If mMax < mMin, then we report “no valid M-index-bounds” with ‘TryGetMIndexMinMax’.
- Parameters:
mMin – The minimum value for the m-Index (inclusive).
mMax – The maximum value for the m-Index (inclusive).
-
inline CCziWriterInfo()#