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