![]() |
OpenNI 1.5.4
|
#include <XnHash.h>
The hash - associative array
typedef XnInt32(* XnHash::XnCompareFunction)(const XnKey &key1, const XnKey &key2) |
Definition of comparison function - receives 2 keys, returns 0 on equality
typedef XnHashValue(* XnHash::XnHashFunction)(const XnKey &key) |
Definition of a hash function - receive key, and outputs HashValue
XnHash::XnHash | ( | ) | [inline] |
Constructor. Initializes internal representations.
virtual XnHash::~XnHash | ( | ) | [inline, virtual] |
Destructor. Destroys internal representations.
Iterator XnHash::begin | ( | ) | [inline] |
Get an iterator to the beginning of the XnHash (non-const version)
ConstIterator XnHash::begin | ( | ) | const [inline] |
Get an iterator to the beginning of the XnHash (const version)
XnStatus XnHash::Clear | ( | ) | [inline] |
Remove all entries from the XnHash.
Iterator XnHash::end | ( | ) | [inline] |
Get an iterator to the end of the XnHash (position is invalid) (non-const version)
ConstIterator XnHash::end | ( | ) | const [inline] |
Get an iterator to the end of the XnHash (position is invalid) (const version)
XnStatus XnHash::Find | ( | const XnKey & | key, |
ConstIterator & | hiter | ||
) | const [inline] |
XnStatus XnHash::Find | ( | const XnKey & | key, |
Iterator & | hiter | ||
) | [inline] |
XnStatus XnHash::Find | ( | const XnKey & | key, |
XnHashValue | hashValue, | ||
ConstIterator & | hiter | ||
) | const [inline, protected] |
XnStatus XnHash::Get | ( | const XnKey & | key, |
XnValue & | value | ||
) | const [inline] |
Get the value associated with the supplied key
key | [in] The key of the entry |
value | [out] The retrieved value |
XnStatus XnHash::GetInitStatus | ( | ) | const [inline] |
Returns the status of the initialization of the hash.
XnStatus XnHash::Init | ( | ) | [inline, protected] |
XnBool XnHash::IsEmpty | ( | ) | const [inline] |
Checks if hash is empty.
XnStatus XnHash::Remove | ( | const XnKey & | key, |
XnValue & | value | ||
) | [inline] |
Remove a key-value entry from the XnHash
key | [in] The key of the entry |
value | [out] The value that was in the removed entry |
XnStatus XnHash::Remove | ( | ConstIterator | iter, |
XnKey & | key, | ||
XnValue & | value | ||
) | [inline] |
virtual XnStatus XnHash::Remove | ( | ConstIterator | iter | ) | [inline, virtual] |
XnStatus XnHash::Set | ( | const XnKey & | key, |
const XnValue & | value | ||
) | [inline] |
Set a new key-value entry. If key exists, will replace value.
key | [in] The key to which to associate the value |
value | [in] The value to add to the XnHash |
XnStatus XnHash::SetCompareFunction | ( | XnCompareFunction | compareFunction | ) | [inline] |
XnStatus XnHash::SetHashFunction | ( | XnHashFunction | hashFunction | ) | [inline] |
XnUInt32 XnHash::Size | ( | ) | const [inline] |
Gets the number of entries in the hash.
friend class ConstIterator [friend] |
XnList** XnHash::m_Bins [protected] |
Each bin is a XnList
XnCompareFunction XnHash::m_CompareFunction [protected] |
The current comparison function
XnHashFunction XnHash::m_HashFunction [protected] |
The current hash function
XnStatus XnHash::m_nInitStatus [protected] |
XnUInt16 XnHash::m_nMinBin [protected] |