42cf5bc1 |
1 | // Created by: Peter KURNEV |
2 | // Copyright (c) 2010-2014 OPEN CASCADE SAS |
3 | // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE |
4 | // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, |
5 | // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS |
6 | // |
7 | // This file is part of Open CASCADE Technology software library. |
8 | // |
9 | // This library is free software; you can redistribute it and/or modify it under |
10 | // the terms of the GNU Lesser General Public License version 2.1 as published |
11 | // by the Free Software Foundation, with special exception defined in the file |
12 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
13 | // distribution for complete text of the license and disclaimer of any warranty. |
14 | // |
15 | // Alternatively, this file may be used under the terms of Open CASCADE |
16 | // commercial license or contractual agreement. |
17 | |
18 | #ifndef _BOPAlgo_BuilderShape_HeaderFile |
19 | #define _BOPAlgo_BuilderShape_HeaderFile |
20 | |
21 | #include <Standard.hxx> |
22 | #include <Standard_DefineAlloc.hxx> |
23 | #include <Standard_Handle.hxx> |
24 | |
25 | #include <TopoDS_Shape.hxx> |
26 | #include <TopTools_ListOfShape.hxx> |
27 | #include <BOPCol_MapOfShape.hxx> |
28 | #include <Standard_Boolean.hxx> |
29 | #include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx> |
30 | #include <BOPAlgo_Algo.hxx> |
31 | #include <BOPCol_BaseAllocator.hxx> |
32 | class TopoDS_Shape; |
33 | |
34 | |
35 | //! Root class for algorithms that has shape as result |
36 | class BOPAlgo_BuilderShape : public BOPAlgo_Algo |
37 | { |
38 | public: |
39 | |
40 | DEFINE_STANDARD_ALLOC |
41 | |
42 | |
43 | //! Returns the result of algorithm |
44 | Standard_EXPORT const TopoDS_Shape& Shape() const; |
45 | |
46 | //! Returns the list of shapes generated from the |
47 | //! shape theS. |
48 | Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& theS); |
49 | |
50 | //! Returns the list of shapes modified from the |
51 | //! shape theS. |
52 | Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& theS); |
53 | |
54 | //! Returns true if the shape theS has been deleted. |
55 | Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& theS); |
56 | |
57 | //! Returns true if the at least one shape(or subshape) |
58 | //! of arguments has been deleted. |
59 | Standard_EXPORT Standard_Boolean HasDeleted() const; |
60 | |
61 | //! Returns true if the at least one shape(or subshape) |
62 | //! of arguments has generated shapes. |
63 | Standard_EXPORT Standard_Boolean HasGenerated() const; |
64 | |
65 | //! Returns true if the at least one shape(or subshape) |
66 | //! of arguments has modified shapes. |
67 | Standard_EXPORT Standard_Boolean HasModified() const; |
68 | |
69 | Standard_EXPORT const BOPCol_IndexedDataMapOfShapeListOfShape& ImagesResult() const; |
70 | |
71 | |
72 | |
73 | |
74 | protected: |
75 | |
76 | |
77 | Standard_EXPORT BOPAlgo_BuilderShape(); |
78 | Standard_EXPORT virtual ~BOPAlgo_BuilderShape(); |
79 | |
80 | Standard_EXPORT BOPAlgo_BuilderShape(const BOPCol_BaseAllocator& theAllocator); |
81 | |
82 | //! Prepare information for history support |
83 | Standard_EXPORT virtual void PrepareHistory(); |
84 | |
85 | |
86 | TopoDS_Shape myShape; |
87 | TopTools_ListOfShape myHistShapes; |
88 | BOPCol_MapOfShape myMapShape; |
89 | Standard_Boolean myHasDeleted; |
90 | Standard_Boolean myHasGenerated; |
91 | Standard_Boolean myHasModified; |
92 | BOPCol_IndexedDataMapOfShapeListOfShape myImagesResult; |
93 | Standard_Boolean myFlagHistory; |
94 | |
95 | |
96 | private: |
97 | |
98 | |
99 | |
100 | |
101 | |
102 | }; |
103 | |
104 | |
105 | |
106 | |
107 | |
108 | |
109 | |
110 | #endif // _BOPAlgo_BuilderShape_HeaderFile |