holoscan::MetadataDictionary
holoscan::MetadataDictionary
holoscan::MetadataDictionary
Class to define a metadata dictionary object.
Get a vector of the keys in the dictionary.
Provide indexing into the underlying dictionary.
Get a shared pointer to the MetadataObject corresponding to the provided key.
See the templated variant of get for a version of this method that extracts the std::any value from the MetadataObject and performs the any_cast<ValueT> operation on it.
Returns: The value corresponding to the key
Parameters
The key for the value to retrieve.
Insert a new value at the specified key (or update an existing one).
This method inserts a new item. If the key already exists, this method will have a behavior that depends on the policy (MetadataPolicy) set for this dictionary.
For this method, kInplaceUpdate behaves the same as kUpdate.
Parameters
The key for the value to insert (or update).
The value to store.
Set the metadata policy used by this MetadataDictionary.
Determine if an item already exists in the dictionary.
Returns: Returns true if the key already exists in the dictionary, false otherwise.
Parameters
The key for the value to insert (or update).
Erase an item from the dictionary.
Returns: Returns true if the key was erased and false if the key was not found.
Parameters
The key of the item to erase.
begin() iterator of the underlying dictionary
end() iterator of the underlying dictionary
find() on the underlying dictionary. Returns an iterator to the element if found, else end()
clear all values from the dictionary
return the number of items in the dictionary
swap the contents of this dictionary and other
Create a deep copy of this dictionary.
Creates a new MetadataDictionary with its own independent copy of the underlying map and MetadataObjects. This is useful when you need to store a snapshot of metadata that won’t be affected by subsequent modifications to the original.
Returns: A new MetadataDictionary with independent copies of all data
merge (move) the contents of other dictionary into this dictionary
Insert items the other dictionary into this dictionary.
Pre-existing values are not updated.
Update the dictionary with items present in other.
This method will update the dictionary with values from other. If a key already exists in this dictionary, the behavior is determined by the policy (MetadataPolicy) set for this dictionary.
For this method, kInplaceUpdate behaves the same as kUpdate.
Parameters
Metadata dictionary to copy items from
If the dictionary is shared, make a copy of it so that it is unique.