Blender  V3.3
BLI_expr_pylike_eval.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2018 Blender Foundation, Alexander Gavrilov. All rights reserved. */
3 
4 #pragma once
5 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
16 
18 typedef enum eExprPyLike_EvalStatus {
20  /* Computation errors; result is still set, but may be NaN */
23  /* Expression dependent errors or bugs; result is 0 */
27 
31 void BLI_expr_pylike_free(struct ExprPyLike_Parsed *expr);
43 bool BLI_expr_pylike_is_using_param(struct ExprPyLike_Parsed *expr, int index);
50 ExprPyLike_Parsed *BLI_expr_pylike_parse(const char *expression,
51  const char **param_names,
52  int param_names_len);
58  const double *param_values,
59  int param_values_len,
60  double *r_result);
61 
62 #ifdef __cplusplus
63 }
64 #endif
eExprPyLike_EvalStatus
@ EXPR_PYLIKE_FATAL_ERROR
@ EXPR_PYLIKE_SUCCESS
@ EXPR_PYLIKE_DIV_BY_ZERO
@ EXPR_PYLIKE_MATH_ERROR
@ EXPR_PYLIKE_INVALID
eExprPyLike_EvalStatus BLI_expr_pylike_eval(struct ExprPyLike_Parsed *expr, const double *param_values, int param_values_len, double *r_result)
ExprPyLike_Parsed * BLI_expr_pylike_parse(const char *expression, const char **param_names, int param_names_len)
void BLI_expr_pylike_free(struct ExprPyLike_Parsed *expr)
bool BLI_expr_pylike_is_using_param(struct ExprPyLike_Parsed *expr, int index)
bool BLI_expr_pylike_is_valid(struct ExprPyLike_Parsed *expr)
bool BLI_expr_pylike_is_constant(struct ExprPyLike_Parsed *expr)