MADNESS  version 0.9
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
madness::ConcurrentHashMap< keyT, valueT, hashfunT > Class Template Reference

#include <worldhashmap.h>

Collaboration diagram for madness::ConcurrentHashMap< keyT, valueT, hashfunT >:
Collaboration graph
[legend]

Public Types

typedef ConcurrentHashMap
< keyT, valueT, hashfunT > 
hashT
 
typedef std::pair< const keyT,
valueT > 
datumT
 
typedef Hash_private::entry
< keyT, valueT > 
entryT
 
typedef Hash_private::bin
< keyT, valueT > 
binT
 
typedef
Hash_private::HashIterator
< hashT
iterator
 
typedef
Hash_private::HashIterator
< const hashT
const_iterator
 
typedef
Hash_private::HashAccessor
< hashT, entryT::WRITELOCK
accessor
 
typedef
Hash_private::HashAccessor
< const hashT,
entryT::READLOCK
const_accessor
 

Public Member Functions

 ConcurrentHashMap (int n=1021, const hashfunT &hf=hashfunT())
 
 ConcurrentHashMap (const hashT &h)
 
virtual ~ConcurrentHashMap ()
 
hashToperator= (const hashT &h)
 
std::pair< iterator, bool > insert (const datumT &datum)
 
bool insert (accessor &result, const datumT &datum)
 Returns true if new pair was inserted; false if key is already in the map and the datum was not inserted. More...
 
bool insert (const_accessor &result, const datumT &datum)
 Returns true if new pair was inserted; false if key is already in the map and the datum was not inserted. More...
 
bool insert (accessor &result, const keyT &key)
 Returns true if new pair was inserted; false if key is already in the map. More...
 
bool insert (const_accessor &result, const keyT &key)
 Returns true if new pair was inserted; false if key is already in the map. More...
 
std::size_t erase (const keyT &key)
 
void erase (const iterator &it)
 
void erase (accessor &item)
 
void erase (const_accessor &item)
 
iterator find (const keyT &key)
 
const_iterator find (const keyT &key) const
 
bool find (accessor &result, const keyT &key)
 
bool find (const_accessor &result, const keyT &key) const
 
void clear ()
 
size_t size () const
 
valueT & operator[] (const keyT &key)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
hashfunT & get_hash () const
 
void print_stats () const
 

Protected Attributes

const size_t nbins
 
binTbins
 

Friends

class Hash_private::HashIterator< hashT >
 
class Hash_private::HashIterator< const hashT >
 

Member Typedef Documentation

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef Hash_private::HashAccessor<hashT,entryT::WRITELOCK> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::accessor
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef Hash_private::bin<keyT,valueT> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::binT
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef Hash_private::HashAccessor<const hashT,entryT::READLOCK> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::const_accessor
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef Hash_private::HashIterator<const hashT> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::const_iterator
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef std::pair<const keyT,valueT> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::datumT
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef Hash_private::entry<keyT,valueT> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::entryT
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef ConcurrentHashMap<keyT,valueT,hashfunT> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::hashT
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
typedef Hash_private::HashIterator<hashT> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::iterator

Constructor & Destructor Documentation

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
madness::ConcurrentHashMap< keyT, valueT, hashfunT >::ConcurrentHashMap ( int  n = 1021,
const hashfunT &  hf = hashfunT() 
)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
madness::ConcurrentHashMap< keyT, valueT, hashfunT >::ConcurrentHashMap ( const hashT h)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
virtual madness::ConcurrentHashMap< keyT, valueT, hashfunT >::~ConcurrentHashMap ( )
inlinevirtual

Member Function Documentation

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
iterator madness::ConcurrentHashMap< keyT, valueT, hashfunT >::begin ( )
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
const_iterator madness::ConcurrentHashMap< keyT, valueT, hashfunT >::begin ( ) const
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
void madness::ConcurrentHashMap< keyT, valueT, hashfunT >::clear ( )
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
iterator madness::ConcurrentHashMap< keyT, valueT, hashfunT >::end ( )
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
const_iterator madness::ConcurrentHashMap< keyT, valueT, hashfunT >::end ( ) const
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
std::size_t madness::ConcurrentHashMap< keyT, valueT, hashfunT >::erase ( const keyT &  key)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
void madness::ConcurrentHashMap< keyT, valueT, hashfunT >::erase ( const iterator it)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
void madness::ConcurrentHashMap< keyT, valueT, hashfunT >::erase ( accessor item)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
void madness::ConcurrentHashMap< keyT, valueT, hashfunT >::erase ( const_accessor item)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
iterator madness::ConcurrentHashMap< keyT, valueT, hashfunT >::find ( const keyT &  key)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
const_iterator madness::ConcurrentHashMap< keyT, valueT, hashfunT >::find ( const keyT &  key) const
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
bool madness::ConcurrentHashMap< keyT, valueT, hashfunT >::find ( accessor result,
const keyT &  key 
)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
bool madness::ConcurrentHashMap< keyT, valueT, hashfunT >::find ( const_accessor result,
const keyT &  key 
) const
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
hashfunT& madness::ConcurrentHashMap< keyT, valueT, hashfunT >::get_hash ( ) const
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
std::pair<iterator,bool> madness::ConcurrentHashMap< keyT, valueT, hashfunT >::insert ( const datumT datum)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
bool madness::ConcurrentHashMap< keyT, valueT, hashfunT >::insert ( accessor result,
const datumT datum 
)
inline

Returns true if new pair was inserted; false if key is already in the map and the datum was not inserted.

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
bool madness::ConcurrentHashMap< keyT, valueT, hashfunT >::insert ( const_accessor result,
const datumT datum 
)
inline

Returns true if new pair was inserted; false if key is already in the map and the datum was not inserted.

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
bool madness::ConcurrentHashMap< keyT, valueT, hashfunT >::insert ( accessor result,
const keyT &  key 
)
inline

Returns true if new pair was inserted; false if key is already in the map.

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
bool madness::ConcurrentHashMap< keyT, valueT, hashfunT >::insert ( const_accessor result,
const keyT &  key 
)
inline

Returns true if new pair was inserted; false if key is already in the map.

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
hashT& madness::ConcurrentHashMap< keyT, valueT, hashfunT >::operator= ( const hashT h)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
valueT& madness::ConcurrentHashMap< keyT, valueT, hashfunT >::operator[] ( const keyT &  key)
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
void madness::ConcurrentHashMap< keyT, valueT, hashfunT >::print_stats ( ) const
inline
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
size_t madness::ConcurrentHashMap< keyT, valueT, hashfunT >::size ( ) const
inline

Friends And Related Function Documentation

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
friend class Hash_private::HashIterator< const hashT >
friend
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
friend class Hash_private::HashIterator< hashT >
friend

Member Data Documentation

template<class keyT, class valueT, class hashfunT = Hash<keyT>>
binT* madness::ConcurrentHashMap< keyT, valueT, hashfunT >::bins
protected
template<class keyT, class valueT, class hashfunT = Hash<keyT>>
const size_t madness::ConcurrentHashMap< keyT, valueT, hashfunT >::nbins
protected

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