Dynamic expression evaluator. More...
Dynamic expression evaluator.
Provides dynamic evaluation of expressions. Expression is passed as an argument to a factory function. Expression is evaluated at runtime when result value is requested.
Public Member Functions | |
virtual ErrCode INTERFACE_FUNC | getEval (IString **eval)=0 |
Gets the expression. More... | |
virtual ErrCode INTERFACE_FUNC | getResult (IBaseObject **obj)=0 |
Gets the result of the expression. More... | |
virtual ErrCode INTERFACE_FUNC | cloneWithOwner (IPropertyObject *owner, IEvalValue **clonedValue)=0 |
Clones the object and attaches an owner. More... | |
virtual ErrCode INTERFACE_FUNC | getParseErrorCode ()=0 |
Returns the parse error code. More... | |
virtual ErrCode INTERFACE_FUNC | getPropertyReferences (IList **propertyReferences)=0 |
Returns the names of all properties referenced by the eval value. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | borrowInterface (const IntfID &intfID, void **obj) const =0 |
Returns another interface which is supported by the object without incrementing the reference count. More... | |
virtual ErrCode INTERFACE_FUNC | dispose ()=0 |
Disposes all references held by the object. More... | |
virtual ErrCode INTERFACE_FUNC | getHashCode (SizeT *hashCode)=0 |
Returns hash code of the object. More... | |
virtual ErrCode INTERFACE_FUNC | equals (IBaseObject *other, Bool *equal) const =0 |
Compares object to another object for equality. More... | |
virtual ErrCode INTERFACE_FUNC | toString (CharPtr *str)=0 |
Returns a string representation of the object. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | queryInterface (const IntfID &intfID, void **obj)=0 |
Returns another interface which is supported by the object and increments the reference count. More... | |
virtual int INTERFACE_FUNC | addRef ()=0 |
Increments the reference count for an interface on an object. More... | |
virtual int INTERFACE_FUNC | releaseRef ()=0 |
Decrements the reference count for an interface on an object. More... | |
|
pure virtual |
Clones the object and attaches an owner.
owner | The owner to attach to the cloned eval value. | |
[out] | clonedValue | The cloned object. |
When the expression contains reference to some property object, then the expression cannot be evaluated unless an owner is attached to eval value. However, the object can be cloned with the specified owner attached. The client can then evaluate the cloned object.
Gets the expression.
[out] | eval | The expression. |
Expression is passed as a parameter to the factory function.
|
pure virtual |
Returns the parse error code.
When an eval value object is created, the expression is passed as an argument to the factory function. Parsing of the expression can fail, but the factory function will always succeed. Use this function to check if the parsing of the expression succeeded without evaluating the expression.
Returns the names of all properties referenced by the eval value.
[out] | propertyReferences | The names of referenced properties. |
Referenced properties are all occurrences matching the '"%" propref' pattern in the evaluation string.
|
pure virtual |
Gets the result of the expression.
[out] | obj | The result of the expression. |
OPENDAQ_ERR_CALCFAILED | when calculation failed. |
OPENDAQ_ERR_RESOLVEFAILED | when reference resolution failed |
OPENDAQ_ERR_PARSEFAILED | when expression parsing failed |
When this method is called for the first time, the object will trigger execution and return result.