|
C Configuration Space and Tuning Library (CCS)
|
CCS map defines a key-value store. More...

Go to the source code of this file.
Functions | |
| ccs_result_t | ccs_create_map (ccs_map_t *map_ret) |
| Create a new map. | |
| ccs_result_t | ccs_map_set (ccs_map_t map, ccs_datum_t key, ccs_datum_t value) |
| Associate a key to a value in a map. | |
| ccs_result_t | ccs_map_exist (ccs_map_t map, ccs_datum_t key, ccs_bool_t *exist) |
| Check if a key exists in a map. | |
| ccs_result_t | ccs_map_get (ccs_map_t map, ccs_datum_t key, ccs_datum_t *value_ret) |
| Get the value associated with a key. | |
| ccs_result_t | ccs_map_del (ccs_map_t map, ccs_datum_t key) |
| Delete a key in a map. | |
| ccs_result_t | ccs_map_get_keys (ccs_map_t map, size_t num_keys, ccs_datum_t *keys, size_t *num_keys_ret) |
| Get the keys contained in a map. | |
| ccs_result_t | ccs_map_get_values (ccs_map_t map, size_t num_values, ccs_datum_t *values, size_t *num_values_ret) |
| Get the values contained in a map. | |
| ccs_result_t | ccs_map_get_pairs (ccs_map_t map, size_t num_pairs, ccs_datum_t *keys, ccs_datum_t *values, size_t *num_pairs_ret) |
| Get the keys and values contained in a map. | |
| ccs_result_t | ccs_map_clear (ccs_map_t map) |
| Remove all pairs from a map. | |
CCS map defines a key-value store.
|
extern |
Create a new map.
| [out] | map_ret | a pointer to the variable that will contain the returned map |
map_ret is NULL
|
extern |
Remove all pairs from a map.
| [in,out] | map |
map is not a valid CCS map
|
extern |
Delete a key in a map.
| [in,out] | map | |
| [in] | key |
map is not a valid CCS map key does not exist in map
|
extern |
Check if a key exists in a map.
| [in] | map | |
| [in] | key | |
| [out] | exist | a pointer to a variable that will hold the result of the search |
map is not a valid CCS map exist is NULL
|
extern |
Get the value associated with a key.
| [in] | map | |
| [in] | key | |
| [out] | value_ret | a pointer to a variable that will hold the returned value or ccs_none if not found |
map is not a valid CCS map value_ret is NULL
|
extern |
Get the keys contained in a map.
| [in] | map | |
| [in] | num_keys | the number of keys that can be added to keys. If keys is not NULL, num_keys must be greater than 0 |
| [out] | keys | an array of num_keys ccs_datum_t that will contain the returned keys of NULL. If the array is too big, extra values will be set to ccs_none |
| [out] | num_keys_ret | a pointer to a variable that will contain the number of keys that are or would be returned. Can be NULL |
map is not a valid CCS map keys is NULL and num_keys is greater than 0; or if keys is NULL and num_keys_ret is NULL; or if num_keys is less than the number of keys that would be returned
|
extern |
Get the keys and values contained in a map.
| [in] | map | |
| [in] | num_pairs | the number of keys that can be added to keys. If keys is not NULL, num_pairs must be greater than 0 |
| [out] | keys | an array of num_pairs ccs_datum_t that will contain the returned keys of NULL. If the array is too big, extra values will be set to ccs_none |
| [out] | values | an array of num_pairs ccs_datum_t that will contain the returned values of NULL. If the array is too big, extra values will be set to ccs_none |
| [out] | num_pairs_ret | a pointer to a variable that will contain the number of keys that are or would be returned. Can be NULL |
map is not a valid CCS map keys is NULL and num_pairs is greater than 0; or if keys is NULL and num_pairs_ret is NULL; or if num_pairs is less than the number of values that would be returned; if values is NULL and num_pairs is greater than 0; or if values is NULL and num_pairs_ret is NULL; or if num_pairs is less than the number of values that would be returned
|
extern |
Get the values contained in a map.
| [in] | map | |
| [in] | num_values | the number of values that can be added to values. If values is not NULL, num_values must be greater than 0 |
| [out] | values | an array of num_values ccs_datum_t that will contain the returned values of NULL. If the array is too big, extra values will be set to ccs_none |
| [out] | num_values_ret | a pointer to a variable that will contain the number of values that are or would be returned. Can be NULL |
map is not a valid CCS map values is NULL and num_values is greater than 0; or if values is NULL and num_values_ret is NULL; or if num_values is less than the number of values that would be returned
|
extern |
Associate a key to a value in a map.
| [in,out] | map | |
| [in] | key | if a transient string it will be memoized, if a CCS object it will be retained unless CCS_DATUM_FLAG_ID is used. |
| [in] | value | if a transient string it will be memoized, if a CCS object it will be retained unless CCS_DATUM_FLAG_ID is used. |
map is not a valid CCS map