OpenNI 1.5.4: XnHashT< TKey, TValue, TKeyManager, TAlloc > Class Template Reference

OpenNI

XnHashT< TKey, TValue, TKeyManager, TAlloc > Class Template Reference

#include <XnHashT.h>

List of all members.

Classes

class  ConstIterator
class  Iterator

Public Types

enum  { LAST_BIN = (1 << (sizeof(XnHashCode)*8)), NUM_BINS = LAST_BIN + 1 }
typedef XnKeyValuePair< TKey,
TValue > 
TPair
typedef XnListT< TPair, TAlloc > TPairList

Public Member Functions

 XnHashT ()
 XnHashT (const XnHashT &other)
XnHashToperator= (const XnHashT &other)
 ~XnHashT ()
Iterator Begin ()
ConstIterator Begin () const
Iterator End ()
ConstIterator End () const
XnStatus Set (const TKey &key, const TValue &value)
ConstIterator Find (TKey const &key) const
Iterator Find (TKey const &key)
XnStatus Find (TKey const &key, ConstIterator &it) const
XnStatus Find (TKey const &key, Iterator &it)
XnStatus Get (TKey const &key, TValue &value) const
XnStatus Get (TKey const &key, TValue const *&pValue) const
XnStatus Get (TKey const &key, TValue &value)
XnStatus Get (TKey const &key, TValue *&pValue)
TValue & operator[] (TKey const &key)
XnStatus Remove (ConstIterator it)
XnStatus Remove (TKey const &key)
XnStatus Clear ()
XnBool IsEmpty () const
XnUInt32 Size () const

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
class XnHashT< TKey, TValue, TKeyManager, TAlloc >


Member Typedef Documentation

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
typedef XnKeyValuePair<TKey, TValue> XnHashT< TKey, TValue, TKeyManager, TAlloc >::TPair
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
typedef XnListT<TPair, TAlloc> XnHashT< TKey, TValue, TKeyManager, TAlloc >::TPairList

Member Enumeration Documentation

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
anonymous enum
Enumerator:
LAST_BIN 
NUM_BINS 

Constructor & Destructor Documentation

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnHashT< TKey, TValue, TKeyManager, TAlloc >::XnHashT ( ) [inline]
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnHashT< TKey, TValue, TKeyManager, TAlloc >::XnHashT ( const XnHashT< TKey, TValue, TKeyManager, TAlloc > &  other) [inline]
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnHashT< TKey, TValue, TKeyManager, TAlloc >::~XnHashT ( ) [inline]

Member Function Documentation

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
Iterator XnHashT< TKey, TValue, TKeyManager, TAlloc >::Begin ( ) [inline]

An iterator to the first entry of the list (non-const version)

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
ConstIterator XnHashT< TKey, TValue, TKeyManager, TAlloc >::Begin ( ) const [inline]

An iterator to the first entry of the list (const version)

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Clear ( ) [inline]

Remove all entries from the XnHash.

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
Iterator XnHashT< TKey, TValue, TKeyManager, TAlloc >::End ( ) [inline]

An iterator 1to the end of the list (non-const version). The position is invalid.

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
ConstIterator XnHashT< TKey, TValue, TKeyManager, TAlloc >::End ( ) const [inline]

An iterator to the end of the list (const version). The position is invalid.

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
ConstIterator XnHashT< TKey, TValue, TKeyManager, TAlloc >::Find ( TKey const &  key) const [inline]

Get an iterator pointing to the pair in the hash (const version).

Parameters:
key[in] The searched key
Returns:
End() if value doesn't exist
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
Iterator XnHashT< TKey, TValue, TKeyManager, TAlloc >::Find ( TKey const &  key) [inline]

Get an iterator pointing to the pair in the hash.

Parameters:
key[in] The searched key
Returns:
End() if value doesn't exist
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Find ( TKey const &  key,
ConstIterator it 
) const [inline]

Get an iterator pointing to the pair in the hash (const version).

Parameters:
key[in] The searched key
it[out] An iterator to the entry in the hash.
Returns:
XN_STATUS_NO_MATCH if value doesn't exist
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Find ( TKey const &  key,
Iterator it 
) [inline]

Get an iterator pointing to the pair in the hash (const version).

Parameters:
key[in] The searched key
it[out] An iterator to the entry in the hash.
Returns:
XN_STATUS_NO_MATCH if value doesn't exist
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Get ( TKey const &  key,
TValue &  value 
) const [inline]

Get the value associated with the supplied key

Parameters:
key[in] The key of the entry
value[out] The retrieved value
Returns:
XN_STATUS_NO_MATCH if no such key exists
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Get ( TKey const &  key,
TValue const *&  pValue 
) const [inline]

Get a pointer to the value associated with the supplied key

Parameters:
key[in] The key of the entry
pValue[out] A const pointer to the value that is stored in the hash.
Returns:
XN_STATUS_NO_MATCH if no such key exists
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Get ( TKey const &  key,
TValue &  value 
) [inline]

Get the value associated with the supplied key

Parameters:
key[in] The key of the entry
value[out] The retrieved value
Returns:
XN_STATUS_NO_MATCH if no such key exists
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Get ( TKey const &  key,
TValue *&  pValue 
) [inline]

Get a pointer to the value associated with the supplied key

Parameters:
key[in] The key of the entry
pValue[out] A pointer to the value that is stored in the hash
Returns:
XN_STATUS_NO_MATCH if no such key exists
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnBool XnHashT< TKey, TValue, TKeyManager, TAlloc >::IsEmpty ( ) const [inline]

Checks if hash is empty.

template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnHashT& XnHashT< TKey, TValue, TKeyManager, TAlloc >::operator= ( const XnHashT< TKey, TValue, TKeyManager, TAlloc > &  other) [inline]
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
TValue& XnHashT< TKey, TValue, TKeyManager, TAlloc >::operator[] ( TKey const &  key) [inline]

Gets a reference to the value of a specific key. If this key is not in the hash, it will be added.

Parameters:
key[in] The key of the entry.
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Remove ( ConstIterator  it) [inline]
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Remove ( TKey const &  key) [inline]
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnStatus XnHashT< TKey, TValue, TKeyManager, TAlloc >::Set ( const TKey &  key,
const TValue &  value 
) [inline]

Set a new key-value entry. If key exists, will replace value.

Parameters:
key[in] The key to which to associate the value
value[in] The value to add to the XnHash
template<class TKey, class TValue, class TKeyManager = XnDefaultKeyManagerT<TKey>, class TAlloc = XnLinkedNodeDefaultAllocatorT<XnKeyValuePair<TKey, TValue> >>
XnUInt32 XnHashT< TKey, TValue, TKeyManager, TAlloc >::Size ( ) const [inline]

Gets the number of entries in the hash.


The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:06 for OpenNI 1.5.4 by   doxygen 1.7.5.1