Go to the documentation of this file.
27 template <
typename KEY,
typename VALUE>
69 void insert(
const KEY &k,
const VALUE &v)
79 bool direct(
const KEY &k, VALUE &out_v)
const
82 if (i==
m_k2v.end())
return false;
88 inline bool hasKey(
const KEY& k)
const {
111 bool inverse(
const VALUE &v, KEY &out_k)
const
114 if (i==
m_v2k.end())
return false;
#define THROW_EXCEPTION(msg)
bool inverse(const VALUE &v, KEY &out_k) const
Get the key associated the given value, VALUE->KEY, returning false if not present.
const_iterator begin() const
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std...
std::map< KEY, VALUE > m_k2v
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const typedef Scalar * const_iterator
const_iterator_inverse find_value(const VALUE &v) const
std::map< VALUE, KEY > m_v2k
const_iterator end() const
bool hasValue(const VALUE &v) const
Return true if the given value 'v' is in the bi-map.
bool direct(const KEY &k, VALUE &out_v) const
Get the value associated the given key, KEY->VALUE, returning false if not present.
void insert(const KEY &k, const VALUE &v)
Insert a new pair KEY<->VALUE in the bi-map.
iterator_inverse find_value(const VALUE &v)
bimap()
Default constructor - does nothing.
std::map< VALUE, KEY >::const_iterator const_iterator_inverse
const_iterator_inverse inverse_end() const
bool hasKey(const KEY &k) const
Return true if the given key 'k' is in the bi-map.
VALUE direct(const KEY &k) const
Get the value associated the given key, KEY->VALUE, raising an exception if not present.
iterator_inverse inverse_end()
const_iterator find_key(const KEY &k) const
const_iterator_inverse inverse_begin() const
iterator find_key(const KEY &k)
iterator_inverse inverse_begin()
KEY inverse(const VALUE &v) const
Get the key associated the given value, VALUE->KEY, raising an exception if not present.
std::map< KEY, VALUE >::const_iterator const_iterator
const std::map< VALUE, KEY > & getInverseMap() const
Return a read-only reference to the internal map KEY->VALUES.
std::map< KEY, VALUE >::iterator iterator
const std::map< KEY, VALUE > & getDirectMap() const
Return a read-only reference to the internal map KEY->VALUES.
std::map< VALUE, KEY >::iterator iterator_inverse
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 22:32:58 UTC 2019 | | |