Hashtable<KeyType, ValueType, KeyOfValue, HashFun, Compare> Class

Template Parameters | Constraint | Constructors & Destructor | Member Functions | Type Aliases | Member Variables

A hashtable.

Model of ForwardContainer .

Definition

Line 197 of System.Base/Hashtable.cm

Template Parameters

KeyType
ValueType
KeyOfValue
HashFun Hasher<KeyType>
Compare EqualTo<KeyType>

Constraint

KeyType  is  Semiregular  and  ValueType  is  Semiregular  and  KeySelectionFunction <KeyOfValue , KeyType , ValueTypeand  HashFunction <HashFun , KeyTypeand  Compare  is  Relation  and  Compare .Domain is  KeyType

Constructors & Destructor

public Hashtable()
public Hashtable(Hashtable&& that)
public Hashtable(const Hashtable& that)
public ~Hashtable()

Member Functions

public inline HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> Begin()
public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> Begin() const
public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> CBegin() const
public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> CEnd() const
public HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> CFind(const KeyType& key) const
private inline void CheckForRehash()
public void Clear()
private void CopyFrom(const Hashtable& that)
public inline long Count() const
public inline HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> End()
public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> End() const
public HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> Find(const KeyType& key)
public HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> Find(const KeyType& key) const
public inline Bucket<ValueType>* GetBucket(long index) const
public inline long GetBucketCount() const
public inline long GetBucketIndex(const ValueType& value) const
private Bucket<ValueType>* GetFirstBucket() const
private inline long Hash(const KeyType& key) const
public Pair<HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable>, bool> Insert(ValueType&& value)
public Pair<HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable>, bool> Insert(const ValueType& value)
public inline bool IsEmpty() const
private inline const KeyType& KeyOf(const ValueType& value) const
private inline bool KeysEqual(const KeyType& left, const KeyType& right) const
private void Rehash()
public void Remove(HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> pos)
public void Remove(const KeyType& key)
private inline void SetLoadFactor()
public inline void SetMaxLoadFactor(double maxLoadFactor_)
public void operator=(Hashtable&& that)
public void operator=(const Hashtable& that)

Type Aliases

public typedef ConstIterator HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable>
public typedef Iterator HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable>
private typedef Self Hashtable

Member Variables

private List<Bucket<ValueType>*> buckets
private long count
private Compare equal
private HashFun hash
private KeyOfValue keyOf
private double loadFactor
private double maxLoadFactor

Constructor& Destructor Details

Hashtable Constructor

public Hashtable()

Definition
Line 209 of System.Base/Hashtable.cm


Hashtable Constructor

public Hashtable(Hashtable&& that)

Definition
Line 216 of System.Base/Hashtable.cm


Hashtable Constructor

public Hashtable(const Hashtable& that)

Definition
Line 212 of System.Base/Hashtable.cm


~Hashtable Destructor

public ~Hashtable()

Definition
Line 236 of System.Base/Hashtable.cm


Member Function Details

Begin Member Function

public inline HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> Begin()

Definition
Line 264 of System.Base/Hashtable.cm


Begin Member Function

public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> Begin()

Definition
Line 268 of System.Base/Hashtable.cm


CBegin Member Function

public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> CBegin()

Definition
Line 272 of System.Base/Hashtable.cm


CEnd Member Function

public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> CEnd()

Definition
Line 284 of System.Base/Hashtable.cm


CFind Member Function

public HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> CFind(const KeyType& key)

Definition
Line 433 of System.Base/Hashtable.cm


CheckForRehash Member Function

private inline void CheckForRehash()

Definition
Line 475 of System.Base/Hashtable.cm


Clear Member Function

public void Clear()

Definition
Line 248 of System.Base/Hashtable.cm


CopyFrom Member Function

private void CopyFrom(const Hashtable& that)

Definition
Line 517 of System.Base/Hashtable.cm


Count Member Function

public inline long Count()

Definition
Line 240 of System.Base/Hashtable.cm


End Member Function

public inline HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> End()

Definition
Line 276 of System.Base/Hashtable.cm


End Member Function

public inline HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> End()

Definition
Line 280 of System.Base/Hashtable.cm


Find Member Function

public HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> Find(const KeyType& key)

Definition
Line 399 of System.Base/Hashtable.cm


Find Member Function

public HashtableIterator<ValueType, const ValueType&, const ValueType*, Hashtable> Find(const KeyType& key)

Definition
Line 416 of System.Base/Hashtable.cm


GetBucket Member Function

public inline Bucket<ValueType>* GetBucket(long index)

Definition
Line 458 of System.Base/Hashtable.cm


GetBucketCount Member Function

public inline long GetBucketCount()

Definition
Line 450 of System.Base/Hashtable.cm


GetBucketIndex Member Function

public inline long GetBucketIndex(const ValueType& value)

Definition
Line 454 of System.Base/Hashtable.cm


GetFirstBucket Member Function

private Bucket<ValueType>* GetFirstBucket()

Definition
Line 503 of System.Base/Hashtable.cm


Hash Member Function

private inline long Hash(const KeyType& key)

Definition
Line 538 of System.Base/Hashtable.cm


Insert Member Function

public Pair<HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable>, bool> Insert(ValueType&& value)

Definition
Line 317 of System.Base/Hashtable.cm


Insert Member Function

public Pair<HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable>, bool> Insert(const ValueType& value)

Definition
Line 292 of System.Base/Hashtable.cm


IsEmpty Member Function

public inline bool IsEmpty()

Definition
Line 244 of System.Base/Hashtable.cm


KeyOf Member Function

private inline const KeyType& KeyOf(const ValueType& value)

Definition
Line 534 of System.Base/Hashtable.cm


KeysEqual Member Function

private inline bool KeysEqual(const KeyType& left, const KeyType& right)

Definition
Line 543 of System.Base/Hashtable.cm


Rehash Member Function

private void Rehash()

Definition
Line 482 of System.Base/Hashtable.cm


Remove Member Function

public void Remove(HashtableIterator<ValueType, ValueType&, ValueType*, Hashtable> pos)

Definition
Line 369 of System.Base/Hashtable.cm


Remove Member Function

public void Remove(const KeyType& key)

Definition
Line 342 of System.Base/Hashtable.cm


SetLoadFactor Member Function

private inline void SetLoadFactor()

Definition
Line 462 of System.Base/Hashtable.cm


SetMaxLoadFactor Member Function

public inline void SetMaxLoadFactor(double maxLoadFactor_)

Definition
Line 288 of System.Base/Hashtable.cm


operator= Member Function

public void operator=(Hashtable&& that)

Definition
Line 226 of System.Base/Hashtable.cm


operator= Member Function

public void operator=(const Hashtable& that)

Definition
Line 221 of System.Base/Hashtable.cm