All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

KnowledgeInterfaces Interface CATICkeFunctionFactory

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATICkeFunctionFactory
 

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


interface CATICkeFunctionFactory

Interface to gather methods to create user functions.
Gathers services about literals and relations.

Role: This class gathers methods managing literals and relations.
It gives a way to create your own functions that can later be used in relations, and add them to the dictionary.
It gives a way to add your own applications that can later be used in applications dialog in the knowledgeware workbench.


Method Index


o AddConstant(CATICkeParm_var&)
Adds a constant (true, false).
o AddToCurrentParameterSet(CATICkeParm_var&,CATIParmPublisher_var&)
o AddToCurrentRelationSet(CATISpecObject_var&,CATIParmPublisher_var&)
o CreateArg(CATUnicodeString&,CATICkeType_var&,CATICkeArg::Mode)
Creates an argument to be added to a signature.
o CreateArg(CATUnicodeString&,CATUnicodeString&,CATICkeArg::Mode)
Creates an argument to be added to a signature.
o CreateEvaluationContext(CATBaseUnknown_var&)
Creates an evaluator context that can be given to the evaluation function.
o CreateEvent(CATUnicodeString&)
Creates an event signature and add it to the dictionary.
o CreateFunction(CATUnicodeString&,CATICkeType_var&,CATCkeFunctionEvaluator,CATCkeCheckMagnitude,CATICkeSignature::Mode)
Creates a signature and adds it to the dictionary.
o CreateFunction(CATUnicodeString&,CATUnicodeString&,CATCkeFunctionEvaluator,CATCkeCheckMagnitude,CATICkeSignature::Mode)
Creates a signature and add it to the dictionary.
o GetCurrentSet(CATICkeFunctionFactory::SetType,CATIParmPublisher_var&,int)
Get the current set : ParameterSet,RelationSet,OptimizationSet,RuleBaseSet.
o Methods()
Initializes the list of methods and sort it.
o ParseAndEval(CATUnicodeString&,CATICkeMagnitude_var&)
Evaluates a formula whithout parameters.

Enumerated Type Index


o SetType
Type of Set.

Methods


o AddConstant
public virtual void AddConstant( const CATICkeParm_var& iParameter) = 0
Adds a constant (true, false).
Parameters:
iParameter
parameter to add to list of Constant.
o AddToCurrentParameterSet
public virtual void AddToCurrentParameterSet( const CATICkeParm_var& iParameterToAdd,
const CATIParmPublisher_var& iRoot=NULL_var)=0
Deprecated:
V5R14 - Use GetCurrentSet method instead.
Adds a parameter to the current ParameterSet.
It is dedicated to applications which create parameters and want to see them in the parameter set (in the tree view).
If the ParameterSet does not exist, it is created and appended to the root Object.
Parameters:
iParameterToAdd
parameter to add to the parameter set.
iRoot
The root object is where the parameterset will be appended. If the root object is NULL, the default one is asked to CATILiteralsRoot::GetRoot on the container of the parameter
o AddToCurrentRelationSet
public virtual void AddToCurrentRelationSet( const CATISpecObject_var& iRelationToAdd,
const CATIParmPublisher_var& iRoot= NULL_var)=0
Deprecated:
V5R14 - Use GetCurrentSet method instead.
Adds a relation to the current RelationSet.
It is dedicated to applications which create relations and want to see them in the relation set (in the tree view).
If the RelationSet does not exist, it is created and appended to the root Object.
Parameters:
iRelationToAdd
relation to add to the relation set.
iRoot
The root object is where the relationset will be appended. If the root object is NULL, the default one is asked to CATILiteralsRoot::GetRoot on the container of the relation
o CreateArg
public virtual CATICkeArg_var CreateArg( const CATUnicodeString& iArgName,
const CATICkeType_var& iArgType,
const CATICkeArg::Mode iMode= CATICkeArg::In)=0
Creates an argument to be added to a signature.
Parameters:
iArgName
argument name (example : "x")
iArgType
argument type (example : CATParmDictionary::RealType in our example)
iMode
indicates if the argument is In, Out or InOut
o CreateArg
public virtual CATICkeArg_var CreateArg( const CATUnicodeString& iArgName,
const CATUnicodeString& iArgType,
const CATICkeArg::Mode iArgMode= CATICkeArg::In)=0
Creates an argument to be added to a signature.
Parameters:
iArgName
argument name (example : "x")
iArgType
argument type (example : "Real" in our example)
Mode
iArgMode: indicates if the argument is In, Out or InOut
o CreateEvaluationContext
public virtual CATCkeEvalContext * CreateEvaluationContext( const CATBaseUnknown_var& iObject) = 0
Creates an evaluator context that can be given to the evaluation function.
Parameters:
iObject
: relation that controls the evaluation. The return value must be deallocated
o CreateEvent
public virtual CATICkeSignature_var CreateEvent( const CATUnicodeString& iFunctionName) = 0
Creates an event signature and add it to the dictionary.
Parameters:
iEventName
: function name (example : "Instanciation")
iNotation:
notation
o CreateFunction
public virtual CATICkeSignature_var CreateFunction( const CATUnicodeString& iFunctionName,
const CATICkeType_var& iReturnedType,
CATCkeFunctionEvaluator iEvalFuncPtr= NULL,
CATCkeCheckMagnitude iCheckMagnitudeFuncPtr= NULL,
const CATICkeSignature::Mode iNotation= CATICkeSignature::Function)=0
Creates a signature and adds it to the dictionary.
Parameters:
iFunctionName
function name (example : "sin") It is the name that will be used in formulas
iReturnedType
returned type of the function (example : CATParmDictionary::RealType in our sinus example)
iEvalFuncPtr
function evaluator
iCheckMagnitudeFuncPtr
function evaluator
iNotation
notation
o CreateFunction
public virtual CATICkeSignature_var CreateFunction( const CATUnicodeString& iFunctionName,
const CATUnicodeString& iReturnedType,
CATCkeFunctionEvaluator iEvalFuncPtr= NULL,
CATCkeCheckMagnitude iCheckMagnitudePtr= NULL,
const CATICkeSignature::Mode iNotation= CATICkeSignature::Function)=0
Creates a signature and add it to the dictionary.
Parameters:
iFunctionName
function name (example : "sin") It is the name that will be used in formulas
iReturnedType
returned type of the function (example : CATParmDictionary::RealType in our sinus example)
iEvalFuncPtr
function evaluator
iCheckMagnitudePtr
check magnitude evaluator
iNotation
notation
o GetCurrentSet
public virtual CATBaseUnknown_var GetCurrentSet( const CATICkeFunctionFactory::SetType iSetType,
const CATIParmPublisher_var& iRoot,
const int iForceCreation= 0) = 0
Get the current set : ParameterSet,RelationSet,OptimizationSet,RuleBaseSet.
It is dedicated to applications which create parameters,relations,optimizations or rulebase and want to see them in the parameter set, relation set, optimization set and rulebase set (in the tree view).
If the Set does not exist, it is created if argument iForceCreation is true.
Parameters:
iSetType
to choose the type of set (Parameter, relation, optimization or rulebase).
iForceCreation
to force the creation of set if it doesn't exist.
iRoot
The root object is where the set will be appended.
o Methods
public virtual void Methods()= 0
Initializes the list of methods and sort it.
Load all libraries if necessary
o ParseAndEval
public virtual CATICkeInst_var ParseAndEval( const CATUnicodeString& itexte,
const CATICkeMagnitude_var& imag= NULL_var) =0
Evaluates a formula whithout parameters. Ex : 3*10+sin(80) ou "Hello"+" World".
Parameters:
itexte
is the texte of the formula. the return value is in MKS unit

Enumerated Types


o SetType
enum SetType {
  Parameter,
  Relation,
  Optimization,
  RuleBase
}
Type of Set.
Parameters:
Parameter
This set contains parameters.
Relation
This set contains Relations.
Optimization
This set contains optimizations.
RuleBase
This set contains Rulebases.

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

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