TMetaAttribute¶
primo::avblocks::modern::TMetaAttribute
-
class TMetaAttribute¶
Fluent wrapper for
primo::codecs::MetaAttribute.Owns the raw object through a
primo::ref<MetaAttribute>. Non-copyable, movable. Constructed from a factory-owned object (viaprimo::ref) or from a non-owned pointer (via raw-pointer ctor, which retains it).Unnamed Group
-
TMetaAttribute(TMetaAttribute&&) = default¶
-
TMetaAttribute &operator=(TMetaAttribute&&) = default¶
Move construction/assignment transfers ownership of the underlying object. The moved-from object no longer wraps anything.
Public Functions
-
inline TMetaAttribute()¶
Creates an empty meta attribute.
-
inline explicit TMetaAttribute(primo::ref<primo::codecs::MetaAttribute> attr)¶
Takes ownership of an existing
MetaAttributereference.
-
inline explicit TMetaAttribute(primo::codecs::MetaAttribute *attr)¶
Wraps a non-owned
MetaAttributepointer, retaining it.
-
TMetaAttribute(const TMetaAttribute&) = delete¶
-
TMetaAttribute &operator=(const TMetaAttribute&) = delete¶
-
inline const char *name() const¶
Returns the attribute name as an ANSI string (see
primo::codecs::Metaconstants).
-
inline std::string value() const¶
Returns the attribute value as a UTF-8
std::string.
-
inline bool immutable() const¶
Returns
trueif the attribute is immutable.
-
inline TMetaAttribute &name(const char *n)¶
Sets the attribute name (
nameis an ANSI string).
-
inline TMetaAttribute &value(const char *val)¶
Sets the attribute value (
valis a UTF-8 C-string).
-
inline TMetaAttribute clone() const¶
Creates a full independent clone. The returned object is always mutable.
-
inline bool valid() const¶
Returns
truewhen this handle wraps a non-null underlying object.
-
inline primo::codecs::MetaAttribute *get() const¶
Returns the raw underlying pointer. For interop with the core API only.
-
TMetaAttribute(TMetaAttribute&&) = default¶