All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

KnowHow Interface CATIRuleBase

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---KnowHow.CATIGenericRuleBaseComponent
        |
        +---KnowHow.CATIRuleSet
          |
          +---CATIRuleBase
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIRuleBase

Interface dedicated to the rulebase behaviour.
Role Entry point to the inference engine of Knowledge Expert. This interface defines methods to feed the inference engine with facts objects, or roots of facts objects. A fact is an object seen through the interface CATIInstance. A root of facts is an entry point to scan a hierarchy of objects providing facts (it has to implement CATIInstancesProvider). The rulebase can either update or query the root of facts for facts. This interface also provides methods for being solved i.e. checking the checks and executing the rules. It also provides methods for importing external rulesets, rules and checks.


Method Index


o AddFact(CATIInstance_var&)
Adds a fact.
o AddListOfInstances(CATListValCATBaseUnknown_var&)
Adds a list of facts to the rule base.
o AddRootOfFacts(CATBaseUnknown_var)
Adds a root for the search of the facts.
o GetRootsOfFacts()
Gets a copy of the set of facts roots.
o GetRuleBaseOwner()
Returns the owner of the relation set the rulebase belongs to.
o GetSolveMode()
Gets the solve mode of the rulebase.
o Import(CATUnicodeString&,boolean)
Imports in the rulebase, the contents of the rulebase of another document.
o ImportRuleBase(CATIRuleBase_var&,conflictingImportFunctionPtr)
Imports in the rulebase the content of another rulebase.
o ImportWithLink(CATBaseUnknown_var,boolean)
Imports from the rulebase, the contents of this rulebase to another document.
o ReloadFact(CATIInstance_var&)
Reloads a fact.
o RemoveFact(CATIInstance_var&)
Removes a fact.
o RemoveRootOfFacts(CATBaseUnknown_var)
Removes a facts root.
o SetOwner(CATBaseUnknown_var)
Sets the owner of the rulebase.
o SetSolveMode(CATExpertSolveModeEnum::SolveModeEnum)
Sets the solve mode of the rulebase.
o Solve(int)
Solves the rule base.
o SolveWithoutUpdate(int)
Solves the rule base.
o VolatileCopy()
Returns a volatile (not persistent), non changeable copy of the current rulebase.

Methods


o AddFact
public virtual int AddFact( const CATIInstance_var& spFact)=0
Adds a fact.
Parameters:
spFact
a fact.
Returns:
true if this function was successfully performed.
o AddListOfInstances
public virtual int AddListOfInstances(CATListValCATBaseUnknown_var& ilFacts)=0
Adds a list of facts to the rule base.
Parameters:
ilFacts
a list of facts.
Returns:
true if the add was successfully made.
o AddRootOfFacts
public virtual void AddRootOfFacts(CATBaseUnknown_var spRootfacts) = 0
Adds a root for the search of the facts.
Parameters:
spRootfacts
a facts root.
o GetRootsOfFacts
public virtual CATListValCATBaseUnknown_var* GetRootsOfFacts()= 0
Gets a copy of the set of facts roots.
Returns:
a facts root.
o GetRuleBaseOwner
public virtual CATISpecObject* GetRuleBaseOwner()= 0
Returns the owner of the relation set the rulebase belongs to.
Returns:
a spec object.
o GetSolveMode
public virtual CATExpertSolveModeEnum::SolveModeEnum GetSolveMode()=0
Gets the solve mode of the rulebase.
Returns:
solve mode ( CATExpertSolveModeEnum.SolveModeEnum ).
o Import
public virtual void Import( const CATUnicodeString& iPath,
boolean iForce= TRUE)=0
Imports in the rulebase, the contents of the rulebase of another document.
Parameters:
iPath
full name of the document.
iForce
true if the import should replace objects with the same name.
o ImportRuleBase
public virtual void ImportRuleBase( const CATIRuleBase_var& spImportedRulebase,
conflictingImportFunctionPtr iFonction= NULL)=0
Imports in the rulebase the content of another rulebase.
Parameters:
spImportedRulebase
a rulebase.
iFonction
a function triggered on the conflicting object.
o ImportWithLink
public virtual void ImportWithLink(CATBaseUnknown_var spRootfacts,
boolean iForce= TRUE)=0
Imports from the rulebase, the contents of this rulebase to another document. Creates a linked rulebase.
Parameters:
spRootfacts
Root of the document.
iForce
true if the import should replace objects with the same name.
o ReloadFact
public virtual void ReloadFact( const CATIInstance_var& spFact)=0
Reloads a fact. Forces the inference engine to take again a fact into account (removes it and adds it a second time).
Parameters:
spFact
a fact.
o RemoveFact
public virtual void RemoveFact( const CATIInstance_var& spFact)=0
Removes a fact.
Parameters:
spFact
a fact.
o RemoveRootOfFacts
public virtual void RemoveRootOfFacts(CATBaseUnknown_var spRootfacts) = 0
Removes a facts root.
Parameters:
spRootfacts
a facts root.
o SetOwner
public virtual void SetOwner(CATBaseUnknown_var spSpecObject) = 0
Sets the owner of the rulebase. The owner is a spec object that provides for a container.
Parameters:
spSpecObject
a spec object.
o SetSolveMode
public virtual void SetSolveMode(CATExpertSolveModeEnum::SolveModeEnum iSolveMode)=0
Sets the solve mode of the rulebase.
Parameters:
iSolveMode
solve mode (
CATExpertSolveModeEnum.SolveModeEnum ).
o Solve
public virtual int Solve(int iIsSolveNonOptimized= 0)=0
Solves the rule base. This method first solves the checks and then applies the rules of the rule base over the set of facts known by the rule base.
Parameters:
iIsSolveNonOptimized
true for the non optimized mode, else false.
Returns:
number of rules triggered.
o SolveWithoutUpdate
public virtual int SolveWithoutUpdate(int iIsSolveNonOptimized= 0)=0
Solves the rule base. This method first solves the checks and then applies the rules of the rule base over the set of facts known by the rule base. This method doesn't make a geometrical update.
Parameters:
iIsSolveNonOptimized
true for the non optimized mode, else false.
Returns:
number of rules triggered.
o VolatileCopy
public virtual CATIRuleBase_var VolatileCopy()=0
Returns a volatile (not persistent), non changeable copy of the current rulebase.
Returns:
A volatile copy.

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

Copyright © 2003, Dassault Systèmes. All rights reserved.