 |
PK_EXPR_sf_t |
|
struct PK_EXPR_sf_s
{
const char *root_expr; --- root expression definition (NULL)
int n_sub_exprs; --- number of sub-expressions (0)
const char **sub_expr_names; --- sub-expression names (NULL)
const char **sub_expr_defs; --- sub-expression definitions (NULL)
int n_consts; --- number of application constants (0)
const char **const_names; --- constant names (NULL)
PK_EXPR_value_t *const_values; --- constant values (NULL)
};
typedef struct PK_EXPR_sf_s PK_EXPR_sf_t;
This structure contains an expression to be evaluated.
Specific Errors:
PK_ERROR_bad_expr A supplied root expression or sub-expression
is invalid. (MILD)
PK_ERROR_evaluator_failed Failed to evaluate the expression, for example
a function call within the expression failing
to evaluate. (SERIOUS)
PK_ERROR_bad_name The expression contains a sub-expression or
constant with a name that is not allowed.
This includes having the same name as an input
variable to the expression. (MILD)
PK_ERROR_expr_dupl_defn The expression contains duplicate names used
for sub-expressions and/or constants. (MILD)
PK_ERROR_expr_undef_symb The root expression or sub-expressions contain
undefined symbols. (MILD)
Used in:
PK_FACE_change_deform_o_t
The expressions language allows an application to supply a formula to evaluate,
in the form of one or more strings.
See here for more information.
Description of fields:
'root_expr' The expression to evaluate.
'n_sub_exprs' The number of sub-expressions.
'sub_expr_names' An array of length 'n_sub_exprs', containing the name of
each sub-expression. Sub-expressions are optional, and
referenced by name by the root_expr. For example, if one
had a sub-expression named "sbx_my_sub_expr", then
referencing "sbx_my_sub_expr" in the 'root_expr' would
evaluate the expression definition corresponding to
"sbx_my_sub_expr".
'sub_expr_defs' A parallel array containing the sub-expressions.
'n_consts' The number of application constants. Constants are
optional, and if supplied may be referenced by expressions
(either the root expression, or sub-expressions).
'const_names' An array of length 'n_consts', containing the name of each
constant.
'const_values' A parallel array containing the value of each constant.