0022627: Change OCCT memory management defaults
[occt.git] / src / Units / Units.cdl
1 -- File:        Units.cdl
2 -- Created:     Mon Jun 22 18:23:44 1992
3 -- Author:      Gilles DEBARBOUILLE
4 --              <gde@phobox>
5 -- Modified     Wed Apr  2 14:10:05 1997 by Gerard GRAS    
6 --              Add FirstQuantity access methods
7 -- Modified     Mon Apr  7 16:52:40 1997 by Patrick BOSINCO
8 --              Add Dimensions access methods
9 ---Copyright:    Matra Datavision 1992
10
11
12 package Units 
13
14         ---Purpose: This  package provides all the  facilities  to create
15         --          and question a dictionary of  units,  and also  to
16         --          manipulate measurements which are real values with
17         --          units.
18
19 uses
20
21     TCollection,
22     TColStd
23
24 is
25             
26     class Dimensions;
27     
28     class Unit;
29     
30     class UtsSequence instantiates
31           Sequence from TCollection (Unit from Units);
32     class UnitsSequence instantiates 
33           HSequence from TCollection(Unit from Units, UtsSequence);
34     
35     private class ShiftedUnit;
36
37     class Token ;
38     
39     class ShiftedToken ;
40     
41     class TksSequence instantiates
42            Sequence from TCollection (Token from Units);
43     class TokensSequence instantiates 
44            HSequence from TCollection(Token from Units, TksSequence);
45     
46     class Quantity;
47     
48     class QtsSequence instantiates
49           Sequence from TCollection (Quantity from Units);
50     class QuantitiesSequence instantiates 
51           HSequence from TCollection(Quantity from Units, QtsSequence);
52     
53     class UnitsDictionary;
54     
55     class UnitsSystem;
56     
57     class Explorer;
58     
59     private class Sentence;
60     
61     private class MathSentence;
62     
63     private class UnitSentence;
64     
65     class Lexicon;
66     
67     private class UnitsLexicon;
68     
69     class Measurement;
70     
71     exception NoSuchUnit inherits NoSuchObject from Standard;
72     exception NoSuchType inherits NoSuchObject from Standard;
73     
74     UnitsFile(afile : CString);
75     
76     ---Level: Public
77     
78     ---Purpose: Defines the location of the file containing all the 
79     --          information useful in creating the dictionary of all 
80     --          the units known to the system.
81     
82     LexiconFile(afile : CString);
83     
84     ---Level: Public
85     
86     ---Purpose: Defines the location of the file containing the lexicon 
87     --          useful in manipulating composite units.
88     
89     DictionaryOfUnits(amode : Boolean = Standard_False) returns UnitsDictionary from Units;
90     
91     ---Level: Advanced
92     
93     ---Purpose: Returns a unique instance of the dictionary of units.
94     --          If <amode> is True, then it forces the recomputation of 
95     --          the dictionary of units.
96     
97     Quantity(aquantity : CString from Standard) returns Quantity from Units;
98     
99     ---Level: Advanced
100     
101     ---Purpose: Returns a unique quantity instance corresponding to <aquantity>.
102
103     FirstQuantity(aunit : CString from Standard) returns CString from Standard;
104
105     ---Level: Advanced
106
107     ---Purpose: Returns the first quantity string founded from the unit <aUnit>.
108
109     LexiconUnits(amode : Boolean = Standard_True) returns Lexicon from Units;
110     
111     ---Level: Internal
112     
113     ---Purpose: Returns a unique instance of the Units_Lexicon.
114     --          If <amode> is True, it forces the recomputation of 
115     --          the dictionary of units, and by consequence the 
116     --          completion of the Units_Lexicon.
117     
118     LexiconFormula returns Lexicon from Units;
119     
120     ---Level: Internal 
121
122     ---Purpose: Return a unique instance of LexiconFormula.
123     
124     NullDimensions returns Dimensions from Units;
125     
126     ---Level: Internal
127     
128     ---Purpose: Returns always the same instance of Dimensions.
129     
130     Convert(avalue : Real ; afirstunit , asecondunit : CString) returns Real;
131     
132     ---Level: Public
133     
134     ---Purpose: Converts <avalue> expressed in <afirstunit> into the <asecondunit>.
135             
136     ToSI(aData: Real from Standard; aUnit: CString from Standard) returns Real from Standard;
137
138     ToSI(aData: Real from Standard; aUnit: CString from Standard;
139          aDim : out Dimensions from Units) returns Real from Standard;
140
141     FromSI(aData: Real from Standard; aUnit: CString from Standard) returns Real from Standard;
142
143     FromSI(aData: Real from Standard; aUnit: CString from Standard;
144            aDim : out Dimensions from Units ) returns Real from Standard;
145
146     Dimensions(aType : CString from Standard)
147     returns Dimensions from Units
148     raises NoSuchObject from Standard;
149     ---Level: Public
150     ---Purpose: return the dimension associated to the Type
151
152 end Units;
153