All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

KnowledgeInterfaces Interface CATICkeMKSUnit

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATICkeMKSUnit
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATICkeMKSUnit

Interface dedicated to MKS equivalent management.
Role: Magnitudes are equivalent to a combination of primitive magnitudes
(for example : a speed is equivalent to Length divided by time).
This class gives the list of exponent (positive or negative) for each primitive magnitude

The primitives are :
M : Length
K : Mass
S : Time
A : Ampere
T : Temperature
C : Candela
O : Mole
P : Price
R : Angle
E : Solid angle
Scalar : scalar

Usage :

#include "CATICkeParmFactory.h"
#include "CATICkeMKSUnit.h"

//------------------------------------------------
// MKS Units
//------------------------------------------------
// you can create mks unit equivalent to a scalar
CATICkeMKSUnit_var mk1 = fact->CreateMKSUnit ();
Assume (mk1->Get(MKSUnitM) == 0);

// you can create mks unit equivalent to a simple standard unit
CATICkeMKSUnit_var area = fact->CreateMKSUnit (MKSUnitM,2);
Assume (area->Get(MKSUnitM) == 2);

// you can create mks unit equivalent to a combination of units
CATICkeMKSUnit_var density = fact->CreateMKSUnit (-3,1,0,0,0,0,0,0,0,0);
Assume (density->Get(MKSUnitM) == -3);

See also:
CATICkeMagnitude


Method Index


o Compare(CATICkeMKSUnit_var&)
Compares one mks with another.
o Divide(CATICkeMKSUnit_var&,CATICkeMKSUnit_var&)
Divides 2 mks unit (example a Length divided by a Length produces a scalar).
o Get(CATICkeMKSUnit::Basic)
Reads the exponent of a basic primitive.
o Multiply(CATICkeMKSUnit_var&,CATICkeMKSUnit_var&)
Multiply 2 MKSunit (example a Length multiplied with a Length produces an area).
o Power(int,CATICkeMKSUnit_var&)
Power (example a Length power 3 produces a volume).
o Set(CATICkeMKSUnit::Basic,int)
Sets a basic primitive exponent.
o Show()
Shows a view of the MKS equivalent in NLS.

Enumerated Type Index


o Basic
List of existing MKS primitive magnitudes
Legal values: M for meter K for kilogram S for second A for amper T for temperature C for candela O for number of mole P for price R for radian E for steradian

Methods


o Compare
public virtual CATCke::Boolean Compare( const CATICkeMKSUnit_var& iMKSToCompare) const = 0
Compares one mks with another.
Parameters:
iMKSToCompare
MKS to compare
Returns:

Legal values: CATCke::True if same MKS CATCke::False if not
o Divide
public virtual CATCke::Boolean Divide( const CATICkeMKSUnit_var& iMKSDividedBy,
CATICkeMKSUnit_var& oResult) const =0
Divides 2 mks unit (example a Length divided by a Length produces a scalar).
Parameters:
iMKSDividedBy
the unit that must divide the current unit
oResult
the resulting unit
Returns:

Legal values: CATCke::True if division Ok CATCke::False if error in MKS division
o Get
public virtual int Get( const CATICkeMKSUnit::Basic iPrimitiveMagnitude) const =0
Reads the exponent of a basic primitive.
Parameters:
iPrimitiveMagnitude
primitive magnitude
o Multiply
public virtual CATCke::Boolean Multiply( const CATICkeMKSUnit_var& iMKSMultipliedWith,
CATICkeMKSUnit_var& oResult) const =0
Multiply 2 MKSunit (example a Length multiplied with a Length produces an area).
Parameters:
iMKSMultipliedWith
the parameter with which the multiplication occurs.
oResult
The resulting unit.
Returns:

Legal values: CATCke::True if multiplication Ok CATCke::False if error in MKS multiplication
o Power
public virtual CATCke::Boolean Power( const int iCoeff,
CATICkeMKSUnit_var& oResult) const =0
Power (example a Length power 3 produces a volume).
Parameters:
iCoeff
exponent (positive or negative)
oResult
the resulting unit
Returns:

Legal values: CATCke::True if operation Ok CATCke::False if error in MKS operation
o Set
public virtual void Set( const CATICkeMKSUnit::Basic iPrimitiveMagnitude,
const int iCoeff) =0
Sets a basic primitive exponent.
Parameters:
iPrimitiveMagnitude
primitive magnitude
iCoeff
exponent
o Show
public virtual CATUnicodeString Show()const = 0
Shows a view of the MKS equivalent in NLS.

Enumerated Types


o Basic
enum Basic {
  M,
  K,
  S,
  A,
  T,
  C,
  O,
  P,
  R,
  E,
  Scalar
}
List of existing MKS primitive magnitudes
Legal values: M for meter K for kilogram S for second A for amper T for temperature C for candela O for number of mole P for price R for radian E for steradian

This object is included in the file: CATICkeMKSUnit.h
If needed, your Imakefile.mk should include the module: KnowledgeItf

Copyright © 2003, Dassault Systèmes. All rights reserved.