|
void BASE_IMPEXP | mrpt::utils::reduced_hash (const std::string &value, uint8_t &hash) |
| hash function used by ts_hash_map. Uses dbj2 method More...
|
|
void BASE_IMPEXP | mrpt::utils::reduced_hash (const std::string &value, uint16_t &hash) |
| hash function used by ts_hash_map. Uses dbj2 method More...
|
|
void BASE_IMPEXP | mrpt::utils::reduced_hash (const std::string &value, uint32_t &hash) |
| hash function used by ts_hash_map. Uses dbj2 method More...
|
|
void BASE_IMPEXP | mrpt::utils::reduced_hash (const std::string &value, uint64_t &hash) |
| hash function used by ts_hash_map. Uses dbj2 method More...
|
|
template<typename KEY , typename VALUE , unsigned int NUM_BYTES_HASH_TABLE = 1, unsigned int NUM_HAS_TABLE_COLLISIONS_ALLOWED = 5, typename VECTOR_T = mrpt::utils::CArray< mrpt::utils::CArray<ts_map_entry<KEY,VALUE>, NUM_HAS_TABLE_COLLISIONS_ALLOWED>, 1u << (8*NUM_BYTES_HASH_TABLE)> > class ts_hash_map { public: typedef ts_hash_map<KEY, VALUE, NUM_BYTES_HASH_TABLE, NUM_HAS_TABLE_COLLISIONS_ALLOWED, VECTOR_T> self_t; typedef KEY key_type; typedef ts_map_entry<KEY,VALUE> value_type; typedef VECTOR_T vec_t; struct iterator; struct const_iterator { public: const_iterator() : m_vec(NULL), m_parent(NULL), m_idx_outer(0), m_idx_inner(0) {} const_iterator(const VECTOR_T &vec, const self_t &parent, int idx_outer, int idx_inner) : m_vec(const_cast<VECTOR_T*>(&vec)), m_parent(const_cast<self_t*>(&parent)), m_idx_outer(idx_outer), m_idx_inner(idx_inner) {} const_iterator & operator = (const const_iterator& o) { m_vec = o.m_vec; m_idx_outer = o.m_idx_outer; m_idx_inner = o.m_idx_inner; return *this; } bool operator == (const const_iterator& o) const { return m_vec == o.m_vec && m_idx_outer == o.m_idx_outer && m_idx_inner == o.m_idx_inner; } bool operator != (const const_iterator& o) const { return !(*this==o); } const value_type & operator *() const { return (*m_vec)[m_idx_outer][m_idx_inner]; } const value_type * operator ->() const { return &(*m_vec)[m_idx_outer][m_idx_inner]; } inline const_iterator operator ++(int) { const_iterator aux = *this; ++(*this); return aux; } inline const_iterator& operator ++() { incr(); return *this; } protected: VECTOR_T *m_vec; self_t *m_parent; int m_idx_outer> |
iterator | mrpt::utils::operator++ (int) |
| A thread-safe (ts) container which minimally emulates a std::map<>'s [] and find() methods but which is implemented as a linear vector indexed by a hash of KEY. More...
|
|
iterator & | mrpt::utils::operator++ () |
|
|
| mrpt::utils::ts_hash_map () |
| < Default constructor */ More...
|
|
void | mrpt::utils::clear () |
| Clear the contents of this container. More...
|
|
bool | mrpt::utils::empty () const |
|
VALUE & | mrpt::utils::operator[] (const KEY &key) |
| Write/read via [i] operator, that creates an element if it didn't exist already. More...
|
|
const_iterator | mrpt::utils::find (const KEY &key) const |
|
const_iterator | mrpt::utils::begin () const |
|
const_iterator | mrpt::utils::end () const |
|