Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IGESDefs / IGESDefs_AttributeTable.cdl
CommitLineData
7fd59977 1--
2-- File : AttributeTable.cdl
3-- Created : Sat 9 Jan 1993
4-- Author : CKY / Contract Toubro-Larsen ( Arun MENON )
5--
6---Copyright : MATRA-DATAVISION 1993
7--
8
9class AttributeTable from IGESDefs inherits IGESEntity
10
11 ---Purpose: defines IGES Attribute Table, Type <422> Form <0, 1>
12 -- in package IGESDefs
13 -- This class is used to represent an occurence of
14 -- Attribute Table. This Class may be independent
15 -- or dependent or pointed at by other Entities.
16
17uses
18
19 HAsciiString from TCollection,
20 AttributeDef from IGESDefs,
21 HArray1OfReal from TColStd,
22 HArray2OfTransient from TColStd,
23 HArray1OfInteger from TColStd,
24 HArray1OfHAsciiString from Interface,
25 HArray1OfIGESEntity from IGESData
26
27raises OutOfRange, NullObject
28
29is
30
31 Create returns mutable AttributeTable;
32
33 -- Specific methods for the entity
34
35 Init (me : mutable;
36 attributes : HArray2OfTransient from TColStd);
37 ---Purpose : This method is used to set the fields of the class
38 -- AttributeTable
39 -- - attributes : Attribute instances, created as
40 -- (1,NbAttributes,1,NbRows)
41 -- - NbRows = 1 is a particular case (Form 0)
42
43 SetDefinition (me : mutable; def : AttributeDef);
44 ---Purpose : Sets a Definition as Structure information
45 -- (works by calling InitMisc)
46
47 Definition (me) returns AttributeDef;
48 ---Purpose : Return the Structure information in Directory Entry,
49 -- casted as an AttributeDef
50
51 NbRows(me) returns Integer;
52 ---Purpose : returns Number of Rows. Remark that it is always 1 if Form = 0
53 -- It means that the list of Attributes (by their number, and for each
54 -- one its type and ValueCount) is repeated <NbRows> times
55
56 NbAttributes (me) returns Integer;
57 ---Purpose : returns Number of Attributes
58
59 DataType (me; Atnum : Integer) returns Integer;
60 ---Purpose : returns the Type of an Attribute, given its No. : it is read in the
61 -- Definition.
62 -- (1 : Integer, 2 : Real, 3 : String, 4 : Entity, 6 : Logical)
63
64 ValueCount (me; Atnum : Integer) returns Integer;
65 ---Purpose : returns the Count of Value for an Attribute, given its No. :
66 -- it is read in the Definition.
67
68 AttributeList (me; Attribnum : Integer; Rownum : Integer)
69 returns Transient
70 -- returns the List of Values which correspond to an Attribute,
71 -- given its No. and the No. of the Row
72 -- Remark : for Form 0, Rownum must be given equal to 1.
73 -- the Transient returned is a HArray1 of appropriate Type
74 -- (OfInteger, OfReal, OfHAsciiString, OfIGESEntity) and Length
75 -- See methods AttributeAs... for accurate access
76 raises OutOfRange;
77 -- Error if Attribnum or RowNum OutofRange
78
79
80 AttributeAsInteger (me; AtNum, Rownum, ValNum : Integer) returns Integer
81 ---Purpose : Returns Attribute Value <AtNum, Rownum, rank ValNum> as an Integer
82 raises OutOfRange, NullObject;
83 ---Purpose : Error if Indices out of Range, or no Value defined, or not an Integer
84
85 AttributeAsReal (me; AtNum, Rownum, ValNum : Integer) returns Real
86 ---Purpose : Returns Attribute Value <AtNum, Rownum, rank ValNum> as a Real
87 raises OutOfRange, NullObject;
88 ---Purpose : Error if Indices out of Range, or no Value defined, or not a Real
89
90 AttributeAsString (me; AtNum, Rownum, ValNum : Integer)
91 returns HAsciiString from TCollection
92 ---Purpose : Returns Attribute Value <AtNum, Rownum, rank ValNum> as an Integer
93 raises OutOfRange, NullObject;
94 -- Error if Indices out of Range, or no Value defined, or not a String
95
96 AttributeAsEntity (me; AtNum, Rownum, ValNum : Integer) returns IGESEntity
97 ---Purpose : Returns Attribute Value <AtNum, Rownum, rank ValNum> as an Entity
98 raises OutOfRange, NullObject;
99 ---Purpose : Error if Indices out of Range, or no Value defined, or not an Entity
100
101 AttributeAsLogical (me; AtNum, Rownum, ValNum : Integer) returns Boolean
102 ---Purpose : Returns Attribute Value <AtNum, Rownum, rank ValNum> as a Boolean
103 raises OutOfRange, NullObject;
104 ---Purpose : Error if Indices out of Range, or no Value defined, or not a Logical
105
106fields
107
108--
109-- Class : IGESDefs_AttributeTable
110--
111-- Purpose : Declaration of variables specific to the definition
112-- of the Class AttributeTable.
113--
114-- Reminder : The attributes can be of type no value, integer, real, string,
115-- pointer or Boolean. Accordingly each list is stored as HArray1 of
116-- Integer, Real, HAsciiString, IGESEntity of appropriate Length
117--
118
119 theAttributes : HArray2OfTransient from TColStd;
120
121 -- if form number = 0 , only one Row
122 -- size = AVC(1) + AVC(2) + ... + AVC(NA)
123 -- where NA is Number of attributes obtained from AttributeDef
124 -- AVC(1), AVC(2),..., AVC(NA) is also obtained from the same
125 --
126 -- if form number = 1 , NbRows > 1 possible
127 -- size = NR * (AVC(1) + AVC(2) + ... + AVC(NA))
128 -- where NR is theNbRows
129 --
130 -- Ref : IGES specs for Attribute Table Definition Entity (Type 322)
131
132end AttributeTable;