MetaAttributeList represents the meta attributes inside a Metadata object.
More...
MetaAttributeList represents the meta attributes inside a Metadata object.
This is a modifiable and indexable collection that exists only in the context of a Metadata object and cannot be created separately from it, nor detached.
Adds a new attribute to the end of the list.
- Parameters
-
attrib | [in] A pointer to a MetaAttribute object. It is allowed to add a NULL item to the collection. Internally if the MetaAttribute object is not NULL it is retained, so it is safe to release it after this method returns. |
- Returns
- TRUE if the specified item is added to the collection, otherwise FALSE.
@see Library::createMetaAttribute
@see \ref object_management "Object Management"
Returns an attribute by index.
- Parameters
-
index | [in] A zero-based index. |
- Returns
- A pointer to the MetaAttribute object specified by index.
The caller is not required to release the returned object.
Removes all attributes from the collection.
When removed from the collection each MetaAttribute object is released.
- Returns
- TRUE if the collection is cleared, otherwise FALSE.
@see \ref object_management "Object Management"
virtual int32_t count |
( |
| ) |
const |
|
pure virtual |
Returns the number of attributes in the list.
- Returns
- number of items in the collection.
virtual bool_t immutable |
( |
| ) |
const |
|
pure virtual |
Returns whether the object is immutable.
An immmutable object cannot be modified and all modifying methods fail to produce a result.
- Returns
- TRUE if the object is immutable, FALSE otherwise.
virtual bool_t insert |
( |
int32_t |
itemIndex, |
|
|
MetaAttribute * |
attrib |
|
) |
| |
|
pure virtual |
Inserts an attribute at the specified index in the list.
- Parameters
-
itemIndex | [in] The index in the collection where the new item shall be inserted. This must be a valid index in the collection. Indexing starts from 0. After the new item is inserted in the collection its index is the value of the itemIndex param. |
attrib | [in] A pointer to the MetaAttribute object that shall be inserted. It is allowed to insert a NULL value in the collection. Internally the new item is retained (if not NULL), so it is safe to release it after this method returns. |
- Returns
- TRUE The item is inserted, FALSE otherwise.
- See Also
- Object Management
Returns an attribute by name.
- Parameters
-
name | [in] A pointer to the attribute name that is searched in the list. The name is an ANSI string. |
- Returns
- A pointer to the first MetaAttribute object that matches the specified name.
The caller is not required to release the returned object.
- See Also
- primo::codecs::Meta
virtual bool_t remove |
( |
int32_t |
index | ) |
|
|
pure virtual |
Removes an attribute by index.
- Parameters
-
index | [in] A zero-based index of the attribute that shall be removed. When the MetaAttribute object is removed it is released. |
- Returns
- TRUE if the attribute is successfully removed, FALSE if there's an error.
virtual bool_t setAt |
( |
int32_t |
itemIndex, |
|
|
MetaAttribute * |
attrib |
|
) |
| |
|
pure virtual |
Sets a new attribute at the specified index.
- Parameters
-
itemIndex | [in] The index in the collection where the new item shall be set. This must be a valid index in the collection. Indexing starts from 0. |
attrib | [in] A pointer to the MetaAttribute object that shall be set. It is allowed to set a NULL value to the collection. Internally the new item is retained (if not NULL), so it is safe to release it after this method returns. The old item is released (if not NULL). |
- Returns
- TRUE The item is set, FALSE otherwise.
- See Also
- Object Management