KnowledgeInterfaces Interface 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 create Knowledge functions.
Gathers also some basic services about literals and relations.

Role: This class provides a way to create your own Knowledge functions that can later be used in Knowledge expressions or Knowledge relations, and add them to the dictionary.
This interface is mono implemented.

See also:


Method Index


o AddConstant(CATICkeParm_var&)
Adds a constant (true, false).
o CreateArg(CATUnicodeString&,CATICkeType_var&,CATICkeArg::Mode)
Creates an argument that will be added later to a signature.
o CreateArg(CATUnicodeString&,CATUnicodeString&,CATICkeArg::Mode)
Creates an argument that will be added later to a signature.
o CreateArgWithInfo(CATUnicodeString&,CATICkeType_var&,CATUnicodeString&,CATICkeArg::Mode)
o CreateArgWithInfo(CATUnicodeString&,CATICkeType_var&,CATUnicodeString&,CATUnicodeString&,CATICkeArg::Mode)
o CreateArgWithInfo(CATUnicodeString&,CATICkeType_var&,CATUnicodeString&,CATListOfCATUnicodeString&,CATICkeArg::Mode)
o CreateConstantFromEnumeratedType(CATIEnumere_var&)
Creates constant relative to an Enumere type.
o CreateEvaluationContext(CATBaseUnknown_var&,int,int,CATCkeEvalContext::SourceKind)
Creates an evaluator context that can be given to the Knowledge function as input.
o CreateEvent(CATUnicodeString&)
Creates an event signature and add it to the dictionary.
o CreateFunction(CATUnicodeString&,CATICkeType_var&,CATCkeFunctionEvaluator,CATCkeCheckMagnitude,CATICkeSignature::Mode)
Creates a Knowledge function and adds it to the dictionary.
o CreateFunction(CATUnicodeString&,CATUnicodeString&,CATCkeFunctionEvaluator,CATCkeCheckMagnitude,CATICkeSignature::Mode)
Creates a Knowledge function and add it to the dictionary.
o GetStandardMagnitudeChecker()
Returns the standard magnitude checker.
o Methods()
Initializes the list of Knowledge functions and sort it.
o ParseAndEval(CATUnicodeString&,CATICkeMagnitude_var&,CATCkeScale)
Evaluates a formula whithout parameters.
o SendAttributeValuationError(CATKWEErrorSeverity::Severity,CATICkeObject_var&,CATUnicodeString&,CATUnicodeString&,int)
Send attribute truncation error.
o SendError(CATUnicodeString&,CATKWEErrorSeverity::Severity,CATBaseUnknown_var&,CATKWEEvaluationErrors::Code)
Send Error.

Methods


o AddConstant
public virtual AddConstant( const iParameter)
Adds a constant (true, false).
Parameters:
iParameter
parameter to add to list of Constant.
o CreateArg
public virtual CreateArg( const iArgName,
const iArgType,
const iMode= CATICkeArg::In)
Creates an argument that will be added later 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
Returns:
Argument created
See also:
o CreateArg
public virtual CreateArg( const iArgName,
const iArgType,
const iArgMode= CATICkeArg::In)
Creates an argument that will be added later to a signature.
Parameters:
iArgName
argument name (example : "x")
iArgType
argument type (example : "Real" in our example)
iArgMode:
indicates if the argument is In, Out or InOut
Returns:
Argument created
See also:
o CreateArgWithInfo
public virtual CreateArgWithInfo( const iArgName,
const iArgType,
const tai,
const iMode= CATICkeArg::In)
o CreateArgWithInfo
public virtual CreateArgWithInfo( const iArgName,
const iArgType,
const tai,
const intellisenseArgs,
const iMode= CATICkeArg::In)
o CreateArgWithInfo
public virtual CreateArgWithInfo( const iArgName,
const iArgType,
const tai,
const intellisenseArgs,
const iMode= CATICkeArg::In)
o CreateConstantFromEnumeratedType
public virtual CreateConstantFromEnumeratedType( const iEnumere)
Creates constant relative to an Enumere type.
Parameters:
iEnumere
type of the enumere
Returns:
  1. E_INVALIDARG if the input is NULL.
  2. E_FAIL if the creation failed (most of the case because there already exist a constant with the same name.
  3. S_OK if the constants have been created successfully.
o CreateEvaluationContext
public virtual CreateEvaluationContext( const iObject,
const iAdditionalConstraints=0,
const iBRContext= 0,
const iSourceKind= CATCkeEvalContext::Undefined)
Creates an evaluator context that can be given to the Knowledge function as input.
Parameters:
iObject
relation that controls the evaluation.
iAdditionalConstraints
always keep default value.
iBRContext
always keep default value.
iSourceKind
indicates what is the source of the evaluation context. From which object it is triggered.
Returns:
the evaluation context created (it must be deallocated).
o CreateEvent
public virtual CreateEvent( const iFunctionName)
Creates an event signature and add it to the dictionary.
Parameters:
iFunctionName
: function name (example : "Instanciation")
Returns:
Event created
o CreateFunction
public virtual CreateFunction( const iFunctionName,
const iReturnedType,
iEvalFuncPtr= NULL,
iCheckMagnitudeFuncPtr= NULL,
const iNotation= CATICkeSignature::Function)
Creates a Knowledge function 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
magnitude evaluator
iNotation
notation
Returns:
Function created Use to register this function in a given package.
o CreateFunction
public virtual CreateFunction( const iFunctionName,
const iReturnedType,
iEvalFuncPtr= NULL,
iCheckMagnitudePtr= NULL,
const iNotation= CATICkeSignature::Function)
Creates a Knowledge function 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
Returns:
Function created
o GetStandardMagnitudeChecker
public virtual GetStandardMagnitudeChecker()
Returns the standard magnitude checker.
Returns:
the standard magnitude checker.
o Methods
public virtual Methods()
Initializes the list of Knowledge functions and sort it.
Load all libraries if necessary
o ParseAndEval
public virtual ParseAndEval( const itexte,
const imag= NULL_var,
iScale= CATNormalScale)
Evaluates a formula whithout parameters. Ex : 3*10+sin(80) ou "Hello"+" World".
Parameters:
itexte
is the texte of the formula.
imag
precises the magnitude in output
Returns:
the return value is in MKS unit
o SendAttributeValuationError
public virtual SendAttributeValuationError( const iSeverity,
const iObject,
const iAttributeName,
const iAttributeValue,
iMaxSizeViolated)
Send attribute truncation error. Do not use, it is meaningless.
Parameters:
iSeverity
Severity.
iObject
object that we attempt to valuate
iAttributeName
name of the attribute that we try to valuate
iAttributeValue
value that we tried to give to the attribute
iMaxSizeViolated
Max size that was authorized and that has been violated
Returns:
classic HRESULT
o SendError
public virtual SendError( const iMessage,
const iSeverity= CATKWEErrorSeverity::Information,
const iSource= NULL_var,
const iCode= CATKWEEvaluationErrors::Anonymous)
Send Error. To be used in the definition of user functions.
Parameters:
iMessage
Message. Must be NLS.
iSeverity
Severity.
iSource
Source
iCode
Code of the error
Returns:
classic HRESULT

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

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