Defines | Typedefs | Functions

OrxHashTable

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

No flags (default behaviour)

Definition at line 53 of file orxHashTable.h.

#define orxHASHTABLE_KU32_FLAG_NOT_EXPANDABLE   0x00000001

The Hash table will not be expandable

Definition at line 54 of file orxHashTable.h.


Typedef Documentation

typedef struct __orxHASHTABLE_t orxHASHTABLE

Definition at line 50 of file orxHashTable.h.


Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxHashTable_Add ( orxHASHTABLE _pstHashTable,
orxU32  _u32Key,
void *  _pData 
)

Add an item value.

Parameters:
[in]_pstHashTableThe hash table where set.
[in]_u32KeyKey to assign.
[in]_pDataData to assign.
Returns:
Returns the status of the operation. (fails if key already used)
orxDLLAPI orxSTATUS orxFASTCALL orxHashTable_Clear ( orxHASHTABLE _pstHashTable )

Clear a hash table.

Parameters:
[in]_pstHashTableHash table to clear.
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxHASHTABLE* orxFASTCALL orxHashTable_Create ( orxU32  _u32NbKey,
orxU32  _u32Flags,
orxMEMORY_TYPE  _eMemType 
)

Create a new hash table and return it.

Parameters:
[in]_u32NbKeyNumber of keys that will be inserted.
[in]_u32FlagsFlags used by the hash table
[in]_eMemTypeMemory type to use
Returns:
Returns the hashtable pointer or orxNULL if failed.
orxDLLAPI orxSTATUS orxFASTCALL orxHashTable_Delete ( orxHASHTABLE _pstHashTable )

Delete a hash table.

Parameters:
[in]_pstHashTableHash 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]_pstHashTableAddress of the HashTable.
[in]_pu32KeyAddress where store the key, NULL to not store it.
[in]_ppDataAddress 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]_pstHashTableAddress of the HashTable.
[in]_pu32KeyAddress where store the key, NULL to not store it.
[in]_ppDataAddress where store the data, NULL to not store it.
[in]_hIteratorIterator 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]_pstHashTableThe hash table where search.
[in]_u32KeyKey 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]_pstHashTableConcerned hash table
Returns:
Item number
orxDLLAPI orxSTATUS orxFASTCALL orxHashTable_Remove ( orxHASHTABLE _pstHashTable,
orxU32  _u32Key 
)

Remove an item.

Parameters:
[in]_pstHashTableThe hash table where remove.
[in]_u32KeyKey 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]_pstHashTableThe hash table where set.
[in]_u32KeyKey to assign.
[in]_pDataData to assign.
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.5.6