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