GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
|
This section documents the map object of the GPAC framework. More...
Data Structures | |
struct | GF_Pair |
Pair structure. More... | |
struct | GF_It_Map |
struct | GF_Map |
Map Object. More... | |
struct | GF_Iterator |
Map iterator Object. More... | |
Functions | |
GF_Map * | gf_map_new (u32 hash_capacity) |
map constructor More... | |
void | gf_map_del (GF_Map *ptr) |
map destructor More... | |
GF_Err | gf_map_iter_set (GF_Map *map, GF_It_Map *it) |
Set a new map iterator. More... | |
void * | gf_map_iter_has_next (GF_It_Map *it) |
return the next value in the map More... | |
GF_Err | gf_map_iter_reset (GF_It_Map *it) |
Reset the iterator in the map. More... | |
u32 | gf_map_count (const GF_Map *ptr) |
get count More... | |
GF_Err | gf_map_insert (GF_Map *ptr, const char *key, void *item) |
add item More... | |
Bool | gf_map_rem (GF_Map *ptr, const char *key) |
removes the couple key/item from the map More... | |
void * | gf_map_find (GF_Map *ptr, const char *key) |
finds item More... | |
Bool | gf_map_has_key (GF_Map *ptr, const char *key) |
Check if map contains key. More... | |
void | gf_map_reset (GF_Map *ptr) |
resets map More... | |
struct GF_Pair |
struct GF_It_Map |
struct GF_Map |
struct GF_Iterator |
Allows to go through each pair key/value in the map.
Constructs a new map object
hash_capacity | the number of slot in the hash table |
void gf_map_del | ( | GF_Map * | ptr | ) |
Destructs a map object
ptr | map object to destruct |
Associate a map iterator to a map
map | the map associated to the iterator |
it | the resulting iterator |
void* gf_map_iter_has_next | ( | GF_It_Map * | it | ) |
Return the next value of a GF_Pair in the map \param it the map iterator object
Reinitalize the iterator to the beginning of the map \param it the map iterator object
Returns number of items in the map
ptr | target map object |
Adds an item in the map with an associated key
ptr | target map object |
key | the identified key |
item | item to add |
Removes an item from the map given to its key if exists
ptr | target map object |
key | the key of the item. |
void* gf_map_find | ( | GF_Map * | ptr, |
const char * | key | ||
) |
Finds a key in the map
ptr | target map object. |
key | the key to find. |
ptr | target map object. |
key | the key to check. |
void gf_map_reset | ( | GF_Map * | ptr | ) |
Resets the content of the map
ptr | target map object. |