FBX C++ API Reference
|
#include <fbxhashmap.h>
This object represents a standard hash map.
You must provide the typename of KEY and VALUE as well as the typename of the class that contains the hash function to use to hash values. The hash class must overload operator() and be built like this.
Definition at line 45 of file fbxhashmap.h.
Classes | |
class | Iterator |
Iterate through every element in a hash map. More... | |
Public Types | |
typedef KEY | KeyType |
typedef VALUE | ValueType |
typedef HASH | HashFunctorType |
Public Member Functions | |
FbxHashMap (int pBucketSize) | |
Construct a FbxHashMap with an user-defined maximum number of elements. More... | |
FbxHashMap () | |
Construct a FbxHashMap with the default maximum number of elements (30) More... | |
~FbxHashMap () | |
Clear all elements in the hash map before destroying itself. More... | |
void | Clear () |
Calls operator delete on all elements of the hashmap, de-allocating all memory and destroying them. More... | |
const Iterator | Find (const KeyType &pKey) const |
Find an element in the hashmap. More... | |
VALUE | Remove (const KEY &pKey) |
Remove an element in the hashmap. More... | |
ValueType & | operator[] (const KeyType &pKey) |
Add or retrieve a KeyValuePair from the Hashmap. More... | |
Iterator | Start () const |
Returns an iterator pointing on the first non-null element in the map. More... | |
Iterator | End () const |
Returns an iterator pointing on the last element in the map. More... | |
Friends | |
class | Iterator |
typedef KEY KeyType |
Definition at line 48 of file fbxhashmap.h.
typedef VALUE ValueType |
Definition at line 49 of file fbxhashmap.h.
typedef HASH HashFunctorType |
Definition at line 50 of file fbxhashmap.h.
|
inline |
Construct a FbxHashMap with an user-defined maximum number of elements.
pBucketSize | Initial maximum number of elements. |
Definition at line 213 of file fbxhashmap.h.
|
inline |
Construct a FbxHashMap with the default maximum number of elements (30)
Definition at line 221 of file fbxhashmap.h.
|
inline |
Clear all elements in the hash map before destroying itself.
Definition at line 229 of file fbxhashmap.h.
|
inline |
Calls operator delete on all elements of the hashmap, de-allocating all memory and destroying them.
Definition at line 238 of file fbxhashmap.h.
Find an element in the hashmap.
If no element exist with the specified key, returns an iterator pointing on the end of the map (not an actual KeyValuePair).
pKey | The value of the key corresponding to the element |
Definition at line 264 of file fbxhashmap.h.
|
inline |
Remove an element in the hashmap.
pKey | The key value of the element to remove |
Definition at line 287 of file fbxhashmap.h.
Add or retrieve a KeyValuePair from the Hashmap.
If there is already an entry in the map for an element with key value specified in parameter, the value will be returned. Otherwise, a new entry will be created with this key value and the default value for ValueType will be returned. It can be modified using the assignment operator
pKey | The key for which to retrieve/add a value. |
Definition at line 324 of file fbxhashmap.h.
|
inline |
Returns an iterator pointing on the first non-null element in the map.
Definition at line 354 of file fbxhashmap.h.
|
inline |
Returns an iterator pointing on the last element in the map.
This is not an actual KeyValuePair but but an iterator pointing on a null element.
Definition at line 372 of file fbxhashmap.h.
|
friend |
Definition at line 406 of file fbxhashmap.h.