KnowledgeInterfaces CATCkeEvalContext

Usage: you must use this class as is. You should never derive it.


public class CATCkeEvalContext

Class dedicated to evaluation context information management.
Role: When a Knowledge relation or a Knowledge expression is evaluated, it creates such an object that is known by all the evaluators of the expression tree.
Those evaluators can then use this context to know the container or relation for example.


Method Index


o BusinessRulesContext()
Indicates if the evaluation is done in Business Rule context.
o ClearIntermediates()
Clear intermediate features.
o Container()
Returns the current container if any.
o GetSourceKind()
Returns the source kind.
o IsInstanceLocked(CATBaseUnknown_var&)
Some instances (objects) are locked and cannot be modified.
o PreventsObjectModification()
Indicates if the evaluation prevents object modification.
o Relation()
Returns the current relation if any.
o Root()
Returns the current root if any.
o SendError(CATUnicodeString&,CATKWEErrorSeverity::Severity,CATBaseUnknown_var&)
Send Error.
o SetContainer(CATICkeParmFactory_var&)
Sets the current container.
o Source()
Returns the objet source of the error (relation was too restrictive).
o SourceAsObject()
Returns the objet source of the error (CATICkeNaming was too restrictive).
o StoreAndUpdateTemporaryObject(CATBaseUnknown_var&)
Expressional relations allow datum geometry valuation (for example: point.

Enumerated Type Index


o SourceKind
Enumerated value that defines which kind of Knowledge object .

Methods


o BusinessRulesContext
public virtual BusinessRulesContext()
Indicates if the evaluation is done in Business Rule context.
Returns:
TRUE is the evaluation is done in the business rule context.
o ClearIntermediates
public virtual ClearIntermediates()
Clear intermediate features.
o Container
public virtual Container()
Returns the current container if any.
o GetSourceKind
public virtual GetSourceKind()
Returns the source kind.
Returns:
Source kind
o IsInstanceLocked
public virtual IsInstanceLocked( const iObject)
Some instances (objects) are locked and cannot be modified. Default implementation returns S_FALSE
Parameters:
iObject
object that we want to test
Returns:
S_TRUE is the instance is locked, S_FALSE instead.
o PreventsObjectModification
public virtual PreventsObjectModification()
Indicates if the evaluation prevents object modification.
Returns:
TRUE is the evaluation prevents object modification.
o Relation
public virtual Relation()
Returns the current relation if any.
o Root
public virtual Root()
Returns the current root if any. The root is used to compute object path when we want to raise errors and show the path of the objects. May be NULL
Returns:
The current root if any.
o SendError
public virtual SendError( const iMessage= " ",
const iSeverity= CATKWEErrorSeverity::Information,
const iSource= NULL_var)
Send Error. To be used in the definition of user functions.
Parameters:
iMessage
Message. Must be NLS.
iSeverity
Severity.
iSource
Source
Returns:
classic HRESULT
o SetContainer
public virtual SetContainer( const iContainer)
Sets the current container.
Parameters:
iContainer
container that becomes the current one.
o Source
public virtual Source()
Returns the objet source of the error (relation was too restrictive).
o SourceAsObject
public virtual SourceAsObject()
Returns the objet source of the error (CATICkeNaming was too restrictive).
o StoreAndUpdateTemporaryObject
public virtual StoreAndUpdateTemporaryObject( const iObject)
Expressional relations allow datum geometry valuation (for example: point.1 = point(0mm, 10mm, 20mm)). To enable such a functionality, functions have to return temporary geometry whose geometrical result is to be copied into the datum. This temporary geometry life cycle can not be managed by function code because the returned object can be used several times in the expression, so it has to be valid until the end of the expression evaluation. This method allows to solve this problem: the relation stores the temporary geometry and manages itself its life cycle. It is mandatory to call this method for any returned geometry that is created inside a function. Note that if the function needs to create several geometrical features, it has either to delete them before returning result or to call StoreAndUpdateTemporaryObject for each of them. This method updates argument (and possibly raises an error), so caller should not do it himself
Parameters:
iObject
the temporary object whose life cycle has to be managed by the relation
Returns:
E_FAIL if object is NULL_var or is aggregated, S_OK otherwise

Enumerated Types


o SourceKind
enum SourceKind {
  Undefined,
  Formula,
  Law,
  Rule,
  Check,
  Reaction,
  SetOfEquations,
  Pattern,
  OptimizationConstraint,
  ConstraintSatisfaction,
  ExpertRule,
  ExpertCheck,
  UIEvent,
  Behavior,
  Method,
  BusinessRules,
  Expression,
  Generative
}
Enumerated value that defines which kind of Knowledge object .
Parameters:
Undefined
The source is undefined.
Formula
The source is a formula.
Law
The source is a Law.
Rule
The source is a Knowledge Advisor rule.
Check
The source is a Knowledge Advisor check.
Reaction
The source is a Knowledge Advisor reaction or an action.
SetOfEquations
The source is a Knowledge Advisor set of equation.
Pattern
The source is a Product Knowledge Template pattern.
OptimizationConstraint
The source is a Product Engineering optimizer optimization constraint.
ConstraintSatisfaction
The source is a Product Engineering optimizer constraint satisfaction.
ExpertRule
The source is a Knowledge Expert rule.
ExpertCheck
The source is a Knowledge Expert check.
UIEvent
The source is a UI Event (Knowledge Based Dialogs).
Behavior
The source is a Behavior(Engineering process automation).
Method
The source is a Method(Engineering process automation).
BusinessRules
The source is a business rules.
Expression
The source is a simple expression.

This object is included in the file: CATCkeEvalContext.h
If needed, your Imakefile.mk should include the module: KnowledgeItf

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.