|
|
This class is pretty much similar to a map. More...
#include <ArmarXCore/util/CPPUtility/KeyValueVector.h>
Public Types | |
| using | const_iterator = typename ValContT::const_iterator |
| using | iterator = typename ValContT::iterator |
Public Member Functions | |
| void | add (KeyT key, ValT value) |
| ValT & | at (const KeyT &k) |
| ValT const & | at (const KeyT &k) const |
| ValT const & | at (const KeyT &k, const ValT &defaultVal) const |
| ValT & | at (const KeyT &k, ValT &defaultVal) |
| ValT & | at (IdxT i) |
| ValT const & | at (IdxT i) const |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| void | clear () |
| IdxT | count (const KeyT &k) const |
| iterator | end () |
| const_iterator | end () const |
| bool | has (const KeyT &k) const |
| IdxT | index (const KeyT &k) const |
| MapT const & | indices () const |
| KeyContT const & | keys () const |
| IdxT | size () const |
| ValContT const & | values () const |
This class is pretty much similar to a map.
This class stores keys and values in two vectors and uses a map to map the keys to the index of the corresponding value This enables map acces and index access. The index of an inserted element never changes (this is different to a map). Index access may be required in a high frequency case (e.g. an rt control loop)
| using const_iterator = typename ValContT::const_iterator |
| using iterator = typename ValContT::iterator |
| void add | ( | KeyT | key, |
| ValT | value ) |
| ValT & at | ( | const KeyT & | k | ) |
| const ValT & at | ( | const KeyT & | k | ) | const |
| const ValT & at | ( | const KeyT & | k, |
| const ValT & | defaultVal ) const |
| ValT & at | ( | const KeyT & | k, |
| ValT & | defaultVal ) |
| ValT & at | ( | IdxT | i | ) |
| const ValT & at | ( | IdxT | i | ) | const |
| KeyValueVector< KeyT, ValT, KeyContT, ValContT, IdxT, MapT >::iterator begin | ( | ) |
| KeyValueVector< KeyT, ValT, KeyContT, ValContT, IdxT, MapT >::const_iterator begin | ( | ) | const |
| KeyValueVector< KeyT, ValT, KeyContT, ValContT, IdxT, MapT >::const_iterator cbegin | ( | ) | const |
| KeyValueVector< KeyT, ValT, KeyContT, ValContT, IdxT, MapT >::const_iterator cend | ( | ) | const |
| void clear | ( | ) |
| IdxT count | ( | const KeyT & | k | ) | const |
| KeyValueVector< KeyT, ValT, KeyContT, ValContT, IdxT, MapT >::iterator end | ( | ) |
| KeyValueVector< KeyT, ValT, KeyContT, ValContT, IdxT, MapT >::const_iterator end | ( | ) | const |
| bool has | ( | const KeyT & | k | ) | const |
| IdxT index | ( | const KeyT & | k | ) | const |
| const MapT & indices | ( | ) | const |
| const KeyContT & keys | ( | ) | const |
| IdxT size | ( | ) | const |
| const ValContT & values | ( | ) | const |