42cf5bc1 |
1 | // Created on: 1993-01-09 |
2 | // Created by: CKY / Contract Toubro-Larsen ( SIVA ) |
3 | // Copyright (c) 1993-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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 |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _IGESSolid_BooleanTree_HeaderFile |
18 | #define _IGESSolid_BooleanTree_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <IGESData_HArray1OfIGESEntity.hxx> |
24 | #include <TColStd_HArray1OfInteger.hxx> |
25 | #include <IGESData_IGESEntity.hxx> |
26 | #include <Standard_Integer.hxx> |
27 | #include <Standard_Boolean.hxx> |
28 | class Standard_OutOfRange; |
29 | class IGESData_IGESEntity; |
30 | |
31 | |
32 | class IGESSolid_BooleanTree; |
33 | DEFINE_STANDARD_HANDLE(IGESSolid_BooleanTree, IGESData_IGESEntity) |
34 | |
35 | //! defines BooleanTree, Type <180> Form Number <0> |
36 | //! in package IGESSolid |
37 | //! The Boolean tree describes a binary tree structure |
38 | //! composed of regularized Boolean operations and operands, |
39 | //! in post-order notation. |
40 | class IGESSolid_BooleanTree : public IGESData_IGESEntity |
41 | { |
42 | |
43 | public: |
44 | |
45 | |
46 | Standard_EXPORT IGESSolid_BooleanTree(); |
47 | |
48 | //! This method is used to set the fields of the class |
49 | //! BooleanTree |
50 | //! - operands : Array containing pointer to DE of operands |
51 | //! - operations : Array containing integer type for operations |
52 | Standard_EXPORT void Init (const Handle(IGESData_HArray1OfIGESEntity)& operands, const Handle(TColStd_HArray1OfInteger)& operations); |
53 | |
54 | //! returns the length of the post-order list |
55 | Standard_EXPORT Standard_Integer Length() const; |
56 | |
57 | //! returns True if Index'th value in the post-order list is an Operand; |
58 | //! else returns False if it is an Integer Operations |
59 | //! raises exception if Index < 1 or Index > Length() |
60 | Standard_EXPORT Standard_Boolean IsOperand (const Standard_Integer Index) const; |
61 | |
62 | //! returns the Index'th value in the post-order list only if it is |
63 | //! an operand else returns NULL |
64 | //! raises exception if Index < 1 or Index > Length() |
65 | Standard_EXPORT Handle(IGESData_IGESEntity) Operand (const Standard_Integer Index) const; |
66 | |
67 | //! returns the Index'th value in the post-order list only if it is |
68 | //! an operation else returns 0 |
69 | //! raises exception if Index < 1 or Index > Length() |
70 | Standard_EXPORT Standard_Integer Operation (const Standard_Integer Index) const; |
71 | |
72 | |
73 | |
74 | |
92efcf78 |
75 | DEFINE_STANDARD_RTTIEXT(IGESSolid_BooleanTree,IGESData_IGESEntity) |
42cf5bc1 |
76 | |
77 | protected: |
78 | |
79 | |
80 | |
81 | |
82 | private: |
83 | |
84 | |
85 | Handle(IGESData_HArray1OfIGESEntity) theOperands; |
86 | Handle(TColStd_HArray1OfInteger) theOperations; |
87 | |
88 | |
89 | }; |
90 | |
91 | |
92 | |
93 | |
94 | |
95 | |
96 | |
97 | #endif // _IGESSolid_BooleanTree_HeaderFile |