libktx - The KTX Library
KTX_hash_table Class Reference

Opaque handle to a hash table. More...

#include <ktx.h>

Public Member Functions

KTX_hash_table ktxHashTable_Create (void)
 
KTX_error_code ktxHashTable_Serialize (KTX_hash_table This, unsigned int *kvdLen, unsigned char **kvd)
 Serializes the hash table to a block of memory suitable for writing to a KTX file. More...
 
KTX_error_code ktxHashTable_Deserialize (unsigned int kvdLen, void *pKvd, KTX_hash_table *pHt)
 Create a new hash table from a block of serialized key-value data read from a file. More...
 

Detailed Description

Opaque handle to a hash table.

Deprecated:
Use ktxHashList.

Member Function Documentation

§ ktxHashTable_Create()

KTX_hash_table ktxHashTable_Create ( void  )

§ ktxHashTable_Deserialize()

KTX_error_code ktxHashTable_Deserialize ( unsigned int  kvdLen,
void *  pKvd,
KTX_hash_table pHt 
)

Create a new hash table from a block of serialized key-value data read from a file.

Deprecated:
Use ktxHashList_Deserialize().

The caller is responsible for freeing the returned hash table.

Note
The bytes of the 32-bit key-value lengths within the serialized data are expected to be in native endianness.
Parameters
[in]kvdLenthe length of the serialized key-value data.
[in]pKvdpointer to the serialized key-value data.
[in,out]pHt*pHt is set to point to the created hash table.
Returns
KTX_SUCCESS or one of the following error codes.
Exceptions
KTX_INVALID_VALUEif pKvd or pHt is NULL or kvdLen == 0.
KTX_OUT_OF_MEMORYthere was not enough memory to create the hash table.

§ ktxHashTable_Serialize()

KTX_error_code ktxHashTable_Serialize ( KTX_hash_table  This,
unsigned int *  kvdLen,
unsigned char **  kvd 
)

Serializes the hash table to a block of memory suitable for writing to a KTX file.

Deprecated:
Use ktxHashList_Serialize().