KnowledgeInterfaces Interface CATICkeRelationFactory
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICkeRelationFactory
Interface dedicated to Knowledge relations creation.
Role: manages the creation of Knowledge relations.
This interface is implemented on feature container.
Note that the behavior of a Knowledge relation is that it does not need to be evaluated "by hand".
By default, the creation methods are creating an active relationship, that is evaluated within the method.
- See also:
- ,
Method Index
- o
Copy(CATICkeRelation_var&)
- Creates a relation from another by copying it.
- o
CreateAction(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATICkeSignature_var&,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Creates an action.
- o
CreateCheck(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Create a check between parameters (example : x > 3).
- o
CreateDesignTable(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,int,int)
- Creates a fully functional design table (with its embedded sheet) from a file (excel or text file).
- o
CreateDesignTable(CATIDesignTable_var&,CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,int,int)
- Creates a fully functional design table (with its embedded sheet) from the file name (excel or text file).
- o
CreateDesignTable(CATIDesignTable_var&,CATUnicodeString&,CATUnicodeString&,CATIPsiRepresentationReference_var&,int,int)
- Creates a fully functional design table (with its embedded sheet) from a Representation Reference.
- o
CreateEquivalentDimensions(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
- Create an Equivalent Dimension.
- o
CreateFormula(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATICkeParm_var&,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Create a formula between parameters (example : y=3*x).
- o
CreateKweMacro()
- Creates a feature macro with arguments.
- o
CreateKweMacro(CATUnicodeString&,CATUnicodeString&)
- Creates a feature macro with arguments.
- o
CreateLaw(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATCkeListOfParm,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Creates a law between parameters and formal parameters (example : y = sin(x) + Real.
- o
CreateOptimizationConstraint(CATUnicodeString&,CATUnicodeString&,double,int,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Creates an optimization constraint (example : x > 3).
- o
CreateOptimizationSet()
- Creates an optimization set.
- o
CreateParameterSet(CATUnicodeString)
- Creates a parameter set.
- o
CreateProgram(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Create a rule between parameters (example : if (x> 3) y=3*x else y = 2).
- o
CreateReaction()
- Creates a feature reaction.
- o
CreateRelationSet(CATUnicodeString)
- Creates a relation set.
- o
CreateSheet(CATUnicodeString&,int)
- Creates a sheet feature.
- o
CreateSheet(CATICkeSheet_var&,CATIPsiRepresentationReference_var&,int)
- Creates a sheet feature.
Methods
o Copy
public virtual Copy( | const | iRelationToCopy) |
-
Creates a relation from another by copying it.
Works only on formulas, not on rules or checks.
Works only on the same container.
The copied relation must be aggregated.
Note that second relation will reference the same parameters, il will be deactivated
- Parameters:
-
- iRelationToCopy
- parameter to copy
- Returns:
- CATICkeRelation_var relation copied
o CreateAction
public virtual CreateAction( | const | iRelationName, |
| const | iComment, |
| const | iFamily, |
| const | iSignature, |
| const | iListOfParameters, |
| const | iBody, |
| const | iRoot | = NULL_var, |
| const | iRealnames | = 1) |
-
Creates an action.
Watch out: to use this service, you need to have the Knowledge Advisor license at runtime.
If a syntax error occurs, NULL_var is returned and a CATCkeParseException exception is raised
- Parameters:
-
- iRelationName
- program's name
- iComment
- comment !!
- iFamily
- not used !!
- iSignature
- external signature of the action
- iListOfParameters
- (pointer on list of CATBaseUnknown_var) contains literal used in inputs or outputs (Real.1 in our example)
- iBody
- contains the string describing the program ("y = sin(x) + Real.1" in our example)
- iRoot
- (CATIParmPublisher) used to name parameters with RelativeName (root) method
and so to be able to recognize parameters by their name
Not used in realnames = false mode
- iRealnames
- = 2 possibilities to name a parameter in the body.
CATCke::True names used are the one returned by RelativeName (root) and we try to recognize names used in the body with parameters of iListParameters..
CATCke::False names used are a1,a2,a3,etc...
a1 meaning the first parameter of iListParameters, a2, the second one, etc....
We advise you strongly to use this second method in your application to avoid NLS problems .
- Returns:
- Action created or NULL_var if syntax error only works on persistent factory. This object must be aggregated.
The parameters passed as arguments must be in the same container as the relation. This will be enforced in the future release
to allow only supported model.
This method requires the Knowledge Advisor license (KWA)
o CreateCheck
public virtual CreateCheck( | const | iRelationName, |
| const | iComment, |
| const | iFamily, |
| const | iListOfParameters, |
| const | iBody, |
| const | iRoot | = NULL_var, |
| const | iRealnames | = 1) |
-
Create a check between parameters (example : x > 3).
Watch out: to use this service, you need to have the Knowledge Advisor license at runtime.
if a syntax error occurs, NULL_var is returned and a CATCkeParseException exception is raised
- Parameters:
-
- iRelationName
- program's name
- iComment
- comment
- iFamily
- not used !!
- iListOfParameters
- (pointer on list of CATBaseUnknown_var) contains literal used in inputs (x and y in our example)
- iBody
- contains the string describing the check ("x> 3" in our example)
- iRoot
- (CATIParmPublisher) used to name parameters with RelativeName (root) method
and so to be able to recognize parameters by their name
Not used in realnames = false mode
- iRealnames
- = 2 possibilities to name a parameter in the body.
CATCke::True names used are the one returned by RelativeName (root) and we try to recognize names used in the body with parameters of iListParameters..
CATCke::False names used are a1,a2,a3,etc...
a1 meaning the first parameter of iListParameters, a2, the second one, etc....
We advise you strongly to use this second method in your application to avoid NLS problems .
- Returns:
- check created or NULL_var if syntax error
only works on persistent factory. This object must be aggregated.
The parameters passed as arguments must be in the same container as the relation. This will be enforced in the future release
to allow only supported model.
o CreateDesignTable
public virtual CreateDesignTable( | const | iRelationName, |
| const | iComment, |
| const | iFilePath, |
| | orientation | = 1, |
| | sheetWithoutFile | = 0) |
-
Creates a fully functional design table (with its embedded sheet) from a file (excel or text file).
- Parameters:
-
- iRelationName
- The name of the design table
- iComment
- The comment associated to the design table
- iFilePath
- The path of the sheet file.
- If param sheetWithoutFile = 0 :
if this path contains ".xls", the Excel format is assumed, else the tabulated text format is used.
If this path is empty, no sheet is aggregated to the design table, and the user has to create a sheet
(method CreateSheet) and associate it to an excel or text file)
- If param sheetWithoutFile = 1 :
no matter with the content of this path
- orientation
- 1 if vertical, 0 else (used only if path != "" and sheetWithoutFile = 0)
- sheetWithoutFile
- If sheetWithoutFile = 1, a model sheet is created (sheet with persitent memory storage, but no file)
and it won't be possible to associate a file to this sheet.
only works on persistent factory. This object must be aggregated.
- Returns:
- the created design table
o CreateDesignTable
public virtual CreateDesignTable( | | oDesignTable, |
| const | iRelationName, |
| const | iComment, |
| const | iFilePath, |
| | iOrientation, |
| | iSheetWithoutFile | = 0) |
-
Creates a fully functional design table (with its embedded sheet) from the file name (excel or text file).
- Parameters:
-
- oDesignTable
- the new design table.
- iRelationName
- The name of the design table
- iComment
- The comment associated to the design table
- iFilePath
- The path of the sheet file.
- If param sheetWithoutFile = 0 :
if this path contains ".xls", the Excel format is assumed, else the tabulated text format is used.
If this path is empty, no sheet is aggregated to the design table, and the user has to create a sheet
(method CreateSheet) and associate it to an excel or text file)
- If param sheetWithoutFile = 1 :
no matter with the content of this path
- iOrientation
- 1 if vertical, 0 else (used only if path != "" and sheetWithoutFile = 0)
- iSheetWithoutFile
- If sheetWithoutFile = 1, a model sheet is created (sheet with persitent memory storage, but no file)
and it won't be possible to associate a file to this sheet.
- Returns:
- E_FAIL if the method fails S_OK if the method succeeds
only works on persistent factory. This object must be aggregated.
o CreateDesignTable
public virtual CreateDesignTable( | | oDesignTable, |
| const | iRelationName, |
| const | iComment, |
| const | iRepresentation, |
| | iOrientation, |
| | iSheetWithoutFile | = 0) |
-
Creates a fully functional design table (with its embedded sheet) from a Representation Reference.
Returns an handler on the new design table.
- Parameters:
-
- oDesignTable
- the new design table.
- iRelationName
- The name of the design table
- iComment
- The comment associated to the design table
- iRepresentation
- The representation reference.
- iOrientation
- 1 if vertical, 0 else (used only if path != "" and sheetWithoutFile = 0)
- iSheetWithoutFile
- If sheetWithoutFile = 1, a model sheet is created (sheet with persitent memory storage, but no file)
and it won't be possible to associate a file to this sheet.
- Returns:
- E_FAIL if the method fails S_OK if the method succeeds
only works on persistent factory. This object must be aggregated.
o CreateEquivalentDimensions
public virtual CreateEquivalentDimensions( | const | name, |
| const | comment, |
| const | family) |
-
Create an Equivalent Dimension.
if a syntax error occurs, NULL_var is returned
- Parameters:
-
- name
- program's name
- comment
- comment
- family
- not used !!
- Returns:
- EquivalentDimension created or NULL_var if no EquivalentDimension has been created
only works on persistent factory. This object must be aggregated.
o CreateFormula
public virtual CreateFormula( | const | iRelationName, |
| const | iComment, |
| const | iFamily, |
| const | iOutputParameter, |
| const | iListOfParameters, |
| const | iBody, |
| const | iRoot | = NULL_var, |
| const | iRealnames | = 1) |
-
Create a formula between parameters (example : y=3*x).
if a syntax error occurs, NULL_var is returned and a CATCkeParseException exception is raised
- Parameters:
-
- iRelationName
- formula's name
- iComment
- no more used for formula !!
- iFamily
- not used !!
- iOutputParameter
- valuated parameter (y in our example)
- iListOfParameters
- (pointer on list of CATBaseUnknown_var) contains literal used in inputs (x in our example)
- iBody
- contains the string describing the formula ("3*x" in our example)
- iRoot
- (CATIParmPublisher) used to name parameters with RelativeName (root) method
and so to be able to recognize parameters by their name
Not used in realnames = false mode
- iRealnames
- = 2 possibilities to name a parameter in the body.
CATCke::True names used are the one returned by RelativeName (root) and we try to recognize names used in the body with parameters of iListParameters..
CATCke::False names used are a1,a2,a3,etc...
a1 meaning the first parameter of iListParameters, a2, the second one, etc....
We advise you strongly to use this second method in your application to avoid NLS problems .
- Returns:
- Formula created or NULL_var if syntax error
only works on persistent factory. This object must be aggregated.
The parameters passed as arguments must be in the same container as the relation. This will be enforced in the future release
to allow only supported model.
o CreateKweMacro
public virtual CreateKweMacro( | ) |
-
Creates a feature macro with arguments.
Watch out: to use this service, you need to have the Knowledge Advisor license at runtime.
It is initialized like the following :
no argument
the entry point is called main
the body is empty
This method requires the KWA license (Knowledge Advisor).
The object must be aggregated.
- Returns:
- the macro created
o CreateKweMacro
public virtual CreateKweMacro( | const | iArgumentString, |
| const | iScriptText) |
-
Creates a feature macro with arguments.
Watch out: to use this service, you need to have the Knowledge Advisor license at runtime.
It is initialized with the given arguments
- Parameters:
-
- iArgumentString
- the argument string
- iScriptText
- the script text
- Returns:
- The feature macro
- Example:
-
CATICkeFunction_var MyFunc = MyFact->CreateKweMacro("MyArg","MyArg.Value = 10.0\nEnd Sub");
o CreateLaw
public virtual CreateLaw( | const | iRelationName, |
| const | iComment, |
| const | iFamily, |
| const | iListOfParameters, |
| const | iListOfFormalParameters, |
| const | iBody, |
| const | iRoot | = NULL_var, |
| const | iRealnames | = 1) |
-
Creates a law between parameters and formal parameters (example : y = sin(x) + Real.1).
if a syntax error occurs, NULL_var is returned and a CATCkeParseException exception is raised
- Parameters:
-
- iRelationName
- program's name
- iComment
- comment !!
- iFamily
- not used !!
- iListOfParameters
- (pointer on list of CATBaseUnknown_var) contains literal used in inputs or outputs (Real.1 in our example)
- iListOfFormalParameters
- (pointer on list of CATBaseUnknown_var) contains formal literal used in inputs or outputs (x and y in our example)
- iBody
- contains the string describing the program ("y = sin(x) + Real.1" in our example)
- iRoot
- (CATIParmPublisher) used to name parameters with RelativeName (root) method
and so to be able to recognize parameters by their name
Not used in realnames = false mode
- iRealnames
- = 2 possibilities to name a parameter in the body.
CATCke::True names used are the one returned by RelativeName (root) and we try to recognize names used in the body with parameters of iListParameters..
CATCke::False names used are a1,a2,a3,etc...
a1 meaning the first parameter of iListParameters, a2, the second one, etc....
We advise you strongly to use this second method in your application to avoid NLS problems .
- Returns:
- Rule created or NULL_var if syntax error only works on persistent factory. This object must be aggregated.
The parameters passed as arguments must be in the same container as the relation. This will be enforced in the future release
to allow only supported model.
o CreateOptimizationConstraint
public virtual CreateOptimizationConstraint( | const | iRelationName, |
| const | iComment, |
| | iPrecision, |
| | iPriority, |
| const | iListOfParameters, |
| const | iBody, |
| const | iRoot | = NULL_var, |
| const | iRealnames | = 1) |
-
Creates an optimization constraint (example : x > 3).
if a syntax error occurs, NULL_var is returned and a CATCkeParseException exception is raised
- Parameters:
-
- iRelationName
- optimization constraint's name
- iComment
- comment
- iPrecision
- precision attached to the comparison
- iPriority
- priority of the optimization constraint in the context of a multiple constrained optimization
- iListOfParameters
- (pointer on list of CATBaseUnknown_var) contains literal used in inputs (x and y in our example)
- iBody
- contains the string describing the check ("x> 3" in our example)
- iRoot
- (CATIParmPublisher) used to name parameters with RelativeName (root) method and so to be able to recognize parameters by their name
Not used in realnames = false mode
- iRealnames
- 2 possibilities to name a parameter in the body.
CATCke::True names used are the one returned by RelativeName (root) and we try to recognize names used in the body with parameters of iListParameters..
CATCke::False names used are a1,a2,a3,etc...
a1 meaning the first parameter of iListParameters, a2, the second one, etc....
We advise you strongly to use this second method in your application to avoid NLS problems .
- Returns:
- = optimization constraint created or NULL_var if syntax error
only works on persistent factory. This object must be aggregated.
The parameters passed as arguments must be in the same container as the relation. This will be enforced in the future release
to allow only supported model.
This method reuires the PEO license (Product Engineering Optimizer).
o CreateOptimizationSet
public virtual CreateOptimizationSet( | ) |
-
Creates an optimization set.
- Parameters:
-
- name
- name of the optimization set.
- Returns:
- the newly created optimization set viewed a a parameter publisher.
only works on persistent factory. This object must be aggregated.
o CreateParameterSet
public virtual CreateParameterSet( | const | name) |
-
Creates a parameter set.
- Parameters:
-
- name
- name of the parameter set.
- Returns:
- the newly created relation set viewed a a parameter publisher.
only works on persistent factory. This object must be aggregated.
o CreateProgram
public virtual CreateProgram( | const | iRelationName, |
| const | iComment, |
| const | iFamily, |
| const | iListOfParameters, |
| const | iBody, |
| const | iRoot | = NULL_var, |
| const | iRealnames | = 1) |
-
Create a rule between parameters (example : if (x> 3) y=3*x else y = 2).
Watch out: to use this service, you need to have the Knowledge Advisor license at runtime.
if a syntax error occurs, NULL_var is returned and a CATCkeParseException exception is raised
- Parameters:
-
- iRelationName
- program's name
- iComment
- comment !!
- iFamily
- not used !!
- iListOfParameters
- (pointer on list of CATBaseUnknown_var) contains literal used in inputs or outputs (x and y in our example)
- iBody
- contains the string describing the program ("if (x> 3) y=3*x else y = 2" in our example)
- iRoot
- (CATIParmPublisher) used to name parameters with RelativeName (root) method
and so to be able to recognize parameters by their name
Not used in realnames = false mode
- iRealnames
- = 2 possibilities to name a parameter in the body.
CATCke::True names used are the one returned by RelativeName (root) and we try to recognize names used in the body with parameters of iListParameters..
CATCke::False names used are a1,a2,a3,etc...
a1 meaning the first parameter of iListParameters, a2, the second one, etc....
We advise you strongly to use this second method in your application to avoid NLS problems .
- Returns:
- Rule created or NULL_var if syntax error
only works on persistent factory. This object must be aggregated.
The parameters passed as arguments must be in the same container as the relation. This will be enforced in the future release
to allow only supported model.
o CreateReaction
public virtual CreateReaction( | ) |
-
Creates a feature reaction.
Watch out: to use this service, you need to have the Knowledge Advisor license at runtime.
This object must be aggregated.
This method requires the Knowledge Advisor license (KWA).
- Returns:
- the reaction feature
o CreateRelationSet
public virtual CreateRelationSet( | const | name) |
-
Creates a relation set.
- Parameters:
-
- name
- name of the relation set.
- Returns:
- the newly created relation set viewed a a parameter publisher.
only works on persistent factory. This object must be aggregated.
o CreateSheet
public virtual CreateSheet( | const | iFilePath, |
| | iType | = 0) |
-
Creates a sheet feature.
- Parameters:
-
- iFilePath
- The path of the source file. It can be an Excel or a Lotus sheet or a tabulated text file, or an empty path (if iType != 4, you'll have to call
CreateSourceFile on CATICkeSheet interface).
If the path isn't empty and the file doesn't exist, the file is created.
- iType
- - if iType = 4, whatever the content of the path, a model sheet
is created (sheet with persitent memory storage, but no file)
- if path is empty, uses the type to know what kind of sheet has to be created
Legal values: the test can be either
1 Excel one.
2 Text one
3 Lotus one
4 Model one
- Returns:
- the created sheet. It returns NULL_var if the file creation failed (in the case where the file has to be created) or if Excel or Lotus is asked on UNIX
only works on persistent factory. This object must be aggregated.
o CreateSheet
public virtual CreateSheet( | | oSheet, |
| const | iRepresentation, |
| | iSheetWithoutFile | = 0) |
-
Creates a sheet feature.
- Parameters:
-
- oSheet
- The sheet feature
- iRepresentation
- The representation reference.
- iSheetWithoutFile
- If sheetWithoutFile = 1, a model sheet is created (sheet with persitent memory storage, but no file)
and it won't be possible to associate a file to this sheet.
- Returns:
- E_FAIL if the method fails for example if Excel or Lotus is asked on UNIX S_OK if the method succeeds
This object is included in the file: CATICkeRelationFactory.h
If needed, your Imakefile.mk should include the module: KnowledgeItf
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.