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

template<typename Item_ , typename Enum_ >
typedef ItemMap::const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::const_iterator
template<typename Item_ , typename Enum_ >
typedef ItemMap::const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::const_reference
template<typename Item_ , typename Enum_ >
typedef std_utils::EnumMap<EnumType, unsigned int> std_utils::MultiKeyContainer< Item_, Enum_ >::EnumMap
template<typename Item_ , typename Enum_ >
typedef Enum_ std_utils::MultiKeyContainer< Item_, Enum_ >::EnumType
template<typename Item_ , typename Enum_ >
typedef std::unordered_map<unsigned int, unsigned int> std_utils::MultiKeyContainer< Item_, Enum_ >::IdMap
template<typename Item_ , typename Enum_ >
typedef Item_ std_utils::MultiKeyContainer< Item_, Enum_ >::Item
template<typename Item_ , typename Enum_ >
typedef std::vector<Item_> std_utils::MultiKeyContainer< Item_, Enum_ >::ItemMap
template<typename Item_ , typename Enum_ >
typedef std::remove_pointer<Item_>::type std_utils::MultiKeyContainer< Item_, Enum_ >::ItemType
template<typename Item_ , typename Enum_ >
typedef ItemMap::iterator std_utils::MultiKeyContainer< Item_, Enum_ >::iterator
template<typename Item_ , typename Enum_ >
typedef std::vector<KeyTuple> std_utils::MultiKeyContainer< Item_, Enum_ >::KeyMap
template<typename Item_ , typename Enum_ >
typedef std::tuple<std::string, unsigned int, EnumType> std_utils::MultiKeyContainer< Item_, Enum_ >::KeyTuple
template<typename Item_ , typename Enum_ >
typedef std::unordered_map<std::string, unsigned int> std_utils::MultiKeyContainer< Item_, Enum_ >::NameMap
template<typename Item_ , typename Enum_ >
typedef ItemMap::reference std_utils::MultiKeyContainer< Item_, Enum_ >::reference
template<typename Item_ , typename Enum_ >
typedef ItemMap::size_type std_utils::MultiKeyContainer< Item_, Enum_ >::size_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

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

Member Function Documentation

template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( const std::string &  name)
inline
template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( const std::string &  name) const
inline
template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( unsigned int  id)
inline
template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( unsigned int  id) const
inline
template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( EnumType  e)
inline
template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::at ( EnumType  e) const
inline
template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::begin ( )
inline
template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::begin ( ) const
inline
template<typename Item_ , typename Enum_ >
void std_utils::MultiKeyContainer< Item_, Enum_ >::clear ( )
inlinenoexcept
template<typename Item_ , typename Enum_ >
bool std_utils::MultiKeyContainer< Item_, Enum_ >::empty ( ) const
inlinenoexcept
template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::end ( )
inline
template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::end ( ) const
inline
template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::erase ( const std::string &  name)
inline
template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::erase ( unsigned int  id)
inline
template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::erase ( const EnumType  e)
inline
template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( const std::string &  name)
inline
template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( const std::string &  name) const
inline
template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( unsigned int  id)
inline
template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( unsigned int  id) const
inline
template<typename Item_ , typename Enum_ >
iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( EnumType  e)
inline
template<typename Item_ , typename Enum_ >
const_iterator std_utils::MultiKeyContainer< Item_, Enum_ >::find ( EnumType  e) const
inline
template<typename Item_ , typename Enum_ >
EnumType std_utils::MultiKeyContainer< Item_, Enum_ >::getEnum ( unsigned int  id) const
inline
template<typename Item_ , typename Enum_ >
EnumType std_utils::MultiKeyContainer< Item_, Enum_ >::getEnum ( const std::string &  name) const
inline
template<typename Item_ , typename Enum_ >
unsigned int std_utils::MultiKeyContainer< Item_, Enum_ >::getId ( EnumType  e) const
inline
template<typename Item_ , typename Enum_ >
unsigned int std_utils::MultiKeyContainer< Item_, Enum_ >::getId ( const std::string &  name) const
inline
template<typename Item_ , typename Enum_ >
KeyTuple std_utils::MultiKeyContainer< Item_, Enum_ >::getKey ( unsigned int  id) const
inline
template<typename Item_ , typename Enum_ >
KeyTuple std_utils::MultiKeyContainer< Item_, Enum_ >::getKey ( EnumType  e) const
inline
template<typename Item_ , typename Enum_ >
KeyTuple std_utils::MultiKeyContainer< Item_, Enum_ >::getKey ( const std::string &  name) const
inline
template<typename Item_ , typename Enum_ >
const std::string& std_utils::MultiKeyContainer< Item_, Enum_ >::getName ( EnumType  e) const
inline
template<typename Item_ , typename Enum_ >
const std::string& std_utils::MultiKeyContainer< Item_, Enum_ >::getName ( unsigned int  id) const
inline
template<typename Item_ , typename Enum_ >
void std_utils::MultiKeyContainer< Item_, Enum_ >::insert ( const KeyTuple key,
const_reference  data 
)
inline
template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( const std::string &  name)
inline
template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( const std::string &  name) const
inline
template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( EnumType  e)
inline
template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( EnumType  e) const
inline
template<typename Item_ , typename Enum_ >
reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( unsigned int  id)
inline
template<typename Item_ , typename Enum_ >
const_reference std_utils::MultiKeyContainer< Item_, Enum_ >::operator[] ( unsigned int  id) const
inline
template<typename Item_ , typename Enum_ >
size_type std_utils::MultiKeyContainer< Item_, Enum_ >::size ( ) const
inline

Member Data Documentation

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

Map from enum to id of the item.

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

Map from identifier to id of the item.

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

Data container.

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

Key map.

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: