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)
Marks this instance as disposed but does NOT release the underlying ArvEvaluator GObject — no managed
g_object_unref binding is exposed. The native library is expected to free the evaluator with its
owning camera context; do not rely on this VisioForge.Core.GenICam.ManagedEvaluator.Dispose call for resource release of the native handle.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
trueif called from VisioForge.Core.GenICam.ManagedEvaluator.Dispose;falseif called from a finalizer.
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()
Finalizes an instance of the VisioForge.Core.GenICam.ManagedEvaluator class. Releases unmanaged resources.
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)