Web Analytics Made Easy - Statcounter
Skip to content

Class SBCReferenceHashMap#

ClassList > SBCReferenceHashMap

Inherits the following classes: SBCContainerHashMap

Public Functions inherited from SBCContainerHashMap#

See SBCContainerHashMap

Type Name
SBCContainerHashMap (unsigned int nElements=0)
Creates a new hash map.
SBCContainerHashMap (const SBCContainerHashMap & hashMap)
Copy constructor.
SBCContainerHashMap (SBCContainerHashMap && hashMap)
Move constructor.
iterator begin ()
Returns an iterator that points to the beginning of the hash map.
const_iterator begin () const
Returns an iterator that points to the beginning of the hash map.
void clear ()
Erases all entries in the hash map.
bool empty () const
Returns true when the hash map contains no entry.
iterator end ()
Returns an iterator that points to the end of the hash map.
const_iterator end () const
Returns an iterator that points to the end of the hash map.
bool erase (const KeyType & key)
Attempts to erase an entry with a specific key and returnstrue if successful.
iterator find (const KeyType & key)
Finds a key in the hash map.
const_iterator find (const KeyType & key) const
Finds a key in the hash map.
unsigned int getMemoryFootprint () const
Returns the memory footprint of the hash map.
bool getValue (const KeyType & key, ValueType & value) const
Returns true if the__key has an associated value and puts it in the__value , else returnsfalse .
std::optional< ValueType > getValue (const KeyType & key) const
Returns the value associated to the key if found.
bool hasValue (const KeyType & key) const
Returns true if the__key has an associated value.
SBCContainerHashMapEntry< KeyType, ValueType > * insert (const KeyType & key, const ValueType & value)
Inserts an element in the hash map.
SBCContainerHashMap & operator= (const SBCContainerHashMap & hashMap)
Copy assignment.
SBCContainerHashMap & operator= (SBCContainerHashMap && hashMap)
Move assignment.
ValueType & operator[] (const KeyType & key)
Returns a reference to the value mapped to the key, which is inserted if necessary.
unsigned int size () const
The number of entries in the hash map.
std::map< KeyType, ValueType > toStdMap () const
Returns a std map containing the same (key, value) pairs.
virtual ~SBCContainerHashMap ()
Deletes the hash map.

Protected Attributes inherited from SBCContainerHashMap#

See SBCContainerHashMap

Type Name
SBCContainerVector< SBCContainerHashMapEntry< KeyType, ValueType > * > * hashMap
The hash table.
unsigned int numberOfEntries
The number of entries in the hash map.

Protected Functions#

Type Name
SBCReferenceHashMap (unsigned int nElements=0)
Creates a new hash map.
bool eraseReferenceTarget (SBCReferenceTarget * referenceTarget)
Attempts to erase an entry with a specific reference and returnstrue if successful.
bool eraseReferenceToTarget (SBCReferenceToTarget * referenceToTarget)
Attempts to erase an entry with a specific reference and returnstrue if successful.
unsigned int getValue (SBCReferenceToTarget * referenceToTarget) const
Returns the value associated to the reference.
bool getValue (SBCReferenceToTarget * referenceToTarget, unsigned int & value) const
Returns the value associated to the reference.
unsigned int getValue (SBCReferenceTarget * referenceTarget) const
Returns the value associated to the reference.
bool getValue (SBCReferenceTarget * referenceTarget, unsigned int & value) const
Returns the value associated to the reference.
bool hasValue (SBCReferenceToTarget * referenceToTarget) const
Returns true if the__reference has an associated value.
bool hasValue (SBCReferenceTarget * referenceTarget) const
Returns true if the__reference has an associated value.
virtual ~SBCReferenceHashMap ()

Protected Functions Documentation#

function SBCReferenceHashMap#

Creates a new hash map.

SBCReferenceHashMap::SBCReferenceHashMap (
    unsigned int nElements=0
) 


function eraseReferenceTarget#

Attempts to erase an entry with a specific reference and returnstrue if successful.

bool SBCReferenceHashMap::eraseReferenceTarget (
    SBCReferenceTarget * referenceTarget
) 


function eraseReferenceToTarget#

Attempts to erase an entry with a specific reference and returnstrue if successful.

bool SBCReferenceHashMap::eraseReferenceToTarget (
    SBCReferenceToTarget * referenceToTarget
) 


function getValue [1/4]#

Returns the value associated to the reference.

unsigned int SBCReferenceHashMap::getValue (
    SBCReferenceToTarget * referenceToTarget
) const


function getValue [2/4]#

Returns the value associated to the reference.

bool SBCReferenceHashMap::getValue (
    SBCReferenceToTarget * referenceToTarget,
    unsigned int & value
) const


function getValue [3/4]#

Returns the value associated to the reference.

unsigned int SBCReferenceHashMap::getValue (
    SBCReferenceTarget * referenceTarget
) const


function getValue [4/4]#

Returns the value associated to the reference.

bool SBCReferenceHashMap::getValue (
    SBCReferenceTarget * referenceTarget,
    unsigned int & value
) const


function hasValue [1/2]#

Returns true if the__reference has an associated value.

bool SBCReferenceHashMap::hasValue (
    SBCReferenceToTarget * referenceToTarget
) const


function hasValue [2/2]#

Returns true if the__reference has an associated value.

bool SBCReferenceHashMap::hasValue (
    SBCReferenceTarget * referenceTarget
) const


function ~SBCReferenceHashMap#

virtual SBCReferenceHashMap::~SBCReferenceHashMap ()