Class ManagedEvaluator
- Namespace
- VisioForge.Core.GenICam
- Assembly
- VisioForge.Core.dll
Managed wrapper class for ArvEvaluator with automatic resource management
public class ManagedEvaluator : IDisposableInheritance
Implements
Inherited Members
Constructors
ManagedEvaluator(string)
Creates a new managed evaluator with the given expression
public ManagedEvaluator(string expression)Parameters
expressionstring-
Mathematical expression to evaluate
Properties
Expression
Sets or gets the main expression
public string Expression { get; set; }Property Value
Handle
Gets the native evaluator pointer
public nint Handle { get; }Property Value
Methods
Dispose()
Disposes the evaluator
public void Dispose()Dispose(bool)
protected virtual void Dispose(bool disposing)Parameters
disposingbool
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
namestring-
Name of the constant
Returns
- string
-
Constant value as string
GetSubExpression(string)
Gets a sub-expression
public string GetSubExpression(string name)Parameters
namestring-
Name of the sub-expression
Returns
- string
-
Expression string
SetConstant(string, string)
Sets a constant value
public void SetConstant(string name, string value)Parameters
SetSubExpression(string, string)
Sets a sub-expression
public void SetSubExpression(string name, string expression)Parameters
SetVariable(string, double)
Sets a double variable
public void SetVariable(string name, double value)Parameters
SetVariable(string, long)
Sets an integer variable
public void SetVariable(string name, long value)