b311480e |
1 | -- Created on: 1993-01-09 |
2 | -- Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN) |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
7fd59977 |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
7fd59977 |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class GenericData from IGESDefs inherits IGESEntity |
18 | |
19 | ---Purpose: defines IGES Generic Data, Type <406> Form <27> |
20 | -- in package IGESDefs |
21 | -- Used to communicate information defined by the system |
22 | -- operator while creating the model. The information is |
23 | -- system specific and does not map into one of the |
24 | -- predefined properties or associativities. Properties |
25 | -- and property values can be defined by multiple |
26 | -- instances of this property. |
27 | |
28 | uses |
29 | |
30 | HAsciiString from TCollection, |
31 | HArray1OfReal from TColStd, |
32 | HArray1OfTransient from TColStd, |
33 | HArray1OfInteger from TColStd, |
34 | HArray1OfHAsciiString from Interface, |
35 | HArray1OfIGESEntity from IGESData |
36 | |
37 | raises DimensionMismatch, OutOfRange, NullObject |
38 | |
39 | is |
40 | |
6e33d3ce |
41 | Create returns GenericData; |
7fd59977 |
42 | |
43 | -- Specific Methods pertaining to the class |
44 | |
45 | Init (me : mutable; |
46 | nbPropVal : Integer; |
47 | aName : HAsciiString; |
48 | allTypes : HArray1OfInteger; |
49 | allValues : HArray1OfTransient from TColStd) |
50 | ---Purpose : This method is used to set the fields of the class |
51 | -- GenericData |
52 | -- - nbPropVal : Number of property values |
53 | -- - aName : Property Name |
54 | -- - allTypes : Property Types |
55 | -- - allValues : Property Values |
56 | raises DimensionMismatch; |
57 | -- if lengths of allTypes and allValues are not same |
58 | |
59 | NbPropertyValues (me) returns Integer; |
60 | ---Purpose : returns the number of property values |
61 | |
62 | Name (me) returns HAsciiString from TCollection; |
63 | ---Purpose : returns property name |
64 | |
65 | NbTypeValuePairs (me) returns Integer; |
66 | ---Purpose : returns the number of TYPE/VALUE pairs |
67 | |
68 | Type (me; Index : Integer) returns Integer |
69 | raises OutOfRange; |
70 | ---Purpose : returns the Index'th property value data type |
71 | -- raises exception if Index <= 0 or Index > NbTypeValuePairs() |
72 | |
73 | Value (me; Index : Integer) returns Transient |
74 | --The Transient returned depends of Type : |
75 | ---Purpose : HArray1OfInteger (length 1), HArray1OfReal (length 1) for |
76 | -- Integer, Real, Boolean (= Integer 0/1), |
77 | -- HAsciiString for String (the value itself), |
78 | -- IGESEntity for Entity (the value itself) |
79 | raises OutOfRange; |
80 | -- raises exception if Index <= 0 or Index > NbTypeValuePairs() |
81 | |
82 | |
83 | ValueAsInteger (me; ValueNum : Integer) returns Integer |
84 | ---Purpose : Returns Attribute Value <AttrNum, rank ValueNum> as an Integer |
85 | raises OutOfRange, NullObject; |
86 | ---Purpose : Error if Index out of Range, or not an Integer |
87 | |
88 | ValueAsReal (me; ValueNum : Integer) returns Real |
89 | ---Purpose : Returns Attribute Value <AttrNum, rank ValueNum> as a Real |
90 | raises OutOfRange, NullObject; |
91 | ---Purpose : Error if Index out of Range, or not a Real |
92 | |
93 | ValueAsString (me; ValueNum : Integer) |
94 | returns HAsciiString from TCollection |
95 | ---Purpose : Returns Attribute Value <AttrNum, rank ValueNum> as an Integer |
96 | raises OutOfRange, NullObject; |
97 | -- Error if Index out of Range, or not a String |
98 | |
99 | ValueAsEntity (me; ValueNum : Integer) returns IGESEntity |
100 | ---Purpose : Returns Attribute Value <AttrNum, rank ValueNum> as an Entity |
101 | raises OutOfRange, NullObject; |
102 | ---Purpose : Error if Index out of Range, or not a Entity |
103 | |
104 | ValueAsLogical (me; ValueNum : Integer) returns Boolean |
105 | ---Purpose : Returns Attribute Value <AttrNum, rank ValueNum> as a Boolean |
106 | raises OutOfRange, NullObject; |
107 | ---Purpose : Error if Index out of Range, or not a Logical |
108 | |
109 | fields |
110 | |
111 | -- |
112 | -- Class : IGESDefs_GenericData |
113 | -- |
114 | -- Purpose : Declaration of variables specific to the definition |
115 | -- of the Class GenericData. |
116 | -- |
117 | -- Reminder : A GenericData instance is defined by : |
118 | -- - Number of property values |
119 | -- - Property Name |
120 | -- - Property Types |
121 | -- - Property Values |
122 | -- The values can be of type either no value, integer, real, |
123 | -- string, pointer or boolean. Accordingly we store them in a |
124 | -- Transient Object of appropriate Type : |
125 | -- - HArray1OfInteger/OfReal of length 1, for Integer, Real, Logical |
126 | -- - a single HAsciiString for String |
127 | -- - a single IGESEntity for Entity (Pointer) |
128 | |
129 | theNbPropertyValues : Integer; |
130 | theName : HAsciiString; |
131 | theTypes : HArray1OfInteger; |
132 | theValues : HArray1OfTransient from TColStd; |
133 | |
134 | end GenericData; |