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:
- CATITypeDictionary
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 void AddConstant( | const CATICkeParm_var& | iParameter) = 0 |
-
Adds a constant (true, false).
- Parameters:
-
- iParameter
- parameter to add to list of Constant.
o CreateArg
public virtual CATICkeArg_var CreateArg( | const CATUnicodeString& | iArgName, |
| const CATICkeType_var& | iArgType, |
| const CATICkeArg::Mode | iMode | = CATICkeArg::In)=0 |
-
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:
- CATICkeSignature.AddArgument
o CreateArg
-
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:
- CATICkeSignature.AddArgument
o CreateArgWithInfo
-
o CreateArgWithInfo
-
o CreateArgWithInfo
-
o CreateConstantFromEnumeratedType
public virtual HRESULT CreateConstantFromEnumeratedType( | const CATIEnumere_var& | iEnumere) = 0 |
-
Creates constant relative to an Enumere type.
- Parameters:
-
- iEnumere
- type of the enumere
- Returns:
-
- E_INVALIDARG if the input is NULL.
- E_FAIL if the creation failed (most of the case because there already exist a constant with the same name.
- S_OK if the constants have been created successfully.
o CreateEvaluationContext
public virtual CATCkeEvalContext * CreateEvaluationContext( | const CATBaseUnknown_var& | iObject, |
| const int | iAdditionalConstraints | =0, |
| const int | iBRContext | = 0, |
| const CATCkeEvalContext::SourceKind | iSourceKind | = CATCkeEvalContext::Undefined) =0 |
-
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
-
Creates an event signature and add it to the dictionary.
- Parameters:
-
- iFunctionName
- : function name (example : "Instanciation")
- Returns:
- Event created
o CreateFunction
-
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
CATITypeDictionary.AddMethodForPackage to register this function in a given package.
o CreateFunction
-
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
-
Returns the standard magnitude checker.
- Returns:
- the standard magnitude checker.
o Methods
public virtual void Methods( | )= 0 |
-
Initializes the list of Knowledge functions and sort it.
Load all libraries if necessary
o ParseAndEval
-
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 HRESULT SendAttributeValuationError( | const CATKWEErrorSeverity::Severity | iSeverity, |
| const CATICkeObject_var& | iObject, |
| const CATUnicodeString& | iAttributeName, |
| const CATUnicodeString& | iAttributeValue, |
| int | iMaxSizeViolated) const = 0 |
-
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 HRESULT SendError( | const CATUnicodeString& | iMessage, |
| const CATKWEErrorSeverity::Severity | iSeverity | = CATKWEErrorSeverity::Information, |
| const CATBaseUnknown_var& | iSource | = NULL_var, |
| const CATKWEEvaluationErrors::Code | iCode | = CATKWEEvaluationErrors::Anonymous) const =0 |
-
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.