This module contains functions and structures related to sld_map objects.
Adds an object to a sld_map.
- Parameters
-
map | an initialized sld_map |
key | a key as a string |
value | an arbitrary object |
- Returns
- Success or failure
- Examples:
- map.c.
Removes an object from a sld_map with the specified key.
- Parameters
-
map | an initialized sld_map |
key | a key as a string |
- Returns
- Success or failure
void sld_map_free |
( |
struct sld_map * |
map | ) |
|
|
related |
void * sld_map_get_value |
( |
struct sld_map * |
map, |
|
|
char * |
key |
|
) |
| |
|
related |
Obtains the value from a sld_map using the specified key.
- Parameters
-
map | an initialized sld_map |
key | a key as a string |
- Returns
- The object paired with the specified key
- Examples:
- map.c.
Checks whether or not a sld_map contains the specified key.
- Parameters
-
map | an initialized sld_map |
key | a key as a string |
- Returns
- True or false
Obtains the key from a sld_map at the specified index.
- Parameters
-
map | an initialized sld_map |
index | an index where a key resides within the sld_map |
- Returns
- The key residing at index
- Examples:
- options.c.
Obtains the value from a sld_map at the specified index.
- Parameters
-
map | an initialized sld_map |
index | an index where a value resides within the sld_map |
- Returns
- The object residing at index
- Examples:
- options.c.