Interface for the attachment repository. This interface is used to access the attachments in a CZI-file.
More...
#include <libCZI.h>
Interface for the attachment repository. This interface is used to access the attachments in a CZI-file.
◆ EnumerateAttachments()
virtual void libCZI::IAttachmentRepository::EnumerateAttachments |
( |
const std::function< bool(int index, const AttachmentInfo &info)> & |
funcEnum | ) |
|
|
pure virtual |
Enumerate all attachments.
- Parameters
-
funcEnum | The functor which will be called for every attachment. If the return value of the functor is true, the enumeration is continued, otherwise it is stopped. The first argument is the index of the attachment and the second is providing information about the attachment. |
◆ EnumerateSubset()
virtual void libCZI::IAttachmentRepository::EnumerateSubset |
( |
const char * |
contentFileType, |
|
|
const char * |
name, |
|
|
const std::function< bool(int index, const AttachmentInfo &info)> & |
funcEnum |
|
) |
| |
|
pure virtual |
Enumerate the subset of the attachments defined by the parameters.
- Parameters
-
contentFileType | If non-null, only attachments with this contentFileType will be considered. |
name | If non-null, only attachments with this name will be considered. |
funcEnum | The functor which will be called for every attachment (within the subset). If the return value of the functor is true, the enumeration is continued, otherwise it is stopped. The first argument is the index of the attachment and the second is providing information about the attachment. |
◆ ReadAttachment()
virtual std::shared_ptr<IAttachment> libCZI::IAttachmentRepository::ReadAttachment |
( |
int |
index | ) |
|
|
pure virtual |
Reads the attachment identified by the specified index. If there is no attachment present (for the specified index) then an empty shared_ptr is returned. If a different kind of problem occurs (e. g. I/O error or corrupted data) an exception is thrown.
- Parameters
-
index | Index of the attachment (as reported by the Enumerate-methods). |
- Returns
- If successful, the attachment object; otherwise an empty shared_ptr.
The documentation for this class was generated from the following file: