b311480e |
1 | -- Created on: 1993-01-13 |
2 | -- Created by: CKY / Contract Toubro-Larsen ( Deepak PRABHU ) |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
b311480e |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
7fd59977 |
10 | -- |
b311480e |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
7fd59977 |
13 | -- |
b311480e |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | class UnitsData from IGESDefs inherits IGESEntity |
23 | |
24 | ---Purpose: defines IGES UnitsData Entity, Type <316> Form <0> |
25 | -- in package IGESDefs |
26 | -- This class stores data about a model's fundamental units. |
27 | |
28 | uses |
29 | |
30 | HAsciiString from TCollection, |
31 | HArray1OfReal from TColStd, |
32 | HArray1OfHAsciiString from Interface |
33 | |
34 | raises DimensionMismatch, OutOfRange |
35 | |
36 | is |
37 | |
38 | Create returns mutable UnitsData; |
39 | |
40 | -- Specific methods for the entity |
41 | |
42 | Init (me : mutable; |
43 | unitTypes : HArray1OfHAsciiString; |
44 | unitValues : HArray1OfHAsciiString; |
45 | unitScales : HArray1OfReal) |
46 | raises DimensionMismatch; |
47 | ---Purpose : This method is used to set the fields of the class |
48 | -- UnitsData |
49 | -- - unitTypes : Types of the units being defined |
50 | -- - unitValues : Unit Values of the units |
51 | -- - unitScales : Multiplicative Scale Factors |
52 | -- raises exception if lengths of unitTypes, unitValues and |
53 | -- unitScale are not same |
54 | |
55 | NbUnits(me) returns Integer; |
56 | ---Purpose : returns the Number of units defined by this entity |
57 | |
58 | UnitType(me ; UnitNum : Integer) returns HAsciiString from TCollection |
59 | raises OutOfRange; |
60 | ---Purpose : returns the Type of the UnitNum'th unit being defined |
61 | -- raises exception if UnitNum <= 0 or UnitNum > NbUnits() |
62 | |
63 | UnitValue(me ; UnitNum : Integer) returns HAsciiString from TCollection |
64 | raises OutOfRange; |
65 | ---Purpose : returns the Units of the UnitNum'th unit being defined |
66 | -- raises exception if UnitNum <= 0 or UnitNum > NbUnits() |
67 | |
68 | ScaleFactor(me ; UnitNum : Integer) returns Real |
69 | raises OutOfRange; |
70 | ---Purpose : returns the multiplicative scale factor to be apllied to the |
71 | -- UnitNum'th unit being defined |
72 | -- raises exception if UnitNum <= 0 or UnitNum > NbUnits() |
73 | |
74 | fields |
75 | |
76 | -- |
77 | -- Class : IGESDefs_UnitsData |
78 | -- |
79 | -- Purpose : Declaration of variables specific to UnitsData |
80 | -- |
81 | -- Reminder : An UnitsData Entity stores data about a model's |
82 | -- fundamental units. It consists of no. of data strings. |
83 | -- The entity then contains records, each of which |
84 | -- contains a pair of string variables and a real |
85 | -- scale factor. |
86 | |
87 | theUnitTypes : HArray1OfHAsciiString; |
88 | theUnitValues : HArray1OfHAsciiString; |
89 | theUnitScales : HArray1OfReal; |
90 | |
91 | end UnitsData; |