Table of Contents

Class ManagedEvaluator

Namespace
VisioForge.Core.GenICam
Assembly
VisioForge.Core.dll

Managed wrapper class for ArvEvaluator with automatic resource management

public class ManagedEvaluator : IDisposable

Inheritance

Implements

Inherited Members

Constructors

ManagedEvaluator(string)

Creates a new managed evaluator with the given expression

public ManagedEvaluator(string expression)

Parameters

expression string

Mathematical expression to evaluate

Properties

Expression

Sets or gets the main expression

public string Expression { get; set; }

Property Value

string

Handle

Gets the native evaluator pointer

public nint Handle { get; }

Property Value

nint

Methods

Dispose()

Disposes the evaluator

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

EvaluateAsDouble()

Evaluates the expression as a double

public double EvaluateAsDouble()

Returns

double

Result as double

Exceptions

InvalidOperationException

Thrown if evaluation fails

EvaluateAsInt64()

Evaluates the expression as a long integer

public long EvaluateAsInt64()

Returns

long

Result as long

Exceptions

InvalidOperationException

Thrown if evaluation fails

~ManagedEvaluator()

protected ~ManagedEvaluator()

GetConstant(string)

Gets a constant value

public string GetConstant(string name)

Parameters

name string

Name of the constant

Returns

string

Constant value as string

GetSubExpression(string)

Gets a sub-expression

public string GetSubExpression(string name)

Parameters

name string

Name of the sub-expression

Returns

string

Expression string

SetConstant(string, string)

Sets a constant value

public void SetConstant(string name, string value)

Parameters

name string

Name of the constant

value string

Constant value as string

SetSubExpression(string, string)

Sets a sub-expression

public void SetSubExpression(string name, string expression)

Parameters

name string

Name of the sub-expression

expression string

Expression string

SetVariable(string, double)

Sets a double variable

public void SetVariable(string name, double value)

Parameters

name string

Variable name

value double

Variable value

SetVariable(string, long)

Sets an integer variable

public void SetVariable(string name, long value)

Parameters

name string

Variable name

value long

Variable value