18 #define impl_afw_value_optional_release NULL
19 #define impl_afw_value_get_reference NULL
23 #define impl_afw_value_get_evaluated_metas \
24 afw_value_internal_get_evaluated_metas_default
27 #define AFW_IMPLEMENTATION_ID "reference_by_key"
28 #define AFW_IMPLEMENTATION_INF_SPECIFIER AFW_DEFINE_CONST_DATA
29 #define AFW_IMPLEMENTATION_INF_LABEL afw_value_reference_by_key_inf
48 result->contextual = contextual;
49 result->aggregate_value = aggregate_value;
66 result->backtrace_detail = &afw_s_a_bracketed_value;
70 "index must be an integer, expression, or string",
133 "Index must be integer for list", xctx);
143 "Index out of range for list", xctx);
149 "Expecting object or list", xctx);
162 impl_afw_value_get_data_type(
173 impl_afw_value_get_evaluated_data_type(
186 impl_afw_value_get_evaluated_data_type_parameter(
215 "reference_by_key key for object must be a string",
227 "reference_by_key key for list must be an integer",
237 "reference_by_key aggregate_value must be list or object",
248 impl_afw_value_produce_compiler_listing(
256 afw_value_compiler_listing_begin_value(writer, instance,
257 self->contextual, xctx);
265 afw_value_compiler_listing_value(self->key, writer, xctx);
281 impl_afw_value_decompile(
300 impl_afw_value_get_info(
310 info->value_inf_id = &instance->inf->rti.implementation_id;
311 info->contextual =
self->contextual;
312 info->detail =
self->backtrace_detail;
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
Interface afw_interface implementation declares.
#define afw_value_is_integer(A_VALUE)
Macro to determine if value is evaluated integer.
afw_data_type_integer
Data type struct for integer.
#define afw_value_is_list(A_VALUE)
Macro to determine if value is evaluated list.
#define afw_value_is_object(A_VALUE)
Macro to determine if value is evaluated object.
afw_data_type_string
Data type struct for string.
#define afw_value_is_string(A_VALUE)
Macro to determine if value is evaluated string.
#define AFW_UTF8_FMT_ARG(A_STRING)
Convenience Macro for use with AFW_UTF8_FMT to specify arg.
#define AFW_INTEGER_FMT
Format string specifier used for afw_integer_t.
#define AFW_UTF8_FMT
Format string specifier used for afw_utf8_t.
apr_size_t afw_size_t
size_t.
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
#define afw_list_get_entry_value(instance, index, p, xctx)
Call method get_entry_value of interface afw_list.
#define afw_list_get_entry_meta(instance, index, p, xctx)
Call method get_entry_meta of interface afw_list.
#define afw_memory_clear(to)
Clear preallocated memory for sizeof(*(to)).
#define afw_object_get_property(instance, property_name, xctx)
Call method get_property of interface afw_object.
#define afw_object_get_property_meta(instance, property_name, p, xctx)
Call method get_property_meta of interface afw_object.
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
afw_size_t afw_safe_cast_integer_to_size(afw_integer_t integer, afw_xctx_t *xctx)
Safely cast afw_integer_t to afw_size_t.
afw_utf8_printf(const afw_pool_t *p, afw_xctx_t *xctx, const afw_utf8_z_t *format,...)
Create a utf-8 string using a c format string in specified pool.
const afw_value_t * impl_afw_value_get_evaluated_meta(const afw_value_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
const afw_value_t * impl_afw_value_optional_evaluate(const afw_value_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
#define afw_value_produce_compiler_listing(instance, writer, xctx)
Call method produce_compiler_listing of interface afw_value.
#define afw_value_decompile(instance, writer, xctx)
Call method decompile of interface afw_value.
#define afw_value_evaluate(value, p, xctx)
Evaluate value if needed using specific pool.
afw_value_reference_by_key_inf
Value evaluation_reference_by_key inf.
afw_value_as_utf8(const afw_value_t *value, const afw_pool_t *p, afw_xctx_t *xctx)
#define afw_value_is_defined_and_evaluated(A_VALUE)
Macro to determine if value is defined and evaluated.
afw_value_convert(const afw_value_t *value, const afw_data_type_t *to_data_type, afw_boolean_t required, const afw_pool_t *p, afw_xctx_t *xctx)
Convert a value to a value/data type.
afw_value_decompile_value(const afw_value_t *instance, const afw_writer_t *writer, afw_xctx_t *xctx)
Decompile Value::.
afw_value_reference_by_key_create(const afw_compile_value_contextual_t *contextual, const afw_value_t *aggregate_value, const afw_value_t *key, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for reference_by_key value.
#define afw_writer_increment_indent(instance, xctx)
Call method increment_indent of interface afw_writer.
#define afw_writer_write_eol(instance, xctx)
Call method write_eol of interface afw_writer.
#define afw_writer_decrement_indent(instance, xctx)
Call method decrement_indent of interface afw_writer.
#define afw_writer_write_z(writer, s_z, xctx)
Call afw_writer_write() with zero terminated string.
#define afw_xctx_evaluation_stack_push_value(VALUE, xctx)
Push VALUE onto execution stack.
#define afw_xctx_evaluation_stack_pop_value(xctx)
Pop top VALUE off execution stack.
Contextual information provided in some values.
Interface afw_data_type public struct.
const afw_compile_value_contextual_t * contextual
Contextual information or NULL.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Filled in by afw_value get_info method.
struct for data type integer values.
struct for data type list values.
struct for data type object values.
Struct for reference_by_key value.
Interface afw_value public struct.
struct for data type string values.
Interface afw_writer public struct.
Interface afw_xctx public struct.