|
|
|
|
|
|
Modules Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages
acdk::lang::sys::core_flathashmap< K, V > Class Template Reference#include <core_hashmap.h>
List of all members.
Detailed Description
template<class K, class V>
class acdk::lang::sys::core_flathashmap< K, V >
very basic & specialized implementation of an hashmap hashmap.
- Author:
- Roger Rene Kommer This implementention is designed to store Keys and Values, which are basic types, pointers or dump structure. There are some asumptions: ((*int)(K*)) == 0 is an invalid key; Requirements: K and V: copy constructors. K: operator== V constructor V(int i = 0) int hash(const K& k);
|
Public Types |
typedef hashmap_iterator<
K, V > | iterator |
typedef acdk::lang::sys::core_pair<
K, V > | value_type |
Public Member Functions |
| core_flathashmap (int size=10, bool asmultimap=false, float treshhold=2.0) |
| intitialize it with double size of maximum expected members
|
| ~core_flathashmap () |
int | _hash (const K &k, int maxsize) |
void | put (const K &k, const V &v) |
void | insert (const value_type &v) |
bool | _put (const K &k, const V &v, container *buffer, int maxsize) |
iterator | get (const K &k) |
| in case of multimap only return first
|
bool | _isValide (int pos) |
K & | key (int pos) |
const K & | key (int pos) const |
V & | value (int pos) |
const V & | value (int pos) const |
int | capacity () const |
value_type & | get_value_type (int pos) |
const value_type & | get_value_type (int pos) const |
int | size () const |
iterator | begin () |
iterator | end () |
iterator | find (const K &key) |
void | erase (iterator it) |
void | erase (iterator it, iterator &e) |
void | eraseAll (hashmap_iterator< K, V > &it) |
| in case of multmap, erases all k
|
Protected Member Functions |
void | _destroy () |
void | _resize (int newsize) |
Private Member Functions |
| core_flathashmap (const core_flathashmap< K, V > &other) |
| doesn't allow copy construction
|
Private Attributes |
bool | _multimap |
| allows multiple entries
|
int | _size |
container * | _buffer |
float | _treshhold |
| more slots than
|
Member Typedef Documentation
Constructor & Destructor Documentation
|
doesn't allow copy construction
|
|
intitialize it with double size of maximum expected members
|
Member Function Documentation
|
in case of multmap, erases all k
|
|
in case of multimap only return first
|
Member Data Documentation
|
|