|
C Configuration Space and Tuning Library (CCS)
|
A Binding is set of value in a Context see context.h. More...

Go to the source code of this file.
Functions | |
| ccs_result_t | ccs_binding_get_context (ccs_binding_t binding, ccs_context_t *context_ret) |
| Get the context of a binding. | |
| ccs_result_t | ccs_binding_get_value (ccs_binding_t binding, size_t index, ccs_datum_t *value_ret) |
| Get the value of the parameter at the given index. | |
| ccs_result_t | ccs_binding_get_values (ccs_binding_t binding, size_t num_values, ccs_datum_t *values, size_t *num_values_ret) |
| Get all the values in the binding. | |
| ccs_result_t | ccs_binding_get_value_by_name (ccs_binding_t binding, const char *name, ccs_bool_t *found_ret, ccs_datum_t *value_ret) |
| Get the value of the parameter with the given name. | |
| ccs_result_t | ccs_binding_get_value_by_parameter (ccs_binding_t binding, ccs_parameter_t parameter, ccs_bool_t *found_ret, ccs_datum_t *value_ret) |
| Get the value of the parameter with the given handle. | |
| ccs_result_t | ccs_binding_hash (ccs_binding_t binding, ccs_hash_t *hash_ret) |
| Compute a hash value for the binding by hashing together the context reference, the number of values, and the values themselves. | |
| ccs_result_t | ccs_binding_cmp (ccs_binding_t binding, ccs_binding_t other_binding, int *cmp_ret) |
| Define a strict ordering of binding instances. | |
A Binding is set of value in a Context see context.h.
Those values can be accessed by using the parameter index in the context. Bindings are immutable except from a reference counting and callback management point of view.
|
extern |
Define a strict ordering of binding instances.
Context, number of values and values are compared.
| [in] | binding | the first binding |
| [in] | other_binding | the second binding |
| [out] | cmp_ret | the pointer to the variable that will contain the result of the comparison. Will contain -1, 0, or 1 depending on if the first binding is found to be respectively lesser than, equal, or greater then the second binding |
binding or other_binding are not valid CCS bindings; or if binding and other_binding are bindings of different types cmp_ret is NULL
|
extern |
Get the context of a binding.
| [in] | binding | |
| [out] | context_ret | a pointer to the variable which will contain the context |
binding is not a valid CCS object context_ret is NULL
|
extern |
Get the value of the parameter at the given index.
| [in] | binding | |
| [in] | index | index of the parameter in the associated context |
| [out] | value_ret | a pointer to the variable that will hold the value |
binding is not a valid CCS object value_ret is NULL index is greater than the count of parameters in the context
|
extern |
Get the value of the parameter with the given name.
| [in] | binding | |
| [in] | name | the name of the parameter whose value to retrieve |
| [out] | found_ret | a pointer to the an optional variable that will hold whether a parameter named name was found in binding |
| [out] | value_ret | a pointer to the variable that will hold the value |
binding is not a valid CCS object value_ret is NULL found_ret is NULL no parameter with such name exist in the binding context
|
extern |
Get the value of the parameter with the given handle.
| [in] | binding | |
| [in] | parameter | parameter whose value to retrieve |
| [out] | found_ret | a pointer to the an optional variable that will hold whether the parameter was found in the binding context |
| [out] | value_ret | a pointer to the variable that will hold the value |
binding is not a valid CCS object found_ret is NULL and parameter does not exist in binding context
|
extern |
Get all the values in the binding.
| [in] | binding | |
| [in] | num_values | the size of the values array |
| [out] | values | an array of size num_values to hold the returned values or NULL. If the array is too big, extra values are set to CCS_DATA_TYPE_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 |
binding is not a valid CCS object 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 |
Compute a hash value for the binding by hashing together the context reference, the number of values, and the values themselves.
| [in] | binding | |
| [out] | hash_ret | the address of the variable that will contain the hash value. |
binding is not a valid CCS binding hash_ret is NULL