Unify Framework Lib 1.7.0
attribute_store Namespace Reference

Typedefs

using node_changed_callback = std::function< void(attribute_store_node_t, attribute_store_change_t)>
 

Functions

void register_callback_by_type (node_changed_callback callback_function, attribute_store_type_t type)
 Register a callback function to any node with a given type. More...
 
void register_callback_by_type_and_state (node_changed_callback callback_function, attribute_store_type_t type, attribute_store_node_value_state_t value_state)
 Register a callback function to any node with a given type and value state. More...
 

Typedef Documentation

◆ node_changed_callback

Function Documentation

◆ register_callback_by_type()

void attribute_store::register_callback_by_type ( node_changed_callback  callback_function,
attribute_store_type_t  type 
)

Register a callback function to any node with a given type.

Note
We can't check uniqueness of the callback function, so it's up to the user to make sure that the same callback function is not registered multiple times.
Parameters
callback_functionThe function to invoke when the node's value is updated.
typeThe attribute node type for which a callback will be registered.

◆ register_callback_by_type_and_state()

void attribute_store::register_callback_by_type_and_state ( node_changed_callback  callback_function,
attribute_store_type_t  type,
attribute_store_node_value_state_t  value_state 
)

Register a callback function to any node with a given type and value state.

Note
We can't check uniqueness of the callback function, so it's up to the user to make sure that the same callback function is not registered multiple times.
Parameters
callback_functionThe function to invoke when the node's value is updated.
typeThe attribute node type for which a callback will be registered.
value_stateThe value state for which a callback will be registered.