TMetaPictureList

primo::avblocks::modern::TMetaPictureList

class TMetaPictureList

Non-owning view of a MetaPictureList.

Returned by TMetadata::pictures().

Public Functions

inline explicit TMetaPictureList(primo::codecs::MetaPictureList *list)

Wraps a non-owned MetaPictureList pointer.

inline int32_t count() const

Returns the number of pictures.

inline TMetaPicture at(int32_t index) const

Returns the picture at index (non-owning, retaining).

inline ItemRef operator[](int32_t index) &

Non-const lvalue subscript — returns a proxy supporting read and setAt write.

inline TMetaPicture operator[](int32_t index) const &

Const subscript — same as at(index).

inline bool setAt(int32_t index, TMetaPicture &&pic)

Replaces the picture at index with pic. Returns true on success.

inline bool insert(int32_t index, TMetaPicture &&pic)

Inserts pic before index, shifting later items. Returns true on success.

inline bool immutable() const

Returns true when the list (and its parent Metadata) is immutable.

inline bool remove(int32_t index)

Removes the picture at index. Returns true on success.

inline bool clear()

Removes all pictures from the list. Returns true on success.

struct ItemRef

Proxy returned by the non-const lvalue operator[](int32_t).

Supports both read (implicit conversion to TMetaPicture) and write (operator= calls setAt on the parent list).

Public Functions

inline operator TMetaPicture() const

Read — implicit conversion to a non-owning picture wrapper.

inline bool operator=(TMetaPicture &&p)

Write — calls setAt; returns true on success.

Public Members

TMetaPictureList &list_

The list this proxy refers to.

int32_t index_

Index of the item the proxy refers to.