CVC3  2.4.1
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
Hash::hash_table Class Reference

#include <hash_table.h>

List of all members.

Classes

Public Types

Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes

Friends


Detailed Description

template to instante to hash map and hash set

based on the sgi implementation: http://www.sgi.com/tech/stl/HashedAssociativeContainer.html

_Key: hash key type _Data: key + value data to store _HashFcn: functional class providing a hash function: int(_Key) Note: in some STL implementations hash is already part of some extension an in namespace std or stdext, in some it is not. So we assume that it is not available. :TODO: _EqualKey: functional class providing a comparison function: bool(_Key, _Key) returns true iff two keys are considered to be equal _ExtractKey: extracts key from _Data: _Key(_Data)


Member Typedef Documentation

types

Definition at line 127 of file hash_table.h.

Definition at line 128 of file hash_table.h.

Definition at line 129 of file hash_table.h.

typedef _HashFcn Hash::hash_table::hasher

Definition at line 130 of file hash_table.h.

typedef _EqualKey Hash::hash_table::key_equal

Definition at line 131 of file hash_table.h.

typedef BucketNode Hash::hash_table::Bucket [protected]

Definition at line 147 of file hash_table.h.

typedef std::vector<Bucket*> Hash::hash_table::Data [protected]

Definition at line 150 of file hash_table.h.

typedef Data::iterator Hash::hash_table::data_iter [protected]

Definition at line 151 of file hash_table.h.

typedef Data::const_iterator Hash::hash_table::data_const_iter [protected]

Definition at line 152 of file hash_table.h.


Constructor & Destructor Documentation

Hash::hash_table::hash_table ( ) [inline]

constructors

Definition at line 277 of file hash_table.h.

Hash::hash_table::hash_table ( size_type  initial_capacity) [inline]

Definition at line 285 of file hash_table.h.

Hash::hash_table::hash_table ( size_type  initial_capacity,
const _HashFcn &  hash 
) [inline]

Definition at line 293 of file hash_table.h.

Hash::hash_table::hash_table ( size_type  initial_capacity,
const _HashFcn &  hash,
const _EqualKey &  equal 
) [inline]

Definition at line 301 of file hash_table.h.

Hash::hash_table::hash_table ( const hash_table other) [inline]

Definition at line 310 of file hash_table.h.

Hash::hash_table::~hash_table ( ) [inline]

Definition at line 317 of file hash_table.h.


Member Function Documentation

size_type Hash::hash_table::hash ( const key_type key) const [inline, protected]
bool Hash::hash_table::equal ( const key_type key1,
const key_type key2 
) const [inline, protected]
const key_type& Hash::hash_table::extractKey ( const value_type value) const [inline, protected]
size_type Hash::hash_table::getBucketIndex ( const key_type key) const [inline, protected]
Bucket* Hash::hash_table::getBucketByKey ( const key_type key) [inline, protected]
const Bucket* Hash::hash_table::getBucketByKey ( const key_type key) const [inline, protected]

Definition at line 221 of file hash_table.h.

Bucket* Hash::hash_table::getBucketByIndex ( const size_type  index) [inline, protected]
const Bucket* Hash::hash_table::getBucketByIndex ( const size_type  index) const [inline, protected]

Definition at line 230 of file hash_table.h.

void Hash::hash_table::resize ( ) [inline, protected]
hash_table& Hash::hash_table::operator= ( const hash_table other) [inline]

Definition at line 322 of file hash_table.h.

void Hash::hash_table::assignTable ( const Data data) [inline]
void Hash::hash_table::swap ( hash_table other) [inline]
void Hash::hash_table::init ( ) [inline]
void Hash::hash_table::clear ( ) [inline]
iterator Hash::hash_table::find ( const key_type key) [inline]
const_iterator Hash::hash_table::find ( const key_type key) const [inline]

Definition at line 416 of file hash_table.h.

std::pair<iterator, bool> Hash::hash_table::insert ( const value_type value) [inline]
value_type& Hash::hash_table::find_or_insert ( const value_type value) [inline]

Definition at line 451 of file hash_table.h.

Referenced by Hash::hash_map< long, int >::operator[]().

size_type Hash::hash_table::erase ( const key_type key) [inline]
const_iterator Hash::hash_table::erase ( const const_iterator iter) [inline]

Definition at line 504 of file hash_table.h.

bool Hash::hash_table::contains ( const key_type key) const [inline]
size_type Hash::hash_table::count ( const _Key &  key) const [inline]
bool Hash::hash_table::empty ( ) const [inline]
size_type Hash::hash_table::size ( ) const [inline]
size_type Hash::hash_table::bucket_count ( ) const [inline]
float Hash::hash_table::load_factor ( ) const [inline]
iterator Hash::hash_table::begin ( ) [inline]
const_iterator Hash::hash_table::begin ( ) const [inline]

Definition at line 595 of file hash_table.h.

iterator Hash::hash_table::end ( ) [inline]
const_iterator Hash::hash_table::end ( ) const [inline]

Definition at line 617 of file hash_table.h.


Friends And Related Function Documentation

friend class iterator [friend]
friend class const_iterator [friend]

Member Data Documentation

_ExtractKey Hash::hash_table::d_extractKey [protected]

The documentation for this class was generated from the following file: