18 #define impl_afw_value_optional_release NULL
19 #define impl_afw_value_get_reference NULL
23 #define AFW_IMPLEMENTATION_SPECIFIC (const void *)&afw_data_type_template_direct
26 #define AFW_IMPLEMENTATION_INF_VARIABLES \
27 (const void *)&afw_data_type_template_direct, \
30 #define impl_afw_value_get_evaluated_meta \
31 afw_value_internal_get_evaluated_meta_default
33 #define impl_afw_value_get_evaluated_metas \
34 afw_value_internal_get_evaluated_metas_default
37 #define AFW_IMPLEMENTATION_ID "template_definition"
38 #define AFW_IMPLEMENTATION_INF_SPECIFIER AFW_DEFINE_CONST_DATA
39 #define AFW_IMPLEMENTATION_INF_LABEL afw_value_template_definition_inf
58 result->contextual = contextual;
59 result->count = count;
97 if (self->count == 1) {
102 else if (self->count == 0) {
110 for (i = 0, v = self->values, len = 0, s = strings;
124 for (i = 0, c = concat, s = strings; i <
self->count; i++, s++) {
125 if (*s && (*s)->len > 0) {
126 memcpy(c, (*s)->s, (*s)->len);
145 impl_afw_value_get_data_type(
156 impl_afw_value_get_evaluated_data_type(
169 impl_afw_value_get_evaluated_data_type_parameter(
181 impl_afw_value_produce_compiler_listing(
190 afw_value_compiler_listing_begin_value(writer, instance,
191 self->contextual, xctx);
196 AFW_VALUE_COMPILER_LISTING_IF_NOT_LIMIT_EXCEEDED
197 for (i = 0; i <
self->count; i++) {
198 afw_value_compiler_listing_value(self->values[i], writer, xctx);
210 impl_afw_value_decompile(
219 if (self->count == 0) {
224 if (self->count == 1) {
233 string_value.internal.s =
self->contextual->compiled_value->full_source->s +
234 self->contextual->value_offset;
235 string_value.internal.len =
self->contextual->value_size;
246 impl_afw_value_get_info(
256 info->value_inf_id = &instance->inf->rti.implementation_id;
257 info->contextual =
self->contextual;
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
Interface afw_interface implementation declares.
afw_value_evaluated_string_inf
Unmanaged evaluated value inf for data type string.
afw_data_type_template
Data type struct for template.
char afw_utf8_octet_t
8 bits of utf-8 codepoint.
apr_size_t afw_size_t
size_t.
#define afw_memory_clear(to)
Clear preallocated memory for sizeof(*(to)).
void * afw_memory_dup(const void *from, apr_size_t size, const afw_pool_t *p, afw_xctx_t *xctx)
Duplicate a block of memory into specified pool.
#define afw_pool_calloc(instance, size, xctx)
Call method calloc of interface afw_pool.
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_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_template_definition_create(const afw_compile_value_contextual_t *contextual, afw_size_t count, const afw_value_t *const *values, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for template definition value.
afw_value_as_utf8(const afw_value_t *value, const afw_pool_t *p, afw_xctx_t *xctx)
afw_value_empty_string
Adaptive value empty string.
afw_value_null
Adaptive value null.
afw_value_template_definition_inf
Value template inf.
afw_value_make_single_string(const afw_utf8_octet_t *s, afw_size_t len, const afw_pool_t *p, afw_xctx_t *xctx)
#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.
Interface afw_value public struct.
struct for data type string values.
Struct for template value.
Interface afw_writer public struct.
Interface afw_xctx public struct.