Class IAttachment#

Class Documentation#

class IAttachment#

Representation of an attachment. An attachment is a binary blob, its inner structure is opaque.

Public Functions

virtual const AttachmentInfo &GetAttachmentInfo() const = 0#

Gets information about the attachment.

Returns:

The attachment information.

virtual void DangerousGetRawData(const void *&ptr, size_t &size) const = 0#

Get a pointer to the raw data. Note that the pointer returned is only valid during the lifetime of the sub-block-object.

Parameters:
  • ptr[out] The pointer to the data is stored here.

  • size[out] The size of the data.

virtual std::shared_ptr<const void> GetRawData(size_t *ptrSize) = 0#

Gets raw data.

Parameters:

ptrSize[out] If non-null, size of the data buffer is stored here.

Returns:

The raw data.

virtual ~IAttachment() = default#
template<class Q>
inline void DangerousGetRawData(const Q *&ptr, size_t &size) const#

A helper method used to cast the pointer to a specific type.

Parameters:
  • ptr[out] The pointer to the data is stored here.

  • size[out] The size of the data.