libmoost
|
#include <hash_multimap.hpp>
Classes | |
class | writer |
Public Types | |
typedef Key | key_type |
typedef T | mapped_type |
typedef pod_pair< Key, T > | value_type |
typedef const value_type * | const_iterator |
typedef size_t | size_type |
typedef const T & | const_reference |
typedef const T * | const_pointer |
typedef IndexType | index_type |
typedef std::bidirectional_iterator_tag | iterator_category |
Public Member Functions | |
mmd_hash_multimap () | |
mmd_hash_multimap (const memory_mapped_dataset &mmd, const std::string &name) | |
void | set (const memory_mapped_dataset &mmd, const std::string &name) |
size_type | hash_bits () const |
void | warm_cache () const |
const_iterator | begin () const |
const_iterator | end () const |
size_type | size () const |
bool | empty () const |
const_iterator | lower_bound (const key_type &x) const |
Static Public Attributes | |
static const size_t | MMD_HASH_ALIGNMENT = 16 |
static const size_t | MMD_HASH_BITS = 10 |
Private Member Functions | |
BOOST_STATIC_ASSERT_MSG (boost::is_pod< Key >::value,"mmd_hash_multimap<> template can only handle POD key types") | |
BOOST_STATIC_ASSERT_MSG (boost::is_pod< T >::value,"mmd_hash_multimap<> template can only handle POD value types") | |
Static Private Member Functions | |
static bool | compare (const value_type &a, const value_type &b) |
Private Attributes | |
const index_type * | m_index |
size_t | m_hash_mask |
const_iterator | m_begin |
const_iterator | m_end |
size_type | m_hash_bits |
Memory-mapped dataset section representing a POD hash multimap
This is a little more versatile than the mmd_vector if you're really looking for fast lookup by a key instead of lookup by index.
It is supposed to offer faster lookup than the non-hashed map at the expense of not having the key-value pairs in a deterministic order when iterating over the map.
Definition at line 56 of file hash_multimap.hpp.
typedef const value_type* moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::const_iterator |
Definition at line 69 of file hash_multimap.hpp.
typedef const T* moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::const_pointer |
Definition at line 73 of file hash_multimap.hpp.
typedef const T& moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::const_reference |
Definition at line 72 of file hash_multimap.hpp.
typedef IndexType moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::index_type |
Definition at line 75 of file hash_multimap.hpp.
typedef std::bidirectional_iterator_tag moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::iterator_category |
Definition at line 77 of file hash_multimap.hpp.
typedef Key moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::key_type |
Definition at line 65 of file hash_multimap.hpp.
typedef T moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::mapped_type |
Definition at line 66 of file hash_multimap.hpp.
typedef size_t moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::size_type |
Definition at line 70 of file hash_multimap.hpp.
typedef pod_pair<Key, T> moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::value_type |
Definition at line 67 of file hash_multimap.hpp.
moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::mmd_hash_multimap | ( | ) | [inline] |
Definition at line 151 of file hash_multimap.hpp.
moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::mmd_hash_multimap | ( | const memory_mapped_dataset & | mmd, |
const std::string & | name | ||
) | [inline] |
Definition at line 160 of file hash_multimap.hpp.
const_iterator moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::begin | ( | ) | const [inline] |
Definition at line 210 of file hash_multimap.hpp.
moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::BOOST_STATIC_ASSERT_MSG | ( | boost::is_pod< Key >::value | , |
"mmd_hash_multimap<> template can only handle POD key types" | |||
) | [private] |
moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::BOOST_STATIC_ASSERT_MSG | ( | boost::is_pod< T >::value | , |
"mmd_hash_multimap<> template can only handle POD value types" | |||
) | [private] |
static bool moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::compare | ( | const value_type & | a, |
const value_type & | b | ||
) | [inline, static, private] |
bool moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::empty | ( | ) | const [inline] |
const_iterator moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::end | ( | ) | const [inline] |
Definition at line 215 of file hash_multimap.hpp.
size_type moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::hash_bits | ( | ) | const [inline] |
const_iterator moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::lower_bound | ( | const key_type & | x | ) | const [inline] |
void moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::set | ( | const memory_mapped_dataset & | mmd, |
const std::string & | name | ||
) | [inline] |
size_type moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::size | ( | ) | const [inline] |
void moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::warm_cache | ( | ) | const [inline] |
Definition at line 205 of file hash_multimap.hpp.
const_iterator moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::m_begin [private] |
Definition at line 250 of file hash_multimap.hpp.
const_iterator moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::m_end [private] |
Definition at line 251 of file hash_multimap.hpp.
size_type moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::m_hash_bits [private] |
Definition at line 252 of file hash_multimap.hpp.
size_t moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::m_hash_mask [private] |
Definition at line 249 of file hash_multimap.hpp.
const index_type* moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::m_index [private] |
Definition at line 248 of file hash_multimap.hpp.
const size_t moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::MMD_HASH_ALIGNMENT = 16 [static] |
Definition at line 62 of file hash_multimap.hpp.
const size_t moost::container::mmd_hash_multimap< Key, T, HashFcn, IndexType >::MMD_HASH_BITS = 10 [static] |
Definition at line 63 of file hash_multimap.hpp.