libmoost
|
#include <index_translator.hpp>
Public Types | |
typedef policies::map_policy_selector < TFrom, TTo, TMap > ::policy_type | map_policy_t |
Public Member Functions | |
index_translator () | |
index_translator (const map_policy_t &mapInitPolicy) | |
int | add (const TFrom &id) |
TTo | find_index (const TFrom &id) const |
bool | find_index (const TFrom &id, TTo &result_index) const |
TFrom | get_id (TTo index) const |
TFrom | safe_get_id (TTo index) const |
size_t | size () const |
bool | empty () const |
bool | operator() (const TFrom &id, TTo &result_index) const |
Private Attributes | |
TMap | m_item_index |
std::vector< TFrom > | m_ids |
with std::map typedef moost::container::index_translator< int, int, std::map<int, int> > idx_trans_t; with google::sparse_hash typedef moost::container::index_translator< int, int, google::sparse_hash_map<int,int> > idx_trans_t;
Definition at line 48 of file index_translator.hpp.
typedef policies::map_policy_selector<TFrom, TTo, TMap>::policy_type moost::container::index_translator< TFrom, TTo, TMap >::map_policy_t |
Definition at line 52 of file index_translator.hpp.
moost::container::index_translator< TFrom, TTo, TMap >::index_translator | ( | ) | [inline] |
moost::container::index_translator< TFrom, TTo, TMap >::index_translator | ( | const map_policy_t & | mapInitPolicy | ) | [inline] |
int moost::container::index_translator< TFrom, TTo, TMap >::add | ( | const TFrom & | id | ) | [inline] |
Definition at line 67 of file index_translator.hpp.
bool moost::container::index_translator< TFrom, TTo, TMap >::empty | ( | ) | const [inline] |
Definition at line 118 of file index_translator.hpp.
TTo moost::container::index_translator< TFrom, TTo, TMap >::find_index | ( | const TFrom & | id | ) | const [inline] |
Definition at line 81 of file index_translator.hpp.
bool moost::container::index_translator< TFrom, TTo, TMap >::find_index | ( | const TFrom & | id, |
TTo & | result_index | ||
) | const [inline] |
Definition at line 90 of file index_translator.hpp.
TFrom moost::container::index_translator< TFrom, TTo, TMap >::get_id | ( | TTo | index | ) | const [inline] |
Definition at line 100 of file index_translator.hpp.
bool moost::container::index_translator< TFrom, TTo, TMap >::operator() | ( | const TFrom & | id, |
TTo & | result_index | ||
) | const [inline] |
Definition at line 125 of file index_translator.hpp.
TFrom moost::container::index_translator< TFrom, TTo, TMap >::safe_get_id | ( | TTo | index | ) | const [inline] |
Definition at line 106 of file index_translator.hpp.
size_t moost::container::index_translator< TFrom, TTo, TMap >::size | ( | ) | const [inline] |
Definition at line 113 of file index_translator.hpp.
std::vector<TFrom> moost::container::index_translator< TFrom, TTo, TMap >::m_ids [private] |
Definition at line 131 of file index_translator.hpp.
TMap moost::container::index_translator< TFrom, TTo, TMap >::m_item_index [private] |
Definition at line 130 of file index_translator.hpp.