0022958: Redundant assignment
[occt.git] / src / Quantity / Quantity_Convert.cdl
1 -- File:        Quantity_Convert.cdl
2 -- Created:     Tue Jul 19 16:36:20 1994
3 -- Author:      Guest Kernel
4 --              <g_kernel@bibox>
5 ---Copyright:    Matra Datavision 1994
6
7
8 class Convert from Quantity
9
10         ---Purpose: Services to manage units conversion between Front-ends and Engines.
11         -- This conversion is managed by a table of correspondance between the quantities
12         -- and their "conversion coefficient".
13         -- This table is implemented like an external array (TCollection_Array1) regarding 
14         -- to the quantities enumeration.
15      
16 uses 
17     AsciiString from TCollection,
18     PhysicalQuantity from Quantity,
19     Coefficient from Quantity
20              
21 is
22
23     Create returns Convert from Quantity;
24         ---Purpose: Creates an object;
25
26     SetQuantity(myclass ; 
27                 aQuantity : PhysicalQuantity from Quantity ;
28                 aCoef: Coefficient from Quantity);          
29         ---Purpose: Updates the conversion table (correspondances between 
30         -- Quantities and conversion coefficients).
31         ---C++: inline
32
33     ConvertUserToSI(myclass ; 
34                     aQuantity : PhysicalQuantity from Quantity ;
35                     aVal : Real from Standard)
36     returns Real from Standard;
37         ---Purpose: Converts, from the conversion table, the value <aVal>
38         -- from the user system to the SI system. 
39         ---C++: inline
40
41     ConvertSIToUser(myclass ; 
42                     aQuantity : PhysicalQuantity from Quantity ;
43                     aVal : Real from Standard)
44     returns Real from Standard;
45         ---Purpose: Converts, from the conversion table, the value <aVal>
46         -- from the SI system to the user system. 
47         ---C++: inline
48
49     IsPhysicalQuantity(myclass; 
50                        aTypeName : AsciiString from TCollection ; 
51                        anEnum : in out AsciiString from TCollection)
52     returns Boolean from Standard;
53         ---Purpose:
54         -- if (aType is a physical quantity)
55         --    returns True and the name of the associated PhysicalQuantity .
56         -- else 
57         --    returns False.
58
59 end Convert from Quantity;
60                         
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163