blob: 059f201a737068052736eae892573d762378d39a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
--
-- File : BooleanTree.cdl
-- Created : Sat 9 Jan 1993
-- Author : CKY / Contract Toubro-Larsen ( SIVA )
--
---Copyright : MATRA-DATAVISION 1993
--
class BooleanTree from IGESSolid inherits IGESEntity
---Purpose: defines BooleanTree, Type <180> Form Number <0>
-- in package IGESSolid
-- The Boolean tree describes a binary tree structure
-- composed of regularized Boolean operations and operands,
-- in post-order notation.
uses
HArray1OfInteger from TColStd,
HArray1OfIGESEntity from IGESData
raises OutOfRange
is
Create returns mutable BooleanTree;
-- Specific Methods pertaining to the class
Init (me : mutable;
operands : HArray1OfIGESEntity;
operations : HArray1OfInteger);
---Purpose : This method is used to set the fields of the class
-- BooleanTree
-- - operands : Array containing pointer to DE of operands
-- - operations : Array containing integer type for operations
Length (me) returns Integer;
---Purpose : returns the length of the post-order list
IsOperand (me; Index: Integer) returns Boolean
raises OutOfRange;
---Purpose : returns True if Index'th value in the post-order list is an Operand;
-- else returns False if it is an Integer Operations
-- raises exception if Index < 1 or Index > Length()
Operand (me; Index : Integer) returns IGESEntity
raises OutOfRange;
---Purpose : returns the Index'th value in the post-order list only if it is
-- an operand else returns NULL
-- raises exception if Index < 1 or Index > Length()
Operation (me; Index : Integer) returns Integer
raises OutOfRange;
---Purpose : returns the Index'th value in the post-order list only if it is
-- an operation else returns 0
-- raises exception if Index < 1 or Index > Length()
fields
--
-- Class : IGESSolid_BooleanTree
--
-- Purpose : Declaration of variables specific to the definition
-- of the Class BooleanTree.
--
-- Reminder : A BooleanTree instance is defined by :
-- - a list having operation codes (integers) or pointers to
-- - operands. A positive value in the data entry implies an
-- - operation code; a negative value implies the absolute value
-- - is to be taken as a pointer to an operand.
theOperands : HArray1OfIGESEntity;
theOperations : HArray1OfInteger;
end BooleanTree;
|