Defines |
| #define | orxHASHTABLE_KU32_FLAG_NONE 0x00000000 |
| #define | orxHASHTABLE_KU32_FLAG_NOT_EXPANDABLE 0x00000001 |
Typedefs |
| typedef struct __orxHASHTABLE_t | orxHASHTABLE |
Functions |
| orxDLLAPI orxU32 orxFASTCALL | orxHashTable_GetCounter (orxHASHTABLE *_pstHashTable) |
HashTable creation/destruction. |
| orxDLLAPI orxHASHTABLE *orxFASTCALL | orxHashTable_Create (orxU32 _u32NbKey, orxU32 _u32Flags, orxMEMORY_TYPE _eMemType) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxHashTable_Delete (orxHASHTABLE *_pstHashTable) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxHashTable_Clear (orxHASHTABLE *_pstHashTable) |
HashTable key manipulation. |
| orxDLLAPI void *orxFASTCALL | orxHashTable_Get (const orxHASHTABLE *_pstHashTable, orxU32 _u32Key) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxHashTable_Set (orxHASHTABLE *_pstHashTable, orxU32 _u32Key, void *_pData) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxHashTable_Add (orxHASHTABLE *_pstHashTable, orxU32 _u32Key, void *_pData) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxHashTable_Remove (orxHASHTABLE *_pstHashTable, orxU32 _u32Key) |
HashTable iteration. |
Used to pass over all elements of the hashtable.
|
| orxDLLAPI orxHANDLE orxFASTCALL | orxHashTable_FindFirst (orxHASHTABLE *_pstHashTable, orxU32 *_pu32Key, void **_ppData) |
| orxDLLAPI orxHANDLE orxFASTCALL | orxHashTable_FindNext (orxHASHTABLE *_pstHashTable, orxHANDLE _hIterator, orxU32 *_pu32Key, void **_ppData) |
Detailed Description
Hashtable module Module that handles Hashtables
Define Documentation
| #define orxHASHTABLE_KU32_FLAG_NONE 0x00000000 |
| #define orxHASHTABLE_KU32_FLAG_NOT_EXPANDABLE 0x00000001 |
The Hash table will not be expandable
Definition at line 54 of file orxHashTable.h.
Typedef Documentation
Function Documentation
| orxDLLAPI orxSTATUS orxFASTCALL orxHashTable_Add |
( |
orxHASHTABLE * |
_pstHashTable, |
|
|
orxU32 |
_u32Key, |
|
|
void * |
_pData |
|
) |
| |
Add an item value.
- Parameters:
-
| [in] | _pstHashTable | The hash table where set. |
| [in] | _u32Key | Key to assign. |
| [in] | _pData | Data to assign. |
- Returns:
- Returns the status of the operation. (fails if key already used)
Clear a hash table.
- Parameters:
-
| [in] | _pstHashTable | Hash table to clear. |
- Returns:
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Create a new hash table and return it.
- Parameters:
-
| [in] | _u32NbKey | Number of keys that will be inserted. |
| [in] | _u32Flags | Flags used by the hash table |
| [in] | _eMemType | Memory type to use |
- Returns:
- Returns the hashtable pointer or orxNULL if failed.
Delete a hash table.
- Parameters:
-
| [in] | _pstHashTable | Hash table to delete. |
- Returns:
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
| orxDLLAPI orxHANDLE orxFASTCALL orxHashTable_FindFirst |
( |
orxHASHTABLE * |
_pstHashTable, |
|
|
orxU32 * |
_pu32Key, |
|
|
void ** |
_ppData |
|
) |
| |
Find a the first item of the hashtable and return the iterator corresponding to the search.
- Parameters:
-
| [in] | _pstHashTable | Address of the HashTable. |
| [in] | _pu32Key | Address where store the key, NULL to not store it. |
| [in] | _ppData | Address where store the data, NULL to not store it. |
- Returns:
- iterator of HashTable traversing. orxHANDLE_UNDEFINED if no element.
| orxDLLAPI orxHANDLE orxFASTCALL orxHashTable_FindNext |
( |
orxHASHTABLE * |
_pstHashTable, |
|
|
orxHANDLE |
_hIterator, |
|
|
orxU32 * |
_pu32Key, |
|
|
void ** |
_ppData |
|
) |
| |
Find a the next item of the hashtable and return the iterator corresponding to the search.
- Parameters:
-
| [in] | _pstHashTable | Address of the HashTable. |
| [in] | _pu32Key | Address where store the key, NULL to not store it. |
| [in] | _ppData | Address where store the data, NULL to not store it. |
| [in] | _hIterator | Iterator to continue the search. |
- Returns:
- iterator of HashTable traversing. orxHANDLE_UNDEFINED if no element.
| orxDLLAPI void* orxFASTCALL orxHashTable_Get |
( |
const orxHASHTABLE * |
_pstHashTable, |
|
|
orxU32 |
_u32Key |
|
) |
| |
Find an item in a hash table.
- Parameters:
-
| [in] | _pstHashTable | The hash table where search. |
| [in] | _u32Key | Key to find. |
- Returns:
- The Element associated to the key or orxNULL if not found.
| orxDLLAPI orxU32 orxFASTCALL orxHashTable_GetCounter |
( |
orxHASHTABLE * |
_pstHashTable ) |
|
Gets a hash table item counter
- Parameters:
-
| [in] | _pstHashTable | Concerned hash table |
- Returns:
- Item number
Remove an item.
- Parameters:
-
| [in] | _pstHashTable | The hash table where remove. |
| [in] | _u32Key | Key to remove. |
- Returns:
- Returns the status of the operation.
| orxDLLAPI orxSTATUS orxFASTCALL orxHashTable_Set |
( |
orxHASHTABLE * |
_pstHashTable, |
|
|
orxU32 |
_u32Key, |
|
|
void * |
_pData |
|
) |
| |
Set an item value.
- Parameters:
-
| [in] | _pstHashTable | The hash table where set. |
| [in] | _u32Key | Key to assign. |
| [in] | _pData | Data to assign. |
- Returns:
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE