18 afw_function_internal_prepare_environment(
afw_xctx_t *xctx)
99 afw_function_evaluate_function_parameter(
114 &qualifier, &name, xctx);
119 &qualifier, &name, xctx);
143 parameter = x->function->parameters[
145 (parameter_number <= x->function->parameters_count)
147 : x->function->parameters_count
153 result = ((parameter_number <= x->argc) ? x->argv[parameter_number] : NULL);
163 parameter_number <= x->function->numberOfRequiredParameters &&
164 !parameter->optional &&
165 !parameter->canBeUndefined)
170 " can not be undefined",
182 if (parameter->data_type && result_data_type) {
184 (parameter->data_type != result_data_type))
199 if (data_type && result_data_type && result_data_type != data_type)
227 parameter_number, xctx);
271 if (result && type && type->data_type &&
AFW_DEFINE(const afw_object_t *)
#define AFW_DEFINE_INTERNAL(type)
Define an internal function for /src/afw/ source*.c files.
Adaptive Framework Core Internal.
afw_data_type_any
Data type struct for any.
afw_data_type_list
Data type struct for list.
#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_UTF8_FMT
Format string specifier used for afw_utf8_t.
apr_size_t afw_size_t
size_t.
#define AFW_SIZE_T_FMT
Format string specifier used for afw_size_t.
afw_compile_split_qualified_name(const afw_utf8_t *qualified_name, afw_utf8_t *qualifier, afw_utf8_t *name, afw_xctx_t *xctx)
Split name with optional qualifier.
const afw_value_function_definition_t * afw_environment_get_function(const afw_utf8_t *function_id, afw_xctx_t *xctx)
Get the function instance associated with function id.
afw_environment_get_qualified_function(const afw_utf8_t *qualifier, const afw_utf8_t *name, afw_xctx_t *xctx)
Get the qualified function instance.
#define AFW_THROW_ERROR_FZ(code, xctx, format_z,...)
Macro used to set error and 0 rv in xctx and throw it.
afw_function_evaluate_required_parameter(afw_function_execute_t *x, afw_size_t parameter_number, const afw_data_type_t *data_type)
Evaluate an required parameter and convert if necessary.
afw_function_evaluate_parameter_with_type(const afw_value_t *value, afw_size_t parameter_number, const afw_value_type_t *type, const afw_pool_t *p, afw_xctx_t *xctx)
Evaluate a parameter with dataTypeParameter.
afw_function_evaluate_parameter(afw_function_execute_t *x, afw_size_t parameter_number, const afw_data_type_t *data_type)
Evaluate a parameter and convert if necessary.
const afw_value_t * afw_function_execute_convert(afw_function_execute_t *x)
Function implementation function afw_function_execute_convert.
#define afw_value_get_data_type(instance, xctx)
Call method get_data_type of interface afw_value.
#define AFW_VALUE_UNDECORATE(a_value)
Undecorated value in place.
#define afw_value_evaluate(value, p, xctx)
Evaluate value if needed using specific pool.
#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.
#define afw_value_is_undefined(A_VALUE)
Determine if value is undefined.
#define afw_xctx_evaluation_stack_pop_parameter_number(xctx)
Pop top PARAMETER_NUMBER off execution stack.
#define afw_xctx_evaluation_stack_push_parameter_number(PARAMETER_NUMBER, xctx)
Push PARAMETER_NUMBER onto execution stack.
#define afw_xctx_calloc_type(type, xctx)
Macro to allocate cleared memory to hold type in xctx's pool.
Interface afw_data_type public struct.
Struct for typedef afw_environment_t defined in afw_common.h.
const afw_value_function_definition_t * divide_operator_function
Divide operator function.
const afw_value_function_definition_t * or_operator_function
Or operator function.
const afw_value_function_definition_t * less_than_or_equal_to_function
Less than or equal to operator function.
const afw_value_function_definition_t * modulus_operator_function
Modulus operator function.
const afw_value_function_definition_t * multiply_operator_function
Multiply operator function.
const afw_value_function_definition_t * add_operator_function
Add operator function.
const afw_value_function_definition_t * unary_not_operator_function
Not operator function.
const afw_value_function_definition_t * exponentiation_operator_function
Exponentiation operator function.
const afw_value_function_definition_t * subtract_operator_function
Subtract operator function.
const afw_value_function_definition_t * less_than_operator_function
Less than operator function.
const afw_value_function_definition_t * negative_operator_function
Negative operator function.
const afw_value_function_definition_t * not_equal_to_operator_function
Not equal to operator function.
const afw_value_function_definition_t * and_operator_function
And operator function.
const afw_value_function_definition_t * greater_than_operator_function
Greater than operator function.
const afw_value_function_definition_t * greater_than_or_equal_to_function
Greater than or equal to operator function.
const afw_value_function_definition_t * equal_to_operator_function
Equal to operator function.
Function execute parameter.
afw_xctx_t * xctx
The execution context (xctx) of caller.
const afw_value_function_definition_t * function
The evaluated function definition.
const afw_pool_t * p
Pool for result.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
const afw_value_function_parameter_t * returns
Function returns.
Struct for adaptive function parameter.
Interface afw_value public struct.
struct for data type string values.
Type meta (data type, data type parameters, and value meta object.
Interface afw_xctx public struct.