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 200 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 212 of System.Base/Hashtable.cm


Hashtable Constructor

public Hashtable(Hashtable&& that)

Definition
Line 219 of System.Base/Hashtable.cm


Hashtable Constructor

public Hashtable(const Hashtable& that)

Definition
Line 215 of System.Base/Hashtable.cm


~Hashtable Destructor

public ~Hashtable()

Definition
Line 239 of System.Base/Hashtable.cm


Member Function Details

Begin Member Function

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

Definition
Line 267 of System.Base/Hashtable.cm


Begin Member Function

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

Definition
Line 271 of System.Base/Hashtable.cm


CBegin Member Function

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

Definition
Line 275 of System.Base/Hashtable.cm


CEnd Member Function

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

Definition
Line 287 of System.Base/Hashtable.cm


CFind Member Function

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

Definition
Line 436 of System.Base/Hashtable.cm


CheckForRehash Member Function

private inline void CheckForRehash()

Definition
Line 478 of System.Base/Hashtable.cm


Clear Member Function

public void Clear()

Definition
Line 251 of System.Base/Hashtable.cm


CopyFrom Member Function

private void CopyFrom(const Hashtable& that)

Definition
Line 520 of System.Base/Hashtable.cm


Count Member Function

public inline long Count()

Definition
Line 243 of System.Base/Hashtable.cm


End Member Function

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

Definition
Line 279 of System.Base/Hashtable.cm


End Member Function

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

Definition
Line 283 of System.Base/Hashtable.cm


Find Member Function

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

Definition
Line 402 of System.Base/Hashtable.cm


Find Member Function

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

Definition
Line 419 of System.Base/Hashtable.cm


GetBucket Member Function

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

Definition
Line 461 of System.Base/Hashtable.cm


GetBucketCount Member Function

public inline long GetBucketCount()

Definition
Line 453 of System.Base/Hashtable.cm


GetBucketIndex Member Function

public inline long GetBucketIndex(const ValueType& value)

Definition
Line 457 of System.Base/Hashtable.cm


GetFirstBucket Member Function

private Bucket<ValueType>* GetFirstBucket()

Definition
Line 506 of System.Base/Hashtable.cm


Hash Member Function

private inline long Hash(const KeyType& key)

Definition
Line 541 of System.Base/Hashtable.cm


Insert Member Function

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

Definition
Line 320 of System.Base/Hashtable.cm


Insert Member Function

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

Definition
Line 295 of System.Base/Hashtable.cm


IsEmpty Member Function

public inline bool IsEmpty()

Definition
Line 247 of System.Base/Hashtable.cm


KeyOf Member Function

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

Definition
Line 537 of System.Base/Hashtable.cm


KeysEqual Member Function

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

Definition
Line 546 of System.Base/Hashtable.cm


Rehash Member Function

private void Rehash()

Definition
Line 485 of System.Base/Hashtable.cm


Remove Member Function

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

Definition
Line 372 of System.Base/Hashtable.cm


Remove Member Function

public void Remove(const KeyType& key)

Definition
Line 345 of System.Base/Hashtable.cm


SetLoadFactor Member Function

private inline void SetLoadFactor()

Definition
Line 465 of System.Base/Hashtable.cm


SetMaxLoadFactor Member Function

public inline void SetMaxLoadFactor(double maxLoadFactor_)

Definition
Line 291 of System.Base/Hashtable.cm


operator= Member Function

public void operator=(Hashtable&& that)

Definition
Line 229 of System.Base/Hashtable.cm


operator= Member Function

public void operator=(const Hashtable& that)

Definition
Line 224 of System.Base/Hashtable.cm