9 #ifndef __AFW_RUNTIME_H__
10 #define __AFW_RUNTIME_H__
32 afw_runtime_inf_const_embedded_untyped_object;
35 afw_runtime_inf_const_meta_object_inf;
142 const afw_utf8_t *unresolved_data_type_parameter_data_type_id;
380 (*afw_runtime_object_wrapper_p_cb_t)(
627 #define AFW_RUNTIME_OBJECT_RTI(label_, meta_) \
629 static const afw_interface_implementation_rti_t \
631 AFW_UTF8_LITERAL("afw_object"), \
632 AFW_UTF8_LITERAL(__FILE__), \
633 AFW_UTF8_LITERAL("afw_runtime"), \
638 #define AFW_RUNTIME_OBJECT_INF(inf_, meta_) \
640 AFW_DEFINE_CONST_DATA(afw_object_inf_t) \
643 AFW_UTF8_LITERAL("afw_object"), \
644 AFW_UTF8_LITERAL(__FILE__), \
645 AFW_UTF8_LITERAL("afw_runtime"), \
648 afw_runtime_object_release, \
649 afw_runtime_object_add_reference, \
650 afw_runtime_object_get_count, \
651 afw_runtime_object_get_meta, \
652 afw_runtime_object_get_property, \
653 afw_runtime_object_get_property_meta, \
654 afw_runtime_object_get_next_own_property, \
655 afw_runtime_object_get_next_property_meta, \
656 afw_runtime_object_has_property, \
657 afw_runtime_object_get_setter \
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE(type)
Declare a public afw function.
Interfaceafw_interface header.
AFW_DECLARE_CONST_DATA(afw_utf8_t) afw_s_200
afw_utf8_t for string 200
void(* afw_adaptor_session_retrieve_objects_t)(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_query_criteria_t *criteria, void *context, afw_object_cb_t callback, const afw_object_t *adaptor_type_specific, const afw_pool_t *p, afw_xctx_t *xctx)
void(* afw_adaptor_session_get_object_t)(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, void *context, afw_object_cb_t callback, const afw_object_t *adaptor_type_specific, const afw_pool_t *p, afw_xctx_t *xctx)
afw_boolean_t(* afw_object_cb_t)(const afw_object_t *object, void *context, afw_xctx_t *xctx)
Typedef for afw_adaptor_session_object callback.
double afw_double_t
Normal AFW number is double.
struct afw_iterator_s afw_iterator_t
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
apr_size_t afw_size_t
size_t.
apr_int64_t afw_integer_t
typedef for big signed int.
void afw_runtime_object_release(const afw_object_t *instance, afw_xctx_t *xctx)
Method release for runtime object.
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.
afw_size_t afw_runtime_object_get_count(const afw_object_t *instance, afw_xctx_t *xctx)
Method get_count for runtime object.
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.
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.
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.
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.
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.
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_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_adaptor_session_t * afw_runtime_get_internal_session(afw_xctx_t *xctx)
Get an internal session for runtime objects.
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.
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.
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.
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.
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.
void afw_runtime_object_add_reference(const afw_object_t *instance, afw_xctx_t *xctx)
Method add_reference for runtime object.
enum afw_runtime_unresolved_primitive_type_e afw_runtime_unresolved_primitive_type_t
Runtime unresolved primitive value.
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.
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.
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.
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.
void afw_runtime_register_object_map_infs(const afw_object_inf_t *const *inf, afw_xctx_t *xctx)
Register runtime object map interfaces.
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.
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.
afw_runtime_unresolved_primitive_type_e
Runtime unresolved primitive value.
const afw_adaptor_factory_t * afw_runtime_get_adaptor_factory()
Get singleton factory for runtime adaptor.
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.
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.
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.
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.
@ afw_runtime_unresolved_primitive_type_list
@ afw_runtime_unresolved_primitive_type_string
value points to afw_utf8_z_t.
@ afw_runtime_unresolved_primitive_type_object
@ afw_runtime_unresolved_primitive_type_integer
@ afw_runtime_unresolved_primitive_type_number
@ afw_runtime_unresolved_primitive_type_boolean
Interface afw_adaptor_factory public struct.
Interface afw_adaptor_session public struct.
Interface afw_data_type public struct.
Interface Implementation Run Time Information.
Interface afw_object_inf_s struct.
Interface afw_object public struct.
Interface afw_object_setter public struct.
Interface afw_pool public struct.
const afw_runtime_property_t *const * properties
afw_adaptor_session_get_object_t get_object
The session get_object method.
afw_adaptor_session_retrieve_objects_t retrieve_objects
The session retrieve_objects method.
Struct for runtime objects.
Struct for runtime object map property.
afw_size_t offset
Offset of internal property value in internal object struct.
afw_utf8_t data_type_parameter
const afw_utf8_t * accessor_name
Name of registered runtime value accessor function.
afw_runtime_value_accessor_t accessor
Accessor function or NULL.
const afw_utf8_t * name
Property name.
afw_size_t count_offset
Offset of bag value count afw_size_t for bag values or -1.
afw_size_t parent_paths_count
const afw_utf8_t * parent_paths
const afw_utf8_t * object_type_id
const afw_runtime_unresolved_property_t *const * properties
const afw_utf8_t * object_id
Runtime unresolved property.
const afw_utf8_z_t * name
Property name.
afw_runtime_unresolved_value_t value
Unresolved value.
Runtime unresolved value.
afw_runtime_unresolved_primitive_type_t type
Primitive type of value.
NFC normalized UTF-8 string.
struct for data type list values.
Interface afw_value public struct.
Interface afw_xctx public struct.