|
C Configuration Space and Tuning Library (CCS)
|
A structure that define the callbacks the user must provide to create a dynamic tree space. More...
#include <tree_space.h>
Data Fields | |
| ccs_result_t(* | del )(ccs_tree_space_t tree_space) |
| The deletion callback that will be called once the reference count of the tree space reaches 0. | |
| ccs_result_t(* | get_child )(ccs_tree_space_t tree_space, ccs_tree_t parent, size_t child_index, ccs_tree_t *child_ret) |
| The callback that will be called when querying a missing children in a dynamic tree space. | |
| ccs_result_t(* | serialize_user_state )(ccs_tree_space_t tree_space, size_t state_size, void *state, size_t *state_size_ret) |
| The tree space serialization interface, can be NULL. | |
| ccs_result_t(* | deserialize_state )(ccs_tree_t tree, ccs_feature_space_t feature_space, size_t state_size, const void *state, void **tree_space_data_ret) |
| The tree space deserialization interface, can be NULL. | |
A structure that define the callbacks the user must provide to create a dynamic tree space.
| ccs_result_t(* ccs_dynamic_tree_space_vector_s::deserialize_state) (ccs_tree_t tree, ccs_feature_space_t feature_space, size_t state_size, const void *state, void **tree_space_data_ret) |
The tree space deserialization interface, can be NULL.
In this case, only the tree is deserialized. Must return the tree space data to use at initialization
| ccs_result_t(* ccs_dynamic_tree_space_vector_s::get_child) (ccs_tree_space_t tree_space, ccs_tree_t parent, size_t child_index, ccs_tree_t *child_ret) |
The callback that will be called when querying a missing children in a dynamic tree space.
| [in] | tree_space | the dynamic tree space |
| [in] | parent | the parent of the node being queried |
| [in] | child_index | the index of the child. This value is guaranteed to be less than the arity of the parent node. |
| [out] | child_ret | a pointer to the variable that will contain the returned child node |
| ccs_result_t(* ccs_dynamic_tree_space_vector_s::serialize_user_state) (ccs_tree_space_t tree_space, size_t state_size, void *state, size_t *state_size_ret) |
The tree space serialization interface, can be NULL.
The tree is always serialized irrespective of the definition of this callback.