All Frameworks  Class Hierarchy  This Framework  Indexes   

KnowHow Interface 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 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 Import(CATUnicodeString&,boolean)
Imports in the rulebase, the contents of the rulebase of 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 SolveWithoutUpdate(int)
Solves the rule base.
o Solve(int)
Solves the rule base.
o VolatileCopy()
Returns a volatile (not persistent), non changeable copy of the current rulebase.

Methods


o AddFact
public virtual AddFact( const spFact)
Adds a fact.
Parameters:
spFact
a fact.
Returns:
true if this function was successfully performed.
o AddListOfInstances
public virtual AddListOfInstances( ilFacts)
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 AddRootOfFacts( spRootfacts)
Adds a root for the search of the facts.
Parameters:
spRootfacts
a facts root.
o GetRootsOfFacts
public virtual GetRootsOfFacts()
Gets a copy of the set of facts roots.
Returns:
a facts root.
o GetRuleBaseOwner
public virtual GetRuleBaseOwner()
Returns the owner of the relation set the rulebase belongs to.
Returns:
a spec object.
o GetSolveMode
public virtual GetSolveMode()
Gets the solve mode of the rulebase.
Returns:
solve mode ( CATExpertSolveModeEnum.SolveModeEnum ).
o ImportRuleBase
public virtual ImportRuleBase( const spImportedRulebase,
iFonction= NULL)
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 ImportWithLink( spRootfacts,
iForce= TRUE)
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 Import
public virtual Import( const iPath,
iForce= TRUE)
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 ReloadFact
public virtual ReloadFact( const spFact)
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 RemoveFact( const spFact)
Removes a fact.
Parameters:
spFact
a fact.
o RemoveRootOfFacts
public virtual RemoveRootOfFacts( spRootfacts)
Removes a facts root.
Parameters:
spRootfacts
a facts root.
o SetOwner
public virtual SetOwner( spSpecObject)
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 SetSolveMode( iSolveMode)
Sets the solve mode of the rulebase.
Parameters:
iSolveMode
solve mode (
CATExpertSolveModeEnum.SolveModeEnum ).
o SolveWithoutUpdate
public virtual SolveWithoutUpdate( iIsSolveNonOptimized= 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 Solve
public virtual Solve( iIsSolveNonOptimized= 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 VolatileCopy
public virtual VolatileCopy()
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.