arsa  2.7
Functions
arsa_hash.h File Reference
#include <arsa_begin_code.h>
#include <irrlicht.h>

Go to the source code of this file.

Functions

ARSA_API SHash *ARSACALLCONV hash_create ()
 create first hash table More...
 
ARSA_API void ARSACALLCONV hash_free (SHash **hash)
 free all hash table, except user data More...
 
ARSA_API SHash *ARSACALLCONV hash_push_back (SHash *hash, const irr::core::stringc &name, void *userdata)
 add new element to hash table More...
 
ARSA_API SHash *ARSACALLCONV hash_get (SHash *hash, const irr::core::stringc &name)
 get data in hash table by name More...
 
ARSA_API void *ARSACALLCONV hash_get_userdata (SHash *hash, const irr::core::stringc &name)
 get userdata in hash table by name More...
 
ARSA_API void *ARSACALLCONV hash_get_userdata (SHash *hash)
 get userdata in currently hash More...
 
ARSA_API const char *ARSACALLCONV hash_get_name (SHash *hash)
 get name in currently hash More...
 
ARSA_API void ARSACALLCONV hash_erase (SHash **hash, SHash *dead)
 del data in hash table More...
 
ARSA_API void ARSACALLCONV hash_erase (SHash **hash, const irr::core::stringc &name)
 del data in hash table by name More...
 
ARSA_API SHash *ARSACALLCONV hash_next (SHash *hash)
 next element in hash table More...
 
ARSA_API void ARSACALLCONV hash_sort (SHash *hash, int(*compar)(const void *, const void *))
 
ARSA_API void ARSACALLCONV hash_clear (SHash *hash, void(*clear)(const void *)=0)
 clear all elements in hash table More...
 
ARSA_API irr::u32 ARSACALLCONV hash_size (SHash *hash)
 elements count in hash table More...
 

Function Documentation

◆ hash_clear()

ARSA_API void ARSACALLCONV hash_clear ( SHash *  hash,
void(*)(const void *)  clear = 0 
)

clear all elements in hash table

◆ hash_create()

ARSA_API SHash* ARSACALLCONV hash_create ( )

create first hash table

◆ hash_erase() [1/2]

ARSA_API void ARSACALLCONV hash_erase ( SHash **  hash,
SHash *  dead 
)

del data in hash table

◆ hash_erase() [2/2]

ARSA_API void ARSACALLCONV hash_erase ( SHash **  hash,
const irr::core::stringc name 
)

del data in hash table by name

◆ hash_free()

ARSA_API void ARSACALLCONV hash_free ( SHash **  hash)

free all hash table, except user data

◆ hash_get()

ARSA_API SHash* ARSACALLCONV hash_get ( SHash *  hash,
const irr::core::stringc name 
)

get data in hash table by name

◆ hash_get_name()

ARSA_API const char* ARSACALLCONV hash_get_name ( SHash *  hash)

get name in currently hash

◆ hash_get_userdata() [1/2]

ARSA_API void* ARSACALLCONV hash_get_userdata ( SHash *  hash,
const irr::core::stringc name 
)

get userdata in hash table by name

◆ hash_get_userdata() [2/2]

ARSA_API void* ARSACALLCONV hash_get_userdata ( SHash *  hash)

get userdata in currently hash

◆ hash_next()

ARSA_API SHash* ARSACALLCONV hash_next ( SHash *  hash)

next element in hash table

◆ hash_push_back()

ARSA_API SHash* ARSACALLCONV hash_push_back ( SHash *  hash,
const irr::core::stringc name,
void userdata 
)

add new element to hash table

◆ hash_size()

ARSA_API irr::u32 ARSACALLCONV hash_size ( SHash *  hash)

elements count in hash table

◆ hash_sort()

ARSA_API void ARSACALLCONV hash_sort ( SHash *  hash,
int(*)(const void *, const void *)  compar 
)

sort all elements in hash table this is the same convention used by qsort in the standard C library.