Class IMetadataSegment#

Class Documentation#

class IMetadataSegment#

Interface representing the metadata-segment.

Public Types

enum MemBlkType#

Values that represent the two different data types found in the metadata-segment.

Values:

enumerator XmlMetadata#

The metadata (in UTF8-XML-format)

enumerator Attachment#

The attachment (not currently used).

Public Functions

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

Gets raw data.

Parameters:
  • type – The metadata-segment memory-block type.

  • ptrSize[out] If non-null, thus size of the data (in bytes) is stored here.

Returns:

The raw data.

virtual void DangerousGetRawData(MemBlkType type, 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:
  • type – The metadata-segment memory-block type.

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

  • size[out] The size of the data.

virtual ~IMetadataSegment() = default#
inline std::shared_ptr<ICziMetadata> CreateMetaFromMetadataSegment()#

Creates metadata object from this metadata segment.

Returns:

The newly created metadata object.