|
Adaptive Framework
0.9.0
|
Files | |
| file | afw_runtime.h |
| Runtime objects adaptor. | |
Data Structures | |
| struct | afw_runtime_custom_s |
| struct | afw_runtime_object_type_meta_s |
| struct | afw_runtime_object_map_property_s |
| Struct for runtime object map property. More... | |
| struct | afw_runtime_object_map_s |
| struct | afw_runtime_object_indirect_s |
| Struct for runtime objects. More... | |
| struct | afw_runtime_const_object_instance_s |
| struct | afw_runtime_const_object_meta_object_s |
| meta instance with single parent path. More... | |
| struct | afw_runtime_property_s |
| struct | afw_runtime_unresolved_const_list_s |
| struct | afw_runtime_unresolved_const_object_s |
| struct | afw_runtime_unresolved_const_embedded_untyped_object_s |
| struct | afw_runtime_unresolved_value_s |
| Runtime unresolved value. More... | |
| struct | afw_runtime_unresolved_property_s |
| Runtime unresolved property. More... | |
Macros | |
| #define | AFW_RUNTIME_OBJECT_RTI(label_, meta_) |
| #define | AFW_RUNTIME_OBJECT_INF(inf_, meta_) |
Typedefs | |
| typedef enum afw_runtime_unresolved_primitive_type_e | afw_runtime_unresolved_primitive_type_t |
| Runtime unresolved primitive value. | |
| typedef const afw_object_t *(* | afw_runtime_object_wrapper_p_cb_t) (void *data, const afw_pool_t *p, afw_xctx_t *xctx) |
| Typedef used for afw_runtime_env_set_object_cb_wrapper() cb. More... | |
Functions | |
| const afw_object_t * | afw_runtime_object_create_indirect_using_inf (const afw_object_inf_t *inf, const afw_utf8_t *object_id, void *internal, const afw_pool_t *p, afw_xctx_t *xctx) |
| Create an indirect runtime object. More... | |
| void | afw_runtime_env_set_object (const afw_object_t *object, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Set an object pointer in the environment's runtime objects. More... | |
| void | afw_runtime_env_set_objects (const afw_object_t *const *objects, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Set a list of object pointers in the environment's runtime objects. More... | |
| void | afw_runtime_env_set_object_cb_wrapper (const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, afw_runtime_object_wrapper_p_cb_t callback, void *data, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Set environment object accessed via callback. More... | |
| void | afw_runtime_env_create_and_set_indirect_object (const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, void *internal, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Create and set an indirect runtime object. More... | |
| void | afw_runtime_env_create_and_set_indirect_object_using_inf (const afw_object_inf_t *inf, const afw_utf8_t *object_id, void *internal, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Create and set an indirect runtime object. More... | |
| void | afw_runtime_env_resolve_and_set_const_objects (const afw_runtime_unresolved_const_object_t *const *unresolved, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Resolve and set a NULL terminated list of object pointers in the xctx's runtime objects. More... | |
| void | afw_runtime_foreach (const afw_utf8_t *object_type_id, void *context, afw_object_cb_t callback, afw_xctx_t *xctx) |
| Call a callback for each runtime object. More... | |
| const afw_adaptor_factory_t * | afw_runtime_get_adaptor_factory () |
| Get singleton factory for runtime adaptor. More... | |
| const afw_adaptor_session_t * | afw_runtime_get_internal_session (afw_xctx_t *xctx) |
| Get an internal session for runtime objects. More... | |
| const afw_object_t * | afw_runtime_get_object (const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, afw_xctx_t *xctx) |
| Get a runtime object. More... | |
| const afw_object_t * | afw_runtime_object_create_indirect (const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, void *internal, const afw_pool_t *p, afw_xctx_t *xctx) |
| Create an indirect runtime object. More... | |
| void | afw_runtime_remove_object (const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, afw_xctx_t *xctx) |
| Remove object by object type id and object id. More... | |
| void | afw_runtime_xctx_set_object (const afw_object_t *object, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Set an object pointer in the xctx's runtime objects. More... | |
| void | afw_runtime_xctx_set_objects (const afw_object_t *const *objects, afw_boolean_t overwrite, afw_xctx_t *xctx) |
| Set a list of object pointers in the xctx's runtime objects. More... | |
| void | afw_runtime_register_object_map_infs (const afw_object_inf_t *const *inf, afw_xctx_t *xctx) |
| Register runtime object map interfaces. More... | |
| void | afw_runtime_resolve_and_register_object_map_infs (const afw_interface_implementation_rti_t *const *rti, afw_xctx_t *xctx) |
| Create and register runtime object map interfaces. More... | |
| const afw_object_t * | afw_runtime_resolve_const_object (const afw_runtime_unresolved_const_object_t *unresolved, const afw_pool_t *p, afw_xctx_t *xctx) |
| Resolve a runtime const object. More... | |
| void | afw_runtime_object_release (const afw_object_t *instance, afw_xctx_t *xctx) |
| Method release for runtime object. More... | |
| void | afw_runtime_object_add_reference (const afw_object_t *instance, afw_xctx_t *xctx) |
| Method add_reference for runtime object. More... | |
| afw_size_t | afw_runtime_object_get_count (const afw_object_t *instance, afw_xctx_t *xctx) |
| Method get_count for runtime object. More... | |
| const afw_utf8_t * | afw_runtime_object_get_object_type_id (const afw_object_t *instance, afw_xctx_t *xctx) |
| Method get_object_type_id for runtime object. | |
| const afw_value_t * | afw_runtime_object_get_meta (const afw_object_t *instance, const afw_pool_t *p, afw_xctx_t *xctx) |
| Method get_meta for runtime object. | |
| const afw_value_t * | afw_runtime_object_get_property (const afw_object_t *instance, const afw_utf8_t *property_name, afw_xctx_t *xctx) |
| Method get_property for runtime object. | |
| const afw_value_t * | afw_runtime_object_get_property_meta (const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx) |
| Method get_property_meta for runtime object. | |
| const afw_value_t * | afw_runtime_object_get_next_own_property (const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, afw_xctx_t *xctx) |
| Method get_next_property for runtime object. | |
| const afw_value_t * | afw_runtime_object_get_next_property_meta (const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, const afw_pool_t *p, afw_xctx_t *xctx) |
| Method get_next_property_meta for runtime object. | |
| afw_boolean_t | afw_runtime_object_has_property (const afw_object_t *instance, const afw_utf8_t *property_name, afw_xctx_t *xctx) |
| Method has_property for runtime object. | |
| const afw_object_setter_t * | afw_runtime_object_get_setter (const afw_object_t *instance, afw_xctx_t *xctx) |
| Method get_setter for runtime object. | |
Variables | |
| afw_runtime_inf_const_embedded_untyped_object | |
| afw_runtime_inf_const_meta_object_inf | |
This is an Adaptive Framework read-only objects adaptor.
| #define AFW_RUNTIME_OBJECT_INF | ( | inf_, | |
| meta_ | |||
| ) |
Definition at line 638 of file afw_runtime.h.
| #define AFW_RUNTIME_OBJECT_RTI | ( | label_, | |
| meta_ | |||
| ) |
Definition at line 627 of file afw_runtime.h.
| typedef const afw_object_t*(* afw_runtime_object_wrapper_p_cb_t) (void *data, const afw_pool_t *p, afw_xctx_t *xctx) |
Typedef used for afw_runtime_env_set_object_cb_wrapper() cb.
| data | set on afw_runtime_env_set_object_cb_wrapper(). |
| p | to use. |
| xctx | of caller. |
Definition at line 379 of file afw_runtime.h.
Runtime unresolved primitive value.
| Enumerator | |
|---|---|
| afw_runtime_unresolved_primitive_type_boolean | value is NULL for false and non-NULL for true. |
| afw_runtime_unresolved_primitive_type_number | value points to (double) |
| afw_runtime_unresolved_primitive_type_integer | value points to (integer) |
| afw_runtime_unresolved_primitive_type_list | afw_runtime_unresolved_const_list_t. |
| afw_runtime_unresolved_primitive_type_object | value points to afw_runtime_unresolved_const_embedded_untyped_object_s. |
| afw_runtime_unresolved_primitive_type_string | value points to afw_utf8_z_t. |
Definition at line 266 of file afw_runtime.h.
| void afw_runtime_env_create_and_set_indirect_object | ( | const afw_utf8_t * | object_type_id, |
| const afw_utf8_t * | object_id, | ||
| void * | internal, | ||
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Create and set an indirect runtime object.
| object_type_id | of a registered map. |
| object_id | of object. |
| internal | is pointer to object's internal. |
| overwrite | whether to throw error is object with path exists. |
| xctx | The intent of this function is to create a runtime object to represent a runtime struct mapped by a registered runtime object map. |
Definition at line 528 of file afw_runtime.c.
| void afw_runtime_env_create_and_set_indirect_object_using_inf | ( | const afw_object_inf_t * | inf, |
| const afw_utf8_t * | object_id, | ||
| void * | internal, | ||
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Create and set an indirect runtime object.
| inf | of map. |
| object_id | of object. |
| internal | is pointer to object's internal. |
| overwrite | whether to throw error is object with path exists. |
| xctx | The intent of this function is to create a runtime object to represent a runtime struct mapped by a registered runtime object map. |
Definition at line 507 of file afw_runtime.c.
| void afw_runtime_env_resolve_and_set_const_objects | ( | const afw_runtime_unresolved_const_object_t *const * | unresolved, |
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Resolve and set a NULL terminated list of object pointers in the xctx's runtime objects.
| unresolved | NULL terminated list of unresolved object pointers. |
| overwrite | whether to throw error is object with path exists. |
| xctx | of caller. |
Definition at line 750 of file afw_runtime.c.
| void afw_runtime_env_set_object | ( | const afw_object_t * | object, |
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Set an object pointer in the environment's runtime objects.
| object | to set in the xctx's runtime objects. |
| overwrite | whether to throw error is object with path exists. |
| xctx | of caller. |
Definition at line 210 of file afw_runtime.c.
| void afw_runtime_env_set_object_cb_wrapper | ( | const afw_utf8_t * | object_type_id, |
| const afw_utf8_t * | object_id, | ||
| afw_runtime_object_wrapper_p_cb_t | callback, | ||
| void * | data, | ||
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Set environment object accessed via callback.
| object_type_id | of a registered map. |
| object_id | of object. |
| callback | to call; |
| data | passed to callback. |
| overwrite | whether to throw error is object with path exists. |
| xctx |
Definition at line 240 of file afw_runtime.c.
| void afw_runtime_env_set_objects | ( | const afw_object_t *const * | objects, |
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Set a list of object pointers in the environment's runtime objects.
| objects | NULL terminated list of object pointers. |
| overwrite | whether to throw error is object with path exists. |
| xctx | of caller. |
Definition at line 228 of file afw_runtime.c.
| void afw_runtime_foreach | ( | const afw_utf8_t * | object_type_id, |
| void * | context, | ||
| afw_object_cb_t | callback, | ||
| afw_xctx_t * | xctx | ||
| ) |
Call a callback for each runtime object.
| object_type_id | of objects to pass to callback. |
| context | to be passed to callback. |
| callback | function. |
| xctx | of caller. |
Custom handled object types are not supported and will call callback once with NULL object.
The callback function is the same type as the normal adaptor get/retrieve callback, but should not release the object passed.
Definition at line 900 of file afw_runtime.c.
| const afw_adaptor_factory_t* afw_runtime_get_adaptor_factory | ( | ) |
Get singleton factory for runtime adaptor.
Definition at line 915 of file afw_runtime.c.
| const afw_adaptor_session_t* afw_runtime_get_internal_session | ( | afw_xctx_t * | xctx | ) |
Get an internal session for runtime objects.
| p | to use for session. |
| xctx | of caller. |
Definition at line 961 of file afw_runtime.c.
| const afw_object_t* afw_runtime_get_object | ( | const afw_utf8_t * | object_type_id, |
| const afw_utf8_t * | object_id, | ||
| afw_xctx_t * | xctx | ||
| ) |
Get a runtime object.
| object_type_id | of object. |
| object_id | of object. |
| xctx | of caller. |
Definition at line 853 of file afw_runtime.c.
| void afw_runtime_object_add_reference | ( | const afw_object_t * | instance, |
| afw_xctx_t * | xctx | ||
| ) |
Method add_reference for runtime object.
Definition at line 1328 of file afw_runtime.c.
| const afw_object_t* afw_runtime_object_create_indirect | ( | const afw_utf8_t * | object_type_id, |
| const afw_utf8_t * | object_id, | ||
| void * | internal, | ||
| const afw_pool_t * | p, | ||
| afw_xctx_t * | xctx | ||
| ) |
Create an indirect runtime object.
| object_type_id | of a registered map. |
| object_id | of object. |
| internal | is pointer to object's internal. |
| p | for result. |
| xctx | The intent of this function is to create a runtime object to represent a runtime struct mapped by a registered runtime object map. |
Definition at line 481 of file afw_runtime.c.
| const afw_object_t* afw_runtime_object_create_indirect_using_inf | ( | const afw_object_inf_t * | inf, |
| const afw_utf8_t * | object_id, | ||
| void * | internal, | ||
| const afw_pool_t * | p, | ||
| afw_xctx_t * | xctx | ||
| ) |
Create an indirect runtime object.
| inf | of map. |
| object_id | of object. |
| internal | is pointer to object's internal. |
| p | for result. |
| xctx | The intent of this function is to create a runtime object to represent a runtime struct mapped by a registered runtime object map. |
Definition at line 449 of file afw_runtime.c.
| afw_size_t afw_runtime_object_get_count | ( | const afw_object_t * | instance, |
| afw_xctx_t * | xctx | ||
| ) |
Method get_count for runtime object.
Definition at line 1341 of file afw_runtime.c.
| void afw_runtime_object_release | ( | const afw_object_t * | instance, |
| afw_xctx_t * | xctx | ||
| ) |
Method release for runtime object.
Definition at line 1315 of file afw_runtime.c.
| void afw_runtime_register_object_map_infs | ( | const afw_object_inf_t *const * | inf, |
| afw_xctx_t * | xctx | ||
| ) |
Register runtime object map interfaces.
| inf | is NULL terminate list of inf pointers. |
| xctx | inf->rti->implementation_specific MUST pointed to afw_runtime_object_type_meta_t of map. |
Definition at line 356 of file afw_runtime.c.
| void afw_runtime_remove_object | ( | const afw_utf8_t * | object_type_id, |
| const afw_utf8_t * | object_id, | ||
| afw_xctx_t * | xctx | ||
| ) |
Remove object by object type id and object id.
| object_type_id | of object to remove. |
| object_id | of object to remove. |
| xctx | of caller. |
No error is thrown if object is not found.
Definition at line 262 of file afw_runtime.c.
| void afw_runtime_resolve_and_register_object_map_infs | ( | const afw_interface_implementation_rti_t *const * | rti, |
| afw_xctx_t * | xctx | ||
| ) |
Create and register runtime object map interfaces.
| rti | is NULL terminate list of rti pointers. |
| xctx | rti->implementation_specific MUST pointed to afw_runtime_object_type_meta_t of map. |
Definition at line 373 of file afw_runtime.c.
| const afw_object_t* afw_runtime_resolve_const_object | ( | const afw_runtime_unresolved_const_object_t * | unresolved, |
| const afw_pool_t * | p, | ||
| afw_xctx_t * | xctx | ||
| ) |
Resolve a runtime const object.
| unresolved | is an unresolved runtime object. |
| p | to use. |
| xctx | of caller. |
Definition at line 701 of file afw_runtime.c.
| void afw_runtime_xctx_set_object | ( | const afw_object_t * | object, |
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Set an object pointer in the xctx's runtime objects.
| object | to set in the xctx's runtime objects. |
| overwrite | whether to throw error is object with path exists. |
| xctx | of caller. |
Definition at line 292 of file afw_runtime.c.
| void afw_runtime_xctx_set_objects | ( | const afw_object_t *const * | objects, |
| afw_boolean_t | overwrite, | ||
| afw_xctx_t * | xctx | ||
| ) |
Set a list of object pointers in the xctx's runtime objects.
| objects | NULL terminated list of object pointers. |
| overwrite | whether to throw error is object with path exists. |
| xctx | of caller. |
Definition at line 344 of file afw_runtime.c.