MongoDB  2.7.0
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
mongo::UnorderedFastKeyTable< K_L, K_S, V, H, E, C, C_LS > Class Template Reference

Classes

class  const_iterator
 

Public Types

typedef std::pair< K_S, V > value_type
 
typedef K_L key_type
 
typedef V mapped_type
 

Public Member Functions

 UnorderedFastKeyTable (unsigned startingCapacity=DEFAULT_STARTING_CAPACITY, double maxProbeRatio=0.05)
 
 UnorderedFastKeyTable (const UnorderedFastKeyTable &other)
 
UnorderedFastKeyTableoperator= (const UnorderedFastKeyTable &other)
 
void copyTo (UnorderedFastKeyTable *out) const
 
size_t size () const
 
bool empty () const
 
size_t capacity () const
 
V & operator[] (const K_L &key)
 
V & get (const K_L &key)
 
size_t erase (const K_L &key)
 
void erase (const_iterator it)
 
const_iterator find (const K_L &key) const
 
const_iterator begin () const
 
const_iterator end () const
 

Static Public Attributes

static const unsigned DEFAULT_STARTING_CAPACITY = 20
 

Constructor & Destructor Documentation

template<typename K_L , typename K_S , typename V , typename H , typename E , typename C , typename C_LS >
mongo::UnorderedFastKeyTable< K_L, K_S, V, H, E, C, C_LS >::UnorderedFastKeyTable ( unsigned  startingCapacity = DEFAULT_STARTING_CAPACITY,
double  maxProbeRatio = 0.05 
)
inline
Parameters
startingCapacityhow many buckets should exist on initial creation DEFAULT_STARTING_CAPACITY
maxProbeRatiothe percentage of buckets we're willing to probe no defined default as you can't have a static const double on windows

Member Function Documentation

template<typename K_L, typename K_S , typename V , typename H , typename E , typename C , typename C_LS >
size_t mongo::UnorderedFastKeyTable< K_L, K_S, V, H, E, C, C_LS >::erase ( const K_L &  key)
inline
Returns
number of elements removed
template<typename K_L, typename K_S , typename V , typename H , typename E , typename C , typename C_LS >
UnorderedFastKeyTable< K_L, K_S, V, H, E, C, C_LS >::const_iterator mongo::UnorderedFastKeyTable< K_L, K_S, V, H, E, C, C_LS >::find ( const K_L &  key) const
inline
Returns
either a one-shot iterator with the key, or end()
template<typename K_L, typename K_S, typename V, typename H, typename E, typename C, typename C_LS = UnorderedFastKeyTable_LS_C<K_L,K_S>>
size_t mongo::UnorderedFastKeyTable< K_L, K_S, V, H, E, C, C_LS >::size ( ) const
inline
Returns
number of elements in map

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