All Frameworks Class Hierarchy This Framework Previous Next Indexes
KnowledgeInterfaces Interface CATICkeParmFactory
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATICkeParmFactory
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICkeParmFactory
Interface dedicated to parameters and relations factory.
Role: This interface helps you to create parameters and relations.
WATCH OUT :
Dont forget to Initialise Literals environnement on the
Literals.feat catalog before any kind of work with parameters
This interface is implemented on any Feature containers: thus it creates persistant parameters and relations.
It is also implemented on a volatile static object (CATCKEVolatileFactory): thus it creates volatile parameters.
Usage :
//////////////////////////////////////////////////////////////////////////
#include "CATCke.h"
#include "CATICkeUnit.h"
#include "CATICkeMKSUnit.h"
#include "CATICkeMagnitude.h"
#include "CATICkeParmFactory.h"
#include "CATICkeParm.h"
//------------------------------------------------
// Get this factory from your feat container
// to create features (persistent)
//------------------------------------------------
CATICkeParmFactory_var fact = cont;
//------------------------------------------------
// Or use the Volatile factory
//------------------------------------------------
CATICkeParmFactory_var fact = CATCKEVolatileFactory;
//------------------------------------------------
// you can create parameters
//------------------------------------------------
CATICkeParm_var p1 = fact->CreateLength ("L",3.3);
- See also:
- CATICkeMagnitude, CATICkeUnit, CATIEnumere, CATICkeParm, CATICkeRelation
Method Index
- o
Copy(CATICkeParm_var&,CATCke::Boolean&)
- Creates a literal from another by copying its value.
- o
Copy(CATICkeRelation_var&)
- Creates a relation from another by copying it.
- o
CreateAngle(CATUnicodeString&,double)
- Creates angle parameter.
- o
CreateBoolean(CATUnicodeString&,CATCke::Boolean)
- Creates boolean parameter.
- 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
CreateDimension(CATICkeMagnitude_var&,CATUnicodeString&,CATICkeInst_var&)
- Creates dimension parameter.
- o
CreateDimension(CATICkeMagnitude_var&,CATUnicodeString&,double)
- Creates dimension parameter.
- o
CreateEnumere(CATIEnumere_var&,CATUnicodeString&,CATUnicodeString&)
- Creates an enumerated parameter from value.
- o
CreateEnumere(CATIEnumere_var&,CATUnicodeString&,int)
- Creates an enumerated parameter from rank name (1 to n).
- o
CreateFormula(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATICkeParm_var&,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Create a formula between parameters (example : y=3*x).
- o
CreateInteger(CATUnicodeString&,int)
- Creates integer parameter.
- o
CreateLaw(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATCkeListOfParm,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Create a law between parameters and formal parameters (example : y = sin(x) + Real.
- o
CreateLength(CATUnicodeString&,double)
- Creates length parameter.
- o
CreateList(CATUnicodeString&)
- Creates a List object.
- o
CreateLiteral(CATICkeType_var&,CATUnicodeString&)
- Creates a literal from its type.
- o
CreateMKSUnit()
- Creates a MKS Unit equivalent to a scalar.
- o
CreateMKSUnit(CATICkeMKSUnit::Basic,int)
- Creates a MKS Unit equivalent to a primitive magnitude.
- o
CreateMKSUnit(int,int,int,int,int,int,int,int,int,int)
- Creates a MKS Unit equivalent to a combination of primitive magnitude.
- o
CreateObjectReference(CATBaseUnknown_var&)
- Creates feature reference.
- o
CreateOptimizationConstraint(CATUnicodeString&,CATUnicodeString&,double,int,CATCkeListOfParm,CATUnicodeString&,CATIParmPublisher_var&,CATCke::Boolean&)
- Create an optimization constraint (example : x + y > 3).
- o
CreateParmManipulator()
- Creates a parm manipulator.
- 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
CreateReal(CATUnicodeString&,double)
- Creates real parameter.
- o
CreateSheet(CATUnicodeString&,int)
- Create a design table sheet.
- o
CreateStandardVisitor(GUID&,CATLISTV(CATBaseUnknown_var)*)
- Creates a standard visitor to perform visit via CATIParmPublisher::VisitChildren.
- o
CreateString(CATUnicodeString&,CATUnicodeString&)
- Creates string parameter.
- o
InitAndWakeUp()
- Initialise Literals Catalog and wakes up all relations.
- o
InitStartUps()
- Initialise LiteralFeatures environnement.
Methods
o Copy
public virtual CATICkeParm_var Copy( | const CATICkeParm_var& | iParameterToCopy, |
| const CATCke::Boolean& | iWithFormula | = 0) = 0 |
-
Creates a literal from another by copying its value.
Note that at the end, the parameter is not aggregated.
One option is to copy the existing formula that valuates the literal if any,
The formula is also not aggregated. It will reference the same input parameters as the original formula.
- Parameters:
-
- iParameterToCopy
- parameter to copy
- iWithFormula
- indicates if we wish to copy the formula (note that the formula copied won't be agregated to anything).
Legal values:
0 No copy of the formula.
1 Copy of the formula.
- Returns:
- CATICkeParm_var : literal copied
o Copy
-
Creates a relation from another by copying it.
Works on formula only
Note that second relation will reference the same parameters, so il will be deactivated.
The copied relation is not aggregated.
- Parameters:
-
- iRelationToCopy
- parameter to copy
- Returns:
- CATICkeRelation_var relation copied
o CreateAngle
-
Creates angle parameter.
- Parameters:
-
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value in MKS !!! (i.e. radian)
o CreateBoolean
-
Creates boolean parameter.
- Parameters:
-
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value
o CreateCheck
-
Create a check between parameters (example : x > 3).
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
o CreateDesignTable
-
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.
o CreateDimension
public virtual CATICkeParm_var CreateDimension( | const CATICkeMagnitude_var& | iMagnitude, |
| const CATUnicodeString& | iParameterName, |
| const CATICkeInst_var& | iParameterValue) =0 |
-
Creates dimension parameter.
- Parameters:
-
- iMagnitude
- parameters type
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value
o CreateDimension
public virtual CATICkeParm_var CreateDimension( | const CATICkeMagnitude_var& | iMagnitude, |
| const CATUnicodeString& | iParameterName, |
| const double | iParameterValue) =0 |
-
Creates dimension parameter.
- Parameters:
-
- iMagnitude
- parameters type
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value in MKS !!!
o CreateEnumere
-
Creates an enumerated parameter from value.
- Parameters:
-
- iEnumereType
- enumerated type
- iParameterName
- parameter name
- iParameterValue
- parameter value
o CreateEnumere
-
Creates an enumerated parameter from rank name (1 to n).
- Parameters:
-
- iEnumereType
- enumerated type
- iParameterName
- parameter name
- iParameterRank
- parameter rank (from 1 to n)
o CreateFormula
-
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
o CreateInteger
-
Creates integer parameter.
- Parameters:
-
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value
o CreateLaw
-
Create 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
o CreateLength
-
Creates length parameter.
- Parameters:
-
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value in MKS !!! (i.e. meters)
o CreateList
-
Creates a List object.
- Parameters:
-
- iName
- name of the list.
o CreateLiteral
-
Creates a literal from its type.
- Parameters:
-
- iParameterType
- parameter type
- iParameterName
- parameter name
o CreateMKSUnit
-
Creates a MKS Unit equivalent to a scalar.
o CreateMKSUnit
public virtual CATICkeMKSUnit_var CreateMKSUnit( | const CATICkeMKSUnit::Basic | iBasicMagnitude, |
| const int | iCoeff) = 0 |
-
Creates a MKS Unit equivalent to a primitive magnitude.
(example m2, s-1).
- Parameters:
-
- iBasicMagnitude
- primitive magnitude
- iCoeff
- exponent
- Returns:
- CATICkeMKSUnit_var MKSUnit created
o CreateMKSUnit
public virtual CATICkeMKSUnit_var CreateMKSUnit( | const int | iMeterCoeff, |
| const int | iKilogramCoeff, |
| const int | iSecondCoeff, |
| const int | iAmperCoeff, |
| const int | iTemperatureCoeff, |
| const int | iCandelaCoeff, |
| const int | iMoleNumberCoeff, |
| const int | iPriceCoeff, |
| const int | iRadianCoeff, |
| const int | iSteradianCoeff) = 0 |
-
Creates a MKS Unit equivalent to a combination of primitive magnitude.
(example kgxs-2)
- Parameters:
-
- iMeterCoeff
- exponent for length
- iKilogramCoeff
- exponent for mass
- iSecondCoeff
- exponent for time
- iAmperCoeff
- exponent for amper
- iTemperatureCoeff
- exponent for temperature
- iCandelaCoeff
- exponent for candela
- iMoleNumberCoeff
- exponent for mole number
- iPriceCoeff
- exponent for price
- iRadianCoeff
- exponent for radian
- iSteradianCoeff
- exponent for steradian
o CreateObjectReference
-
Creates feature reference.
A feature reference is a way to see a feature as a parameter,
Such a feature reference can only be used in input of Knowledgeware relations.
- Parameters:
-
- iFeature
- feature to be referenced : should implement CATICkeFeature.
- Returns:
- CATICkeParm_var feature reference created
o CreateOptimizationConstraint
-
Create an optimization constraint (example : x + y > 3).
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 constraint ("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:
- = constraint created or NULL_var if syntax error
o CreateParmManipulator
-
Creates a parm manipulator. This manipulator will not change the persistent parameters range.
This method is used to build a manipulator that will block temporarily the user manipulations.
In no case this manipulator will change the persistent bounds of the parameter.
If you want to persistently change the bounds of the parameter refer to the CATICkeParm interface.
Use only on Volatile Factory.
o CreateProgram
-
Create a rule between parameters (example : if (x> 3) y=3*x else y = 2).
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
o CreateReal
-
Creates real parameter.
- Parameters:
-
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value
o CreateSheet
-
Create a design table sheet.
- 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 type is different from 4, 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
o CreateStandardVisitor
-
Creates a standard visitor to perform visit via CATIParmPublisher::VisitChildren.
When calling CATIParmPublisher::VisitChildren with this visitor, it
adds visited instances in the list if they implement the interface which clsid is iVisitclsid
For example:
In order to retrieve the parameters use CATICkeParm as interface identifier.
To retrieve the instances use CATIInstance as interface identifier.
- Parameters:
-
- iVisitclsid
- the interface identifier.
- ioListToFill
- the list to be filled by the visitor.
CAUTION: the returned visitor must be deleted before the list you give in input, because it keeps
a reference to the list.
o CreateString
-
Creates string parameter.
- Parameters:
-
- iParameterName
- parameter name (never changed)
- iParameterValue
- parameter value
o InitAndWakeUp
public virtual void InitAndWakeUp( | )= 0 |
-
Initialise Literals Catalog and wakes up all relations.
Should be done when creating a new container or loading it.
This method replaces InitStartups. It loads the Literals.feat catalog and does InitStartups on it.
This should be used on the feature container where relations have been stored.
o InitStartUps
public virtual void InitStartUps( | )= 0 |
-
Initialise LiteralFeatures environnement.
It finds all startups needed in this container.
This method should be used on Literals.feat catalog container.
This object is included in the file: CATICkeParmFactory.h
If needed, your Imakefile.mk should include the module: KnowledgeItf