Gazebo Rendering

API Reference

9.0.0

#include <BaseStorage.hh>

Public Member Functions

 BaseMap ()
 
virtual ~BaseMap ()
 
virtual bool ContainsKey (const std::string &_key) const
 Determine if an elements is mapped to the given key.
 
virtual bool ContainsValue (ConstTPtr _value) const
 Determine if the given element exists in this map.
 
virtual UPtr Derived (const std::string &_key) const
 
virtual UPtr DerivedByIndex (unsigned int _index) const
 
virtual TPtr Get (const std::string &_key) const
 Get the element mapped to the given key.
 
virtual TPtr GetByIndex (unsigned int _index) const
 Get the element at the given index.
 
virtual bool Put (const std::string &_key, TPtr _value)
 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)
 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)
 Remove the given element. If the given element does not exist no work will be done.
 
virtual void RemoveAll ()
 Remove all elements from this map.
 
virtual unsigned int Size () const
 Get the number of elements in this map.
 
- Public Member Functions inherited from Map< T >
virtual ~Map ()=default
 Destructor.
 

Protected Member Functions

virtual bool IsValidIter (ConstUIter _iter) const
 

Protected Attributes

UMap map
 

Constructor & Destructor Documentation

◆ BaseMap()

template<class T , class U >
BaseMap ( )

◆ ~BaseMap()

template<class T , class U >
~BaseMap ( )
virtual

Member Function Documentation

◆ ContainsKey()

template<class T , class U >
bool ContainsKey ( const std::string _key) const
virtual

Determine if an elements is mapped to the given key.

Parameters
[in]_keyKey of the element in question
Returns
True if an elements is mapped to the given key

Implements Map< T >.

◆ ContainsValue()

template<class T , class U >
bool ContainsValue ( ConstTPtr  _value) const
virtual

Determine if the given element exists in this map.

Parameters
[in]_valueElement in question
Returns
True if the given element exists in this map

Implements Map< T >.

◆ Derived()

template<class T , class U >
BaseMap< T, U >::UPtr Derived ( const std::string _key) const
virtual

◆ DerivedByIndex()

template<class T , class U >
BaseMap< T, U >::UPtr DerivedByIndex ( unsigned int  _index) const
virtual

References std::advance(), std::endl(), and gzerr.

◆ Get()

template<class T , class U >
BaseMap< T, U >::TPtr Get ( const std::string _key) const
virtual

Get the element mapped to the given key.

Parameters
[in]_keyKey of the element in question
Returns
The element mapped to the given key

Implements Map< T >.

◆ GetByIndex()

template<class T , class U >
BaseMap< T, U >::TPtr GetByIndex ( unsigned int  _index) const
virtual

Get the element at the given index.

Parameters
[in]_indexIndex of the element in question
Returns
The element at the given index

Implements Map< T >.

◆ IsValidIter()

template<class T , class U >
bool IsValidIter ( ConstUIter  _iter) const
protectedvirtual

◆ Put()

template<class T , class U >
bool Put ( const std::string _key,
TPtr  _value 
)
virtual

Map to given element to the given key. If the given key is already in use, no work will be done.

Parameters
[in]_keyKey of the new element
[in]_valueElement to be mapped
Returns
True if successful

Implements Map< T >.

References std::dynamic_pointer_cast(), string::empty(), std::endl(), and gzerr.

◆ Remove() [1/2]

template<class T , class U >
void Remove ( const std::string _key)
virtual

Remove the element mapped to the given key. If the specified element does not exists, no work will be done.

Parameters
[in]_keyKey of the element in question

Implements Map< T >.

◆ Remove() [2/2]

template<class T , class U >
void Remove ( TPtr  _value)
virtual

Remove the given element. If the given element does not exist no work will be done.

Parameters
[in]_valueKey of the element in question

Implements Map< T >.

◆ RemoveAll()

template<class T , class U >
void RemoveAll ( )
virtual

Remove all elements from this map.

Implements Map< T >.

◆ Size()

template<class T , class U >
unsigned int Size ( ) const
virtual

Get the number of elements in this map.

Returns
The number of elements in this map

Implements Map< T >.

Member Data Documentation

◆ map

template<class T , class U >
UMap map
protected

The documentation for this class was generated from the following file: