b311480e |
1 | -- Created on: 1993-01-13 |
2 | -- Created by: CKY / Contract Toubro-Larsen ( Deepak PRABHU ) |
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 AssociativityDef from IGESDefs inherits IGESEntity |
18 | |
19 | ---Purpose: defines IGES Associativity Definition Entity, Type <302> |
20 | -- Form <5001 - 9999> in package IGESDefs. |
21 | -- This class permits the preprocessor to define an |
22 | -- associativity schema. i.e., by using it preprocessor |
23 | -- defines the type of relationship. |
24 | |
25 | uses |
26 | |
27 | HArray1OfInteger from TColStd, |
28 | HArray1OfHArray1OfInteger from IGESBasic |
29 | |
30 | raises DimensionMismatch, OutOfRange |
31 | |
32 | is |
33 | |
6e33d3ce |
34 | Create returns AssociativityDef; |
7fd59977 |
35 | |
36 | -- Specific methods for the entity |
37 | |
38 | Init (me : mutable; |
39 | requirements : HArray1OfInteger; |
40 | orders : HArray1OfInteger; |
41 | numItems : HArray1OfInteger; |
42 | items : HArray1OfHArray1OfInteger) |
43 | raises DimensionMismatch; |
44 | ---Purpose : This method is used to set the fields of the class |
45 | -- AssociativityDef |
46 | -- - requirements : Back Pointers requirements |
47 | -- - orders : Class Orders |
48 | -- - numItems : Number of Items per Class |
49 | -- - items : Items in each class |
50 | -- raises exception if lengths of the arrays are not the same. |
51 | |
52 | SetFormNumber (me : mutable; form : Integer); |
53 | -- Sets Form Number to a given value (free over 5000) |
54 | |
55 | |
56 | NbClassDefs(me) returns Integer; |
57 | ---Purpose : returns the Number of class definitions |
58 | |
59 | IsBackPointerReq(me ; ClassNum : Integer) returns Boolean |
60 | raises OutOfRange; |
61 | ---Purpose : returns 1 if the theBackPointerReqs(ClassNum) = 1 |
62 | -- returns 0 if the theBackPointerReqs(ClassNum) = 2 |
63 | -- raises exception if ClassNum <= 0 or ClassNum > NbClassDefs() |
64 | |
65 | BackPointerReq(me ; ClassNum : Integer) returns Integer |
66 | raises OutOfRange; |
67 | ---Purpose : returns 1 or 2 |
68 | -- raises exception if ClassNum <= 0 or ClassNum > NbClassDefs() |
69 | |
70 | IsOrdered(me ; ClassNum : Integer) returns Boolean |
71 | raises OutOfRange; |
72 | ---Purpose : returns 1 if theClassOrders(ClassNum) = 1 (ordered class) |
73 | -- returns 0 if theClassOrders(ClassNum) = 2 (unordered class) |
74 | -- raises exception if ClassNum <= 0 or ClassNum > NbClassDefs() |
75 | |
76 | ClassOrder(me ; ClassNum : Integer) returns Integer |
77 | raises OutOfRange; |
78 | ---Purpose : returns 1 or 2 |
79 | -- raises exception if ClassNum <= 0 or ClassNum > NbClassDefs() |
80 | |
81 | NbItemsPerClass(me ; ClassNum : Integer) returns Integer |
82 | raises OutOfRange; |
83 | ---Purpose : returns no. of items per class entry |
84 | -- raises exception if ClassNum <= 0 or ClassNum > NbClassDefs() |
85 | |
86 | Item(me ; ClassNum : Integer; ItemNum : Integer) returns Integer |
87 | raises OutOfRange; |
88 | ---Purpose : returns ItemNum'th Item of ClassNum'th Class |
89 | -- raises exception if |
90 | -- ClassNum <= 0 or ClassNum > NbClassDefs() |
91 | -- ItemNum <= 0 or ItemNum > NbItemsPerClass(ClassNum) |
92 | |
93 | fields |
94 | |
95 | -- |
96 | -- Class : IGESDefs_AssociativityDef |
97 | -- |
98 | -- Purpose : Declaration of variables specific to AssociativityDef |
99 | -- |
100 | -- Reminder : An AssociativityDef Entity permits the preprocessor |
101 | -- to define an associativity schema. The definition |
102 | -- includes associativity form, the no. of classes, |
103 | -- the number and type of items in each class, and |
104 | -- whether back pointers are required. |
105 | |
106 | theBackPointerReqs : HArray1OfInteger; |
107 | theClassOrders : HArray1OfInteger; |
108 | theNbItemsPerClass : HArray1OfInteger; |
109 | theItems : HArray1OfHArray1OfInteger; |
110 | |
111 | end AssociativityDef; |