All Frameworks Class Hierarchy This Framework Previous Next Indexes
KnowledgeInterfaces Interface CATICkeMagnitude
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATICkeMagnitude
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICkeMagnitude
Interface dedicated to dimensions type management.
Role: Length, Mass ,Time ... are magnitudes. This interface offers services to manage mainly their units.
This interface is based on the International System Magnitude Management called MKS.
Each magnitude has a default unit corresponding to the MKS System.
for example : the default unit for length is meter
the default unit for weight is kilogram
etc...
All conversion methods are working with this MKS unit on one side.
All magnitudes implement CATICkeType.
- See also:
- CATICkeType
- See also:
- CATICkeMKSUnit
- See also:
- CATICkeUnit
Method Index
- o
Compare(double,double)
- Compares two vales in MKS considering the epsilon.
- o
CurrentUnit()
- Returns the current visualisation unit.
- o
DecodeReal(CATUnicodeString&,double&)
- Tries to decode "3 cm".
- o
Epsilon()
- Returns tolerance between real.
- o
GetChangeUnitNotification()
- Returns change unit notification.
- o
MKS()
- Returns MKS unit equivalence.
- o
MKSUnit()
- Returns the mks unit for this magnitude.
- o
Name()
- Returns magnitude's NLS name (that can be shown to a user).
- o
SetCurrentUnit(CATICkeUnit_var&,CATCke::Boolean&)
- Sets current visualisation unit.
- o
StorageUnit()
- Returns the storage unit.
- o
Units()
- Gets the list of units corresponding to this magnitude.
Methods
o Compare
public virtual CATCke::Boolean Compare( | const double | iValue1, |
| const double | iValue2) const = 0 |
-
Compares two vales in MKS considering the epsilon.
- Parameters:
-
- iValue1
- first value in MKS
- iValue2
- second value in MKS
- Returns:
-
Legal values: CATCke::True if comparison Ok.
CATCke::False if comparison Ko.
o CurrentUnit
-
Returns the current visualisation unit.
For each magnitude there is one current unit, which is the visualisation and dialog unit.
It can be changed.
o DecodeReal
public virtual CATCke::Boolean DecodeReal( | const CATUnicodeString& | iStringToDecode, |
| double& | oValueDecoded) const=0 |
-
Tries to decode "3 cm".
Can decode "3" in current visualisation unit.
- Parameters:
-
- iStringToDecode
- string to be decoded
- oValueDecoded
- double decoded in MKS
- Returns:
-
Legal values: CATCke::True if successful.
CATCke::False if failed.
o Epsilon
public virtual double Epsilon( | )const = 0 |
-
Returns tolerance between real.
Gets the epsilon in MKS.
o GetChangeUnitNotification
-
Returns change unit notification.
Used to subscribe to change unit.
o MKS
-
Returns MKS unit equivalence.
o MKSUnit
-
Returns the mks unit for this magnitude.
o Name
-
Returns magnitude's NLS name (that can be shown to a user).
If you're interested in coded name, use CATICkeType_var::Name().
This NLS is found in LiteralsNLS catalog.
o SetCurrentUnit
public virtual void SetCurrentUnit( | const CATICkeUnit_var& | iCurrentUnit, |
| const CATCke::Boolean& | iStored | = 1) = 0 |
-
Sets current visualisation unit.
(no effect on storage unit)
- Parameters:
-
- iCurrentUnit
- visualisation unit to be set
- iStored
- = CATCke::True modifies feature stored information or only temporary
o StorageUnit
-
Returns the storage unit.
each magnitude as one storage unit predefined.
o Units
-
Gets the list of units corresponding to this magnitude.
- Returns:
- a pointer to a list of CATBaseUnknown_var not to be desallocated
This object is included in the file: CATICkeMagnitude.h
If needed, your Imakefile.mk should include the module: KnowledgeItf