KnowledgeInterfaces Interface CATICkeParm
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICkeParm
Interface dedicated to parameters management.
Role: manages informations on parameters.
A Parameter is a variable with a name and a content that can be passed as an argument of a Knowledge expression for its evaluation.
It can be read or written inside a Knowledge expression (its content is changed or replaced).
Several objects are parameters
- Literal: a persistent value, owned by a feature. It can be of type Boolean, Integer, Real, String, or any subtype of dimensions and enumerated types that exist in the dictionary.
A Literal can be recognized through the following test: p->Type()->IsaKindOf(CATCkeGlobalFunctions::GetParmDictionary()->FindType("Literal")).
- Volatile value: a non persistent value. It can be of the same type as persistent values.
- List feature: a feature that allows to reference a set of persistent objects or literals.
A List can be recognized through the following test: p->Type()->IsaKindOf(CATCkeGlobalFunctions::GetParmDictionary()->FindType("List")).
A List is a sub type of the Feature type (CATCkeGlobalFunctions::GetParmDictionary()->GetFeatureType()).
- Volatile List: a non persistent object that allows to reference a set of objects or values.
- Geometric datum: a geometrical object provided by GSMModel framework.
- Reference to V5 objects: a simple reference to an object which becomes the content of the parameter.
A Reference to V5 object can be recognized through the following test: p->Type()->IsaKindOf(CATCkeGlobalFunctions::GetParmDictionary()->GetFeatureType())
Some parameters are persistent (Literal, list feature, geometric datum, or reference to V5 persistent object).
They can be used in the definition of Knowledge relations.
Parameters can be created with a factory
This interface is multi implemented
- See also:
- ,
Method Index
- o
Content()
- Returns the content (show without unit suffix).
- o
ContentIso()
- Returns the value of the parameter without unit suffix while respecting the ISO standard.
- o
CreateManipulator()
- Creates a persistent manipulator if none is referenced in the parameter (BEWARE).
- o
ImpactedRelations(int)
- Returns the list of relations linked to this parameter corresponding to a criteria.
- o
InternalRole()
- Returns the internal role of parameter in its context.
- o
IsConst()
- Indicates if this parameter is const or not.
- o
IsHidden()
- Indicates if this parameter is hidden or shown.
- o
IsLocal()
- Indicates if this parameter is local to a relation set.
- o
IsNamed()
- Indicates if the parameter name has been overidden by a user.
- o
IsReadOnly()
- Indicates if a parameter can be valuated or not.
- o
IsSet()
- Indicates if this parameter is set or unset.
- o
Manipulator()
- Returns the persistent manipulator referenced in the parameter (BEWARE).
- o
Name()
- Returns the name overidden by user (if any).
- o
Pathname(CATIParmPublisher_var&)
- Returns the pathname of a parameter from a context.
- o
Relation()
- Returns the active relation valuating the parameter.
- o
RelativeName(CATIParmPublisher_var&)
- Returns the relative name of a parameter from a context.
- o
Rename(CATUnicodeString&)
- Overrides name of parameter.
- o
Role(CATIParmPublisher_var&)
- Returns the function of a parameter in its context.
- o
SetConst(CATCke::Boolean)
- Sets Const facet.
- o
SetHidden(CATCke::Boolean)
- Sets HideShow facet.
- o
SetInternalRole(CATUnicodeString&)
- Sets the internal role of a parameter.
- o
SetManipulator(CATIParmManipulator_var&)
- References a volatile manipulator in the parameter (BEWARE).
- o
SetRelation(CATIParmValuator_var&,CATCke::Boolean&)
- Sets the active relation valuating parameter.
- o
SetUserAccess(CATICkeParm::UserAccessMode)
- Sets the rights on this parameter.
- o
Show()
- Returns the way of seeing a parameter in the current unit.
- o
ShowIso()
- Returns the value of the parameter in the current unit while respecting the ISO standard.
- o
ShowReal(CATICkeUnit_var&)
- Shows a parameter in a given unit.
- o
ShowRealIso(CATICkeUnit_var&)
- Returns the value of the parameter in a given unit while respecting the ISO standard.
- o
Type()
- Returns the type of the parameter.
- o
Unset()
- Unsets this parameter.
- o
UserAccess()
- Returns the rights on this parameter.
- o
Valuate(int)
- Valuates a literal or volatile value from an integer.
- o
Valuate(double)
- Valuates a literal or volatile value from a double (in MKS).
- o
Valuate(CATTime)
- Valuates a literal or volatile value from a date.
- o
Valuate(CATCke::Boolean)
- Valuates a literal or volatile value from a boolean.
- o
Valuate(CATICkeInst_var&)
- Valuates the content of this parameter with the content of another parameter in argument.
- o
Valuate(CATUnicodeString&)
- Valuates a literal or volatile value from a String.
- o
ValuateObject(CATBaseUnknown_var&)
- This method can be used on three kinds of parameters.
- o
ValuateReal(CATUnicodeString&)
- Sets a parameter or volatile value, sub type of dimension, from a string with unit.
- o
Value()
- Returns its value.
Enumerated Type Index
- o
UserAccessMode
- Rights defined on a parameter.
Methods
o Content
-
Returns the content (show without unit suffix).
This method should not be used to interpret the value. Only for visualization purpose.
example "3".
o ContentIso
public virtual ContentIso( | ) |
-
Returns the value of the parameter without unit suffix while respecting the ISO standard.
- Returns:
- The value of the parameter without unit suffix while respecting the ISO standard,
i.e. : if the setting called "Decimal places for read/write numbers" (used for the display of units) = 3
and if the parameter's value in current unit = 0.001,
returns "0"
otherwise, if parameter's value in current unit = 0.001,
returns "0.001".
o CreateManipulator
public virtual CreateManipulator( | ) |
-
Creates a persistent manipulator if none is referenced in the parameter (BEWARE).
BEWARE: This method returns a persistent manipulator. All the modifications done on the parameter will be saved in the model. To temporarily (from a volatile point of view) change the bounds of a parameter, follow this procedure:
1- CATIParmManipulator_var spVolatileManipulator = CATICkeParmFactory::CreateParmManipulator ()
2- CATICkeParm::SetManipulator( spVolatileManipulator );
3- spVolatileManipulator -> SetRange() or AddMultipleValues()...;
Note that just one persistent manipulator can be created on a parameter and the last volatile manipulator's reference can be kept in the parameter.
- Returns:
- The persistent manipulator referenced in the parameter if any, otherwise, it creates a new one.
o ImpactedRelations
public virtual ImpactedRelations( | const | iCriteria | = 0) |
-
Returns the list of relations linked to this parameter corresponding to a criteria.
- Parameters:
-
- iCriteria
-
Legal values:
1 returns the relations where this parameter is in input.
2 returns the relations where this parameter is in output.
0 returns the relations where this parameter is in input or output.
- Returns:
- list of relation : the list is allocated : Please desallocate
o InternalRole
public virtual InternalRole( | ) |
-
Returns the internal role of parameter in its context.
It is the name given to the parameter at its creation
o IsConst
-
Indicates if this parameter is const or not.
Default value is always not Const
- Returns:
- Legal values: CATCke::True if it is constant
CATCke::False if it isn't.
o IsHidden
public virtual IsHidden( | ) |
-
Indicates if this parameter is hidden or shown.
Default value is always Shown
- Returns:
-
Legal values: CATCke::True if it is hidden
CATCke::False if it isn't.
o IsLocal
-
Indicates if this parameter is local to a relation set.
- Returns:
- Legal values: CATCke::True if it is local.
CATCke::False if it isn't.
o IsNamed
-
Indicates if the parameter name has been overidden by a user.
- Returns:
- Legal values: CATCke::True if it is renamed.
CATCke::False if it isn't.
o IsReadOnly
public virtual IsReadOnly( | ) |
-
Indicates if a parameter can be valuated or not.
it is read only
-when the user access say so or when it is valuated by a relation
-or when its visibility is false
- Returns:
- Legal values: CATCke::True if it is read only.
CATCke::False if it isn't.
o IsSet
-
Indicates if this parameter is set or unset.
Default value is always Set
- Returns:
- Legal values: CATCke::True if it is set
CATCke::False if it isn't.
o Manipulator
public virtual Manipulator( | ) |
-
Returns the persistent manipulator referenced in the parameter (BEWARE).
BEWARE: This method returns the persistent manipulator referenced in the parameter. All the modifications done on the parameter will be saved in the model. To temporarily (from a volatile point of view) change the bounds of a parameter, follow this procedure:
1- CATIParmManipulator_var spVolatileManipulator = CATICkeParmFactory::CreateParmManipulator ()
2- CATICkeParm::SetManipulator( NULL_var ); ); If you wish to delete the last volatile manipulator.
3- CATICkeParm::SetManipulator( spVolatileManipulator );
4- spVolatileManipulator -> SetRange() or AddMultipleValues()...;
- Returns:
- The manipulator referenced in the parameter. It could have been created using the method
or set using the method
.
o Name
-
Returns the name overidden by user (if any).
example : "x" .
o Pathname
public virtual Pathname( | const | iRoot | = NULL_var) |
-
Returns the pathname of a parameter from a context.
example : "PartBody\Hole.1\Diameter"
- Parameters:
-
- iRoot
- context object
- Returns:
- The pathname
o Relation
public virtual Relation( | ) |
-
Returns the active relation valuating the parameter.
o RelativeName
public virtual RelativeName( | const | iRoot | = NULL_var) |
-
Returns the relative name of a parameter from a context.
example : "x" or "PartBody\Hole.1\Diameter"
If name is overidden, returns this name else returns pathname
Should be used to show a literal to the user
- Parameters:
-
- iRoot
- context
- Returns:
- The relative name
o Rename
public virtual Rename( | const | iNewName) |
-
Overrides name of parameter.
(if value == "" the parameter will have no overriden name anymore)
- Parameters:
-
- iNewName
- name
o Role
public virtual Role( | const | iRoot | = NULL_var) |
-
Returns the function of a parameter in its context.
The string returns is NLS.
- Parameters:
-
- iRoot
- CATIParmPublisher that contains the literal and which is able to name it
- Returns:
- The function of a parameter in its context
o SetConst
public virtual SetConst( | const | iConstant) |
-
Sets Const facet.
Default value is always not Const
- Parameters:
-
- iConstant
- Legal values:
CATCke::True if it is constant
CATCke::False if it isn't.
o SetHidden
public virtual SetHidden( | const | b) |
-
Sets HideShow facet.
Default value is always Shown
- Parameters:
-
- b
-
Legal values: CATCke::True if it is hidden
CATCke::False if it isn't.
o SetInternalRole
public virtual SetInternalRole( | const | iRole) |
-
Sets the internal role of a parameter.
This shouldn't be done on a non User parameter
- Parameters:
-
- iRole
- Internal role
o SetManipulator
public virtual SetManipulator( | const | iManipulator) |
-
References a volatile manipulator in the parameter (BEWARE).
BEWARE: This method references a volatile manipulator in the parameter. All the modifications done on the parameter will not be saved in the model. To persistently (from a persistent point of view) change the bounds of a parameter follow this procedure:
1- CATIParmManipulator_var spPersitentManipulator = param->CreateManipulator();
2- spPersitentManipulator -> SetRange() or AddMultipleValues()...;
Note that just one persistent manipulator can be created on a parameter and the last volatile manipulator's reference can be kept in the parameter.
- Parameters:
-
- iManipulator
- volatile manipulator.
o SetRelation
public virtual SetRelation( | const | iValuating, |
| const | iStrong | = 0 ) |
-
Sets the active relation valuating parameter.
- Parameters:
-
- iValuating
- relation (can be NULL_var)
- iStrong:
-
Legal values:
CATCke::True sets an input and persistant update link between parameter and valuating.
CATCke::False .
Note that the parameter and the iValuating must be in the same container. This will be enforced in the future to allow
only authorized data models.
o SetUserAccess
public virtual SetUserAccess( | const | iRights) |
-
Sets the rights on this parameter.
- Parameters:
-
- iRights:
- Legal values:
NotSeen this parameter is not seen by the user.
ReadOnly the parameter will be seen but won't be modified, may be used as input of a relation.
ReadWrite Default value:the parameter can be modified, and used as output of a relation
User this is a parameter created by a end-user. It can be destroyed
o Show
-
Returns the way of seeing a parameter in the current unit.
This method should not be used to interpret the value. Only for visualization purpose.
example : "3mm"
o ShowIso
-
Returns the value of the parameter in the current unit while respecting the ISO standard.
- Returns:
- The value of the parameter in the current unit while respecting the ISO standard,
i.e. : if the setting called "Decimal places for read/write numbers" (used for the display of units) = 3
and if the parameter's value in current unit (e.g. mm) = 0.001,
returns "0mm"
otherwise, if parameter's value in current unit (e.g. mm) = 0.001,
returns "0.001mm".
o ShowReal
public virtual ShowReal( | const | iUnit) |
-
Shows a parameter in a given unit.
example "3 km".
- Parameters:
-
- iUnit
- unit
- Returns:
- a string that enables to show the value of a parameter in a given unit
o ShowRealIso
public virtual ShowRealIso( | const | iUnit) |
-
Returns the value of the parameter in a given unit while respecting the ISO standard.
- Returns:
- The value of the parameter in the unit given as parameter while respecting the ISO standard,
i.e. : if the setting called "Decimal places for read/write numbers" (used for the display of units) = 3
and if the parameter's value converts in the given unit (e.g. mm) = 0.001,
returns "0mm"
otherwise, if parameter's value converts in the given unit (e.g. mm) = 0.001,
returns "0.001mm".
- Parameters:
-
- iUnit
- Unit in which the value of the parameter is shown.
o Type
-
Returns the type of the parameter.
o Unset
-
Unsets this parameter.
o UserAccess
public virtual UserAccess( | ) |
-
Returns the rights on this parameter.
Legal values:
NotSeen this parameter is not seen by the user.
ReadOnly the parameter will be seen but won't be modified, may be used as input of a relation.
ReadWrite Default value:the parameter can be modified, and used as output of a relation
User this is a parameter created by a end-user. It can be destroyed
o Valuate
public virtual Valuate( | const | iValue) |
-
Valuates a literal or volatile value from an integer.
Raises an exception if the parameter content is not a sub type of real, an integer or enumerated value.
- Parameters:
-
- iValue
- value to set
o Valuate
public virtual Valuate( | const | iValue) |
-
Valuates a literal or volatile value from a double (in MKS).
Raises an exception if the parameter content is not a sub type of real.
- Parameters:
-
- iValue
- value to set
o Valuate
public virtual Valuate( | const | iValue) |
-
Valuates a literal or volatile value from a date.
Raises an exception if parameter content is not a date.
- Parameters:
-
- iValue
- value to set
o Valuate
public virtual Valuate( | const | iValue) |
-
Valuates a literal or volatile value from a boolean.
Raises an exception if parameter content is not a boolean.
- Parameters:
-
- iValue
- value to set
o Valuate
public virtual Valuate( | const | iValue) |
-
Valuates the content of this parameter with the content of another parameter in argument.
Both parameters must be compatible:
If the current parameter is a value, the value in argument must be a subtype of the current value.
If the current parameter is a reference to feature, the value in argument must be a subtype of the type of the current value.
If the current parameter is a List, the value in argument must be a List also. As the content is copied, it must be compatible also (only persistent objects can be added to a list feature).
If the current parameter is a Geometric datum, the value in argument must be a geometry sub type of the current parameter.
- Parameters:
-
- iValue
- value to set
o Valuate
public virtual Valuate( | const | iValue) |
-
Valuates a literal or volatile value from a String.
Raises an exception if parameter content is not a String or an enumerated value.
- Parameters:
-
- iValue
- value to set
o ValuateObject
public virtual ValuateObject( | const | iFeature) |
-
This method can be used on three kinds of parameters.
It valuates a reference to object parameter with a feature.
It is used also to valuate a geometrical datum with a the topology result of a feature.
Finally, it can be used to valuate a list with another list. In this case, the content of the current list is replaced by the content of the list in argument.
Raises an exception if the parameter content is not a sub type of Feature in the first case and if the type of the parameter in argument is not a subtype of the parameter itself.
Raises an exception if the feature in argument does not fit with the type of the datum.
Raises an exception if the feature in argument is not a list. Finally, note that a volatile list can be valuated by any kind of list.But a list feature must be valuated by a list
where each element is persistent.
- Parameters:
-
- iFeature
- value to set
o ValuateReal
public virtual ValuateReal( | const | iValue) |
-
Sets a parameter or volatile value, sub type of dimension, from a string with unit.
(ex "3cm")
- Parameters:
-
- iValue
- string
o Value
-
Returns its value.
Enumerated Types
o UserAccessMode
-
enum UserAccessMode {
NotSeen,
ReadOnly,
WriteOnly,
ReadWrite,
User
}
Rights defined on a parameter.
Used to define how this parameter can be used through Knowledgeware.
Legal values:
NotSeen this parameter is not seen by the user.
ReadOnly the parameter will be seen but won't be modified, may be used as input of a relation.
ReadWrite Default value:the parameter can be modified, and used as output of a relation
User this is a parameter created by a end-user. It can be destroyed
Once defined, this information shouldn't be modified
This object is included in the file: CATICkeParm.h
If needed, your Imakefile.mk should include the module: KnowledgeItf
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.