ExpressionEval Object [C++]

Use this object to evaluate one or more expressions against a specified context. In addition, use this object to parse and evaluate user-defined expressions written as Extensible Markup Language (XML) fragments.

ProgID:   Commerce.ExpressionEvaluator (Externally creatable)
COM Class Name:   ExpressionEval
Type Library Name:   Microsoft Commerce 2002 Expression System Type Library
DLL Name:   exprarch.dll
Threading Model:   Both

[C++]

COM Interface Name:   IExpressionEval
Interface ID Constant:   IID_IExpressionEval
Header File:   ExprArchDLL.h, exprarch.h, mspu_guids.h

[C++]

In C++, the properties and methods of the ExpressionEval object are accessed through the IExpressionEval interface.

Methods

[C++]

Method Description
Connect Establishes communication between the ExpressionEval object and an expression store.
CreateEvalContext Creates a new ExprEvalContext object in the context cache.
Eval Evaluates an expression.
EvalInContext Evaluates an expression in a context previously loaded into the context cache.
EvalXML Evaluates the specified XML text as an expression.
FlushAll Removes all expressions from the expression cache.
FlushExpr Removes the specified expression from the expression cache.
LoadAll Reads all expressions from the expression store and loads them into the expression cache.
LoadExpr Reads the specified expression from the expression store and loads it into the expression cache.
ParseXML Parses the specified XML text to determine if it represents a valid expression.

[Visual Basic]

Method Description
Connect Establishes communication between the ExpressionEval object and an expression store.
CreateEvalContext Creates a new ExprEvalContext object in the context cache.
Eval Evaluates an expression.
EvalInContext Evaluates an expression in a context previously loaded into the context cache.
EvalXML Evaluates the specified XML text as an expression.
FlushAll Removes all expressions from the expression cache.
FlushExpr Removes the specified expression from the expression cache.
LoadAll Reads all expressions from the expression store and loads them into the expression cache.
LoadExpr Reads the specified expression from the expression store and loads it into the expression cache.
ParseXML Parses the specified XML text to determine if it represents a valid expression.

Properties

[C++]

Property Type Description
ExprCount long Retrieves the number of expressions loaded into the expression cache.

This property is read-only.

[Visual Basic]

Property Type Description
ExprCount Long Retrieves the number of expressions loaded into the expression cache.

This property is read-only.

Remarks

Expressions are stored in a database referred to as the Expression Store and accessed through an ExpressionStore object. When it is created, the ExpressionEval object initializes an expression cache and a context cache. Expressions must be compiled and loaded into the expression cache before being evaluated. To improve evaluation performance, use the LoadExpr or LoadAll method to preload expressions into the expression cache.

An expression is evaluated against data contained in a set of profiles. The profiles may be ProfileObject objects, Dictionary objects, or other objects that support property access through the IDispatch interface. The set of profiles is referred to as an evaluation context. If an evaluation context will be used across multiple expressions, create a stored context in the context cache using the CreateEvalContext method to increase efficiency.

The Connect method must be called before loading or evaluating expressions.

See Also

[C++]Targeting Objects

[C++]Expression Recordset

[C++]Expression XML Structures

[C++]ExpressionStore Object

[C++]ProfileObject Object

[Visual Basic]Targeting Objects

[Visual Basic]Expression Recordset

[Visual Basic]Expression XML Structures

[Visual Basic]ExpressionStore Object

[Visual Basic]ProfileObject Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.