Storage map from std::string to template class T. More...
#include <gz/rendering/Storage.hh>
Public Member Functions | |
virtual | ~Map ()=default |
Destructor. | |
virtual bool | ContainsKey (const std::string &_key) const =0 |
Determine if an elements is mapped to the given key. | |
virtual bool | ContainsValue (ConstTPtr _value) const =0 |
Determine if the given element exists in this map. | |
virtual TPtr | Get (const std::string &_key) const =0 |
Get the element mapped to the given key. | |
virtual TPtr | GetByIndex (unsigned int _index) const =0 |
Get the element at the given index. | |
virtual bool | Put (const std::string &_key, TPtr _value)=0 |
Map to given element to the given key. If the given key is already in use, no work will be done. | |
virtual void | Remove (const std::string &_key)=0 |
Remove the element mapped to the given key. If the specified element does not exists, no work will be done. | |
virtual void | Remove (TPtr _value)=0 |
Remove the given element. If the given element does not exist no work will be done. | |
virtual void | RemoveAll ()=0 |
Remove all elements from this map. | |
virtual unsigned int | Size () const =0 |
Get the number of elements in this map. | |
Detailed Description
class gz::rendering::Map< T >
Storage map from std::string to template class T.
- Template Parameters
-
T The storage element type
Constructor & Destructor Documentation
◆ ~Map()
|
virtualdefault |
Destructor.
Member Function Documentation
◆ ContainsKey()
|
pure virtual |
Determine if an elements is mapped to the given key.
- Parameters
-
[in] _key Key of the element in question
- Returns
- True if an elements is mapped to the given key
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ ContainsValue()
|
pure virtual |
Determine if the given element exists in this map.
- Parameters
-
[in] _value Element in question
- Returns
- True if the given element exists in this map
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ Get()
|
pure virtual |
Get the element mapped to the given key.
- Parameters
-
[in] _key Key of the element in question
- Returns
- The element mapped to the given key
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ GetByIndex()
|
pure virtual |
Get the element at the given index.
- Parameters
-
[in] _index Index of the element in question
- Returns
- The element at the given index
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ Put()
|
pure virtual |
Map to given element to the given key. If the given key is already in use, no work will be done.
- Parameters
-
[in] _key Key of the new element [in] _value Element to be mapped
- Returns
- True if successful
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ Remove() [1/2]
|
pure virtual |
Remove the element mapped to the given key. If the specified element does not exists, no work will be done.
- Parameters
-
[in] _key Key of the element in question
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ Remove() [2/2]
|
pure virtual |
Remove the given element. If the given element does not exist no work will be done.
- Parameters
-
[in] _value Key of the element in question
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ RemoveAll()
|
pure virtual |
Remove all elements from this map.
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
◆ Size()
|
pure virtual |
Get the number of elements in this map.
- Returns
- The number of elements in this map
Implemented in BaseMap< T, U >, and BaseMap< Material, T >.
The documentation for this class was generated from the following file: