ArvEvaluator

ArvEvaluator — A math expression evaluator with Genicam syntax

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── ArvEvaluator

Description

Functions

arv_evaluator_new ()

ArvEvaluator *
arv_evaluator_new (const char *expression);

Creates a new ArvEvaluator object. The syntax is described in the genicam standard specification.

Parameters

expression

an evaluator expression.

[allow-none]

Returns

a new ArvEvaluator object.


arv_evaluator_set_expression ()

void
arv_evaluator_set_expression (ArvEvaluator *evaluator,
                              const char *expression);

arv_evaluator_get_expression ()

const char *
arv_evaluator_get_expression (ArvEvaluator *evaluator);

arv_evaluator_get_constant ()

const char *
arv_evaluator_get_constant (ArvEvaluator *evaluator,
                            const char *name);

Parameters

evaluator

a ArvEvaluator

 

name

constant name

 

Returns

The formula of the constant corresponding to name , NULL if not defined.

Since: 0.6.0


arv_evaluator_get_sub_expression ()

const char *
arv_evaluator_get_sub_expression (ArvEvaluator *evaluator,
                                  const char *name);

Parameters

evaluator

a ArvEvaluator

 

name

sub-expression name

 

Returns

The formula of the sub-expression corresponding to name , NULL if not defined.

Since: 0.6.0


arv_evaluator_set_constant ()

void
arv_evaluator_set_constant (ArvEvaluator *evaluator,
                            const char *name,
                            const char *constant);

Assign a string to a constant. If constant == NULL, the constant previously assigned to name will be removed.

Parameters

evaluator

a ArvEvaluator

 

name

constant name

 

constant

constant as a string.

[allow-none]

Since: 0.6.0


arv_evaluator_set_sub_expression ()

void
arv_evaluator_set_sub_expression (ArvEvaluator *evaluator,
                                  const char *name,
                                  const char *expression);

Assign a formula to a sub-expression. If expression == NULL, the sub-expression previously assigned to name will be removed. A sub-expression may not reference another sub-expression.

Parameters

evaluator

a ArvEvaluator

 

name

sub-expression name

 

expression

sub-pexression formula.

[allow-none]

Since: 0.6.0


arv_evaluator_evaluate_as_double ()

double
arv_evaluator_evaluate_as_double (ArvEvaluator *evaluator,
                                  GError **error);

arv_evaluator_evaluate_as_int64 ()

gint64
arv_evaluator_evaluate_as_int64 (ArvEvaluator *evaluator,
                                 GError **error);

arv_evaluator_set_double_variable ()

void
arv_evaluator_set_double_variable (ArvEvaluator *evaluator,
                                   const char *name,
                                   double v_double);

arv_evaluator_set_int64_variable ()

void
arv_evaluator_set_int64_variable (ArvEvaluator *evaluator,
                                  const char *name,
                                  gint64 v_int64);

Types and Values

ArvEvaluator

typedef struct _ArvEvaluator ArvEvaluator;