TMediaPinList

primo::avblocks::modern::TMediaPinList

class TMediaPinList

Non-owning view of a MediaPinList.

Returned by TMediaSocketT::pins().

Public Functions

inline explicit TMediaPinList(primo::avblocks::MediaPinList *list)

Wraps a non-owned MediaPinList pointer.

inline int32_t count() const

Returns the number of pins in the collection.

inline TMediaPin at(int32_t index) const

Returns the pin at index, wrapping the existing (non-owned) pointer.

inline ItemRef operator[](int32_t index) &

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

inline TMediaPin operator[](int32_t index) const &

Const subscript — same as at(index).

inline bool setAt(int32_t index, TMediaPin &&pin)

Replaces the pin at index with pin. Returns true on success.

inline bool insert(int32_t index, TMediaPin &&pin)

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

inline bool immutable() const

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

inline bool remove(int32_t index)

Removes the pin at index. Returns true on success.

inline bool clear()

Removes all pins 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 TMediaPin) and write (operator= calls setAt on the parent list).

Public Functions

inline operator TMediaPin() const

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

inline bool operator=(TMediaPin &&p)

Write — calls setAt; returns true on success.

Public Members

TMediaPinList &list_

The list this proxy refers to.

int32_t index_

Index of the item the proxy refers to.