LocalGuidance
A library that generates velocity references to follow a path.
std_utils::MultiKeyContainer< Item_, Enum_ > Class Template Reference

#include <MultiKeyContainer.hpp>

Public Types

typedef Item_ Item
 
typedef std::remove_pointer< Item_ >::type ItemType
 
typedef std::vector< Item_ > ItemMap
 
typedef Enum_ EnumType
 
typedef std::tuple< std::string, unsigned int, EnumTypeKeyTuple
 
typedef std::vector< KeyTupleKeyMap
 
typedef std::unordered_map< std::string, unsigned int > NameMap
 
typedef std::unordered_map< unsigned int, unsigned int > IdMap
 
typedef std_utils::EnumMap< EnumType, unsigned int > EnumMap
 
typedef std::integral_constant< bool, std::is_pointer< Item_ >::value > truth_type
 
typedef ItemMap::size_type size_type
 
typedef ItemMap::iterator iterator
 
typedef ItemMap::const_iterator const_iterator
 
typedef ItemMap::const_reference const_reference
 
typedef ItemMap::reference reference
 

Public Member Functions

 MultiKeyContainer ()
 
virtual ~MultiKeyContainer ()
 
reference operator[] (const std::string &name)
 
const_reference operator[] (const std::string &name) const
 
reference operator[] (EnumType e)
 
const_reference operator[] (EnumType e) const
 
reference operator[] (unsigned int id)
 
const_reference operator[] (unsigned int id) const
 
reference at (const std::string &name)
 
const_reference at (const std::string &name) const
 
reference at (unsigned int id)
 
const_reference at (unsigned int id) const
 
reference at (EnumType e)
 
const_reference at (EnumType e) const
 
iterator find (const std::string &name)
 
const_iterator find (const std::string &name) const
 
iterator find (unsigned int id)
 
const_iterator find (unsigned int id) const
 
iterator find (EnumType e)
 
const_iterator find (EnumType e) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
size_type size () const
 
void insert (const KeyTuple &key, const_reference data)
 
size_type erase (const std::string &name)
 
size_type erase (unsigned int id)
 
size_type erase (const EnumType e)
 
void clear () noexcept
 
bool empty () const noexcept
 
EnumType getEnum (unsigned int id) const
 
EnumType getEnum (const std::string &name) const
 
const std::string & getName (EnumType e) const
 
const std::string & getName (unsigned int id) const
 
unsigned int getId (EnumType e) const
 
unsigned int getId (const std::string &name) const
 
KeyTuple getKey (unsigned int id) const
 
KeyTuple getKey (EnumType e) const
 
KeyTuple getKey (const std::string &name) const
 

Protected Attributes

ItemMap itemMap_
 Data container. More...
 
KeyMap keyMap_
 Key map. More...
 
IdMap idMap_
 Map from identifier to id of the item. More...
 
NameMap nameMap_
 Map from name to id of the item. More...
 
EnumMap enumMap_
 Map from enum to id of the item. More...
 

Member Typedef Documentation

◆ const_iterator

template<typename Item_ , typename Enum_ >
typedef ItemMap::const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::const_iterator

◆ const_reference

template<typename Item_ , typename Enum_ >
typedef ItemMap::const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::const_reference

◆ EnumMap

template<typename Item_ , typename Enum_ >
typedef std_utils::EnumMap<EnumType, unsigned int> std_utils::MultiKeyContainer< Item_, Enum_ >::EnumMap

◆ EnumType

template<typename Item_ , typename Enum_ >
typedef Enum_ std_utils::MultiKeyContainer< Item_, Enum_ >::EnumType

◆ IdMap

template<typename Item_ , typename Enum_ >
typedef std::unordered_map<unsigned int, unsigned int> std_utils::MultiKeyContainer< Item_, Enum_ >::IdMap

◆ Item

template<typename Item_ , typename Enum_ >
typedef Item_ std_utils::MultiKeyContainer< Item_, Enum_ >::Item

◆ ItemMap

template<typename Item_ , typename Enum_ >
typedef std::vector<Item_> std_utils::MultiKeyContainer< Item_, Enum_ >::ItemMap

◆ ItemType

template<typename Item_ , typename Enum_ >
typedef std::remove_pointer<Item_>::type std_utils::MultiKeyContainer< Item_, Enum_ >::ItemType

◆ iterator

template<typename Item_ , typename Enum_ >
typedef ItemMap::iterator std_utils::MultiKeyContainer< Item_, Enum_ >::iterator

◆ KeyMap

template<typename Item_ , typename Enum_ >
typedef std::vector<KeyTuple> std_utils::MultiKeyContainer< Item_, Enum_ >::KeyMap

◆ KeyTuple

template<typename Item_ , typename Enum_ >
typedef std::tuple<std::string, unsigned int, EnumType> std_utils::MultiKeyContainer< Item_, Enum_ >::KeyTuple

◆ NameMap

template<typename Item_ , typename Enum_ >
typedef std::unordered_map<std::string, unsigned int> std_utils::MultiKeyContainer< Item_, Enum_ >::NameMap

◆ reference

template<typename Item_ , typename Enum_ >
typedef ItemMap::reference std_utils::MultiKeyContainer< Item_, Enum_ >::reference

◆ size_type

template<typename Item_ , typename Enum_ >
typedef ItemMap::size_type std_utils::MultiKeyContainer< Item_, Enum_ >::size_type

◆ truth_type

template<typename Item_ , typename Enum_ >
typedef std::integral_constant<bool, std::is_pointer<Item_>::value> std_utils::MultiKeyContainer< Item_, Enum_ >::truth_type

Constructor & Destructor Documentation

◆ MultiKeyContainer()

template<typename Item_ , typename Enum_ >
std_utils::MultiKeyContainer< Item_, Enum_ >::MultiKeyContainer ( )
inline

◆ ~MultiKeyContainer()

template<typename Item_ , typename Enum_ >
virtual std_utils::MultiKeyContainer< Item_, Enum_ >::~MultiKeyContainer ( )
inlinevirtual

Member Function Documentation

◆ at() [1/6]

template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( const std::string &  name)
inline

◆ at() [2/6]

template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( const std::string &  name) const
inline

◆ at() [3/6]

template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( unsigned int  id)
inline

◆ at() [4/6]

template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( unsigned int  id) const
inline

◆ at() [5/6]

template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( EnumType  e)
inline

◆ at() [6/6]

template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( EnumType  e) const
inline

◆ begin() [1/2]

template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::begin ( )
inline

◆ begin() [2/2]

template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::begin ( ) const
inline

◆ clear()

template<typename Item_ , typename Enum_ >
void std_utils::MultiKeyContainer< Item_, Enum_ >::clear ( )
inlinenoexcept

◆ empty()

template<typename Item_ , typename Enum_ >
bool std_utils::MultiKeyContainer< Item_, Enum_ >::empty ( ) const
inlinenoexcept

◆ end() [1/2]

template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::end ( )
inline

◆ end() [2/2]

template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::end ( ) const
inline

◆ erase() [1/3]

template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::erase ( const std::string &  name)
inline

◆ erase() [2/3]

template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::erase ( unsigned int  id)
inline

◆ erase() [3/3]

template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::erase ( const EnumType  e)
inline

◆ find() [1/6]

template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( const std::string &  name)
inline

◆ find() [2/6]

template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( const std::string &  name) const
inline

◆ find() [3/6]

template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( unsigned int  id)
inline

◆ find() [4/6]

template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( unsigned int  id) const
inline

◆ find() [5/6]

template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( EnumType  e)
inline

◆ find() [6/6]

template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( EnumType  e) const
inline

◆ getEnum() [1/2]

template<typename Item_ , typename Enum_ >
EnumType std_utils::MultiKeyContainer< Item_, Enum_ >::getEnum ( unsigned int  id) const
inline

◆ getEnum() [2/2]

template<typename Item_ , typename Enum_ >
EnumType std_utils::MultiKeyContainer< Item_, Enum_ >::getEnum ( const std::string &  name) const
inline

◆ getId() [1/2]

template<typename Item_ , typename Enum_ >
unsigned int std_utils::MultiKeyContainer< Item_, Enum_ >::getId ( EnumType  e) const
inline

◆ getId() [2/2]

template<typename Item_ , typename Enum_ >
unsigned int std_utils::MultiKeyContainer< Item_, Enum_ >::getId ( const std::string &  name) const
inline

◆ getKey() [1/3]

template<typename Item_ , typename Enum_ >
KeyTuple std_utils::MultiKeyContainer< Item_, Enum_ >::getKey ( unsigned int  id) const
inline

◆ getKey() [2/3]

template<typename Item_ , typename Enum_ >
KeyTuple std_utils::MultiKeyContainer< Item_, Enum_ >::getKey ( EnumType  e) const
inline

◆ getKey() [3/3]

template<typename Item_ , typename Enum_ >
KeyTuple std_utils::MultiKeyContainer< Item_, Enum_ >::getKey ( const std::string &  name) const
inline

◆ getName() [1/2]

template<typename Item_ , typename Enum_ >
const std::string& std_utils::MultiKeyContainer< Item_, Enum_ >::getName ( EnumType  e) const
inline

◆ getName() [2/2]

template<typename Item_ , typename Enum_ >
const std::string& std_utils::MultiKeyContainer< Item_, Enum_ >::getName ( unsigned int  id) const
inline

◆ insert()

template<typename Item_ , typename Enum_ >
void std_utils::MultiKeyContainer< Item_, Enum_ >::insert ( const KeyTuple key,
const_reference  data 
)
inline

◆ operator[]() [1/6]

template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( const std::string &  name)
inline

◆ operator[]() [2/6]

template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( const std::string &  name) const
inline

◆ operator[]() [3/6]

template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( EnumType  e)
inline

◆ operator[]() [4/6]

template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( EnumType  e) const
inline

◆ operator[]() [5/6]

template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( unsigned int  id)
inline

◆ operator[]() [6/6]

template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( unsigned int  id) const
inline

◆ size()

template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::size ( ) const
inline

Member Data Documentation

◆ enumMap_

template<typename Item_ , typename Enum_ >
EnumMap std_utils::MultiKeyContainer< Item_, Enum_ >::enumMap_
protected

Map from enum to id of the item.

◆ idMap_

template<typename Item_ , typename Enum_ >
IdMap std_utils::MultiKeyContainer< Item_, Enum_ >::idMap_
protected

Map from identifier to id of the item.

◆ itemMap_

template<typename Item_ , typename Enum_ >
ItemMap std_utils::MultiKeyContainer< Item_, Enum_ >::itemMap_
protected

Data container.

◆ keyMap_

template<typename Item_ , typename Enum_ >
KeyMap std_utils::MultiKeyContainer< Item_, Enum_ >::keyMap_
protected

Key map.

◆ nameMap_

template<typename Item_ , typename Enum_ >
NameMap std_utils::MultiKeyContainer< Item_, Enum_ >::nameMap_
protected

Map from name to id of the item.


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