0022627: Change OCCT memory management defaults
[occt.git] / src / Units / Units_Measurement.cdl
CommitLineData
7fd59977 1-- File: Units_Measurement.cdl
2-- Created: Mon Jun 22 16:42:01 1992
3-- Author: Gilles DEBARBOUILLE
4-- <gde@phobox>
5---Copyright: Matra Datavision 1992
6
7
8class Measurement from Units
9
10 ---Purpose: This class defines a measurement which is the
11 -- association of a real value and a unit.
12
13uses
14
15 Token from Units
16
17--raises
18
19is
20
21 Create returns Measurement from Units;
22 ---Level: Internal
23 ---Purpose: It is the empty constructor of the class.
24
25 Create(avalue : Real ; atoken : Token from Units)
26 ---Level: Internal
27 ---Purpose: Returns an instance of this class. <avalue> defines
28 -- the measurement, and <atoken> the token which defines
29 -- the unit used.
30 returns Measurement from Units;
31
32 Create(avalue : Real ; aunit : CString)
33 ---Level: Public
34 ---Purpose: Returns an instance of this class. <avalue> defines
35 -- the measurement, and <aunit> the unit used,
36 -- described in natural language.
37 returns Measurement from Units;
38
39 Convert(me : in out ; aunit : CString)
40 ---Level: Public
41 ---Purpose: Converts (if possible) the measurement object into
42 -- another unit. <aunit> must have the same
43 -- dimensionality as the unit contained in the token
44 -- <thetoken>.
45 is static;
46
47 Integer(me) returns Measurement from Units
48 ---Level: Public
49 ---Purpose: Returns a Measurement object with the integer value of
50 -- the measurement contained in <me>.
51 is static;
52
53 Fractional(me) returns Measurement from Units
54 ---Level: Public
55 ---Purpose: Returns a Measurement object with the fractional value
56 -- of the measurement contained in <me>.
57 is static;
58
59 Measurement(me) returns Real
60 ---Level: Public
61 ---Purpose: Returns the value of the measurement.
62 is static;
63
64 Token(me) returns Token from Units
65 ---Level: Internal
66 ---Purpose: Returns the token contained in <me>.
67 is static;
68
69 Add(me ; ameasurement : Measurement from Units) returns Measurement from Units
70 ---Level: Public
71 ---C++: alias operator +
72 ---Purpose: Returns (if it is possible) a measurement which is the
73 -- addition of <me> and <ameasurement>. The chosen
74 -- returned unit is the unit of <me>.
75 is static;
76
77 Subtract(me ; ameasurement : Measurement from Units) returns Measurement from Units
78 ---Level: Public
79 ---C++: alias operator -
80 ---Purpose: Returns (if it is possible) a measurement which is the
81 -- subtraction of <me> and <ameasurement>. The chosen
82 -- returned unit is the unit of <me>.
83 is static;
84
85 Multiply(me ; ameasurement : Measurement from Units) returns Measurement from Units
86 ---Level: Public
87 ---C++: alias operator *
88 ---Purpose: Returns a measurement which is the multiplication of
89 -- <me> and <ameasurement>.
90 is static;
91
92 Multiply(me ; avalue : Real) returns Measurement from Units
93 ---Level: Public
94 ---C++: alias operator *
95 ---Purpose: Returns a measurement which is the multiplication of
96 -- <me> with the value <avalue>.
97 is static;
98
99 Divide(me ; ameasurement : Measurement from Units) returns Measurement from Units
100 ---Level: Public
101 ---C++: alias operator /
102 ---Purpose: Returns a measurement which is the division of <me> by
103 -- <ameasurement>.
104 is static;
105
106 Divide(me ; avalue : Real) returns Measurement from Units
107 ---Level: Public
108 ---C++: alias operator /
109 ---Purpose: Returns a measurement which is the division of <me> by
110 -- the constant <avalue>.
111 is static;
112
113 Power(me ; anexponent : Real) returns Measurement from Units
114 ---Level: Public
115 -- -C++: alias "friend Units_Measurement pow(const Units_Measurement&,const Standard_Real);"
116 ---Purpose: Returns a measurement which is <me> powered
117 -- <anexponent>.
118 is static;
119
120 HasToken(me) returns Boolean from Standard;
121
122 Dump(me)
123 ---Level: Internal
124 ---Purpose: Useful for debugging.
125 is static;
126
127fields
128
129 themeasurement : Real;
130 thetoken : Token from Units;
131 myHasToken : Boolean from Standard;
132
133end Measurement;