#include "XnList.h"
Go to the source code of this file.
Classes | |
class | XnHash::ConstIterator |
class | XnHash::Iterator |
class | XnHash |
Defines | |
#define | _XN_DEFAULT_KEY_MANAGER_NAME(ClassName) _##ClassName##Manager |
#define | _XN_DEFAULT_KEY_TRANSLATOR(ClassName) _##ClassName##KeyTranslator |
#define | _XN_DEFAULT_VALUE_TRANSLATOR(ClassName) _##ClassName##ValueTranslator |
#define | XN_DECLARE_DEFAULT_HASH(KeyType, ValueType, ClassName) XN_DECLARE_DEFAULT_HASH_DECL(, KeyType, ValueType, ClassName) |
#define | XN_DECLARE_DEFAULT_HASH_DECL(decl, KeyType, ValueType, ClassName) |
#define | XN_DECLARE_DEFAULT_KEY_MANAGER(KeyType, ClassName, KeyTranslator) XN_DECLARE_DEFAULT_KEY_MANAGER_DECL(, KeyType, ClassName, KeyTranslator) |
#define | XN_DECLARE_DEFAULT_KEY_MANAGER_DECL(decl, KeyType, ClassName, KeyTranslator) |
#define | XN_DECLARE_DEFAULT_MANAGER_HASH(decl, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator) XN_DECLARE_DEFAULT_MANAGER_HASH_DECL(, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator) |
#define | XN_DECLARE_DEFAULT_MANAGER_HASH_DECL(decl, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator) |
#define | XN_DECLARE_HASH(KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator, KeyManager) XN_DECLARE_HASH_DECL(, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator, KeyManager) |
#define | XN_DECLARE_HASH_DECL(decl, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator, KeyManager) |
#define | XN_HASH_LAST_BIN 256 |
#define | XN_HASH_NUM_BINS (XN_HASH_LAST_BIN + 1) |
Typedefs | |
typedef XnUInt8 | XnHashValue |
typedef XnValue | XnKey |
Functions | |
static XnInt32 | XnDefaultCompareFunction (const XnKey &key1, const XnKey &key2) |
static XnHashValue | XnDefaultHashFunction (const XnKey &key) |
#define _XN_DEFAULT_KEY_MANAGER_NAME | ( | ClassName | ) | _##ClassName##Manager |
#define _XN_DEFAULT_KEY_TRANSLATOR | ( | ClassName | ) | _##ClassName##KeyTranslator |
#define _XN_DEFAULT_VALUE_TRANSLATOR | ( | ClassName | ) | _##ClassName##ValueTranslator |
#define XN_DECLARE_DEFAULT_HASH | ( | KeyType, | |
ValueType, | |||
ClassName | |||
) | XN_DECLARE_DEFAULT_HASH_DECL(, KeyType, ValueType, ClassName) |
#define XN_DECLARE_DEFAULT_HASH_DECL | ( | decl, | |
KeyType, | |||
ValueType, | |||
ClassName | |||
) |
XN_DECLARE_DEFAULT_VALUE_TRANSLATOR_DECL(decl, KeyType, _XN_DEFAULT_KEY_TRANSLATOR(ClassName)) \ XN_DECLARE_DEFAULT_VALUE_TRANSLATOR_DECL(decl, ValueType, _XN_DEFAULT_VALUE_TRANSLATOR(ClassName)) \ XN_DECLARE_DEFAULT_MANAGER_HASH_DECL(decl, KeyType, ValueType, ClassName, _XN_DEFAULT_KEY_TRANSLATOR(ClassName), _XN_DEFAULT_VALUE_TRANSLATOR(ClassName))
Declares a hash table from KeyType to ValueType named ClassName. The hash table uses default translators for storing keys and values. It declares and uses a default manager. It is declared using the decl declspec.
#define XN_DECLARE_DEFAULT_KEY_MANAGER | ( | KeyType, | |
ClassName, | |||
KeyTranslator | |||
) | XN_DECLARE_DEFAULT_KEY_MANAGER_DECL(, KeyType, ClassName, KeyTranslator) |
#define XN_DECLARE_DEFAULT_KEY_MANAGER_DECL | ( | decl, | |
KeyType, | |||
ClassName, | |||
KeyTranslator | |||
) |
class decl ClassName \ { \ public: \ inline static XnHashValue Hash(KeyType const& key) \ { \ const XnKey _key = KeyTranslator::GetAsValue(key); \ return XnDefaultHashFunction(_key); \ } \ inline static XnInt32 Compare(KeyType const& key1, KeyType const& key2) \ { \ const XnKey _key1 = KeyTranslator::GetAsValue(key1); \ const XnKey _key2 = KeyTranslator::GetAsValue(key2); \ return XnDefaultCompareFunction(_key1, _key2); \ } \ };
Declares a default Key Manager for type KeyType. It is given the name ClassName. The manager uses the translator KeyTranslator, and is declared using the decl declspec.
#define XN_DECLARE_DEFAULT_MANAGER_HASH | ( | decl, | |
KeyType, | |||
ValueType, | |||
ClassName, | |||
KeyTranslator, | |||
ValueTranslator | |||
) | XN_DECLARE_DEFAULT_MANAGER_HASH_DECL(, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator) |
#define XN_DECLARE_DEFAULT_MANAGER_HASH_DECL | ( | decl, | |
KeyType, | |||
ValueType, | |||
ClassName, | |||
KeyTranslator, | |||
ValueTranslator | |||
) |
XN_DECLARE_DEFAULT_KEY_MANAGER_DECL(decl, KeyType, _XN_DEFAULT_KEY_MANAGER_NAME(ClassName), KeyTranslator) \ XN_DECLARE_HASH_DECL(decl, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator, _XN_DEFAULT_KEY_MANAGER_NAME(ClassName))
Declares a hash table from KeyType to ValueType named ClassName. The hash table uses KeyTranslator and ValueTranslator for storing keys and values. It declares and uses a default manager. It is declared using the decl declspec.
#define XN_DECLARE_HASH | ( | KeyType, | |
ValueType, | |||
ClassName, | |||
KeyTranslator, | |||
ValueTranslator, | |||
KeyManager | |||
) | XN_DECLARE_HASH_DECL(, KeyType, ValueType, ClassName, KeyTranslator, ValueTranslator, KeyManager) |
#define XN_DECLARE_HASH_DECL | ( | decl, | |
KeyType, | |||
ValueType, | |||
ClassName, | |||
KeyTranslator, | |||
ValueTranslator, | |||
KeyManager | |||
) |
#define XN_HASH_LAST_BIN 256 |
#define XN_HASH_NUM_BINS (XN_HASH_LAST_BIN + 1) |
typedef XnUInt8 XnHashValue |
static XnInt32 XnDefaultCompareFunction | ( | const XnKey & | key1, |
const XnKey & | key2 | ||
) | [static] |
static XnHashValue XnDefaultHashFunction | ( | const XnKey & | key | ) | [static] |