0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / BOPAlgo / BOPAlgo_BuilderShape.hxx
CommitLineData
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>
32class TopoDS_Shape;
33
34
33ba8565 35//! Root class for algorithms that has shape as result.<br>
36//! The class provides the History mechanism, which allows
37//! tracking the modification of the input shapes during
38//! the operation.
42cf5bc1 39class BOPAlgo_BuilderShape : public BOPAlgo_Algo
40{
41public:
42
43 DEFINE_STANDARD_ALLOC
44
45
46 //! Returns the result of algorithm
47 Standard_EXPORT const TopoDS_Shape& Shape() const;
48
49 //! Returns the list of shapes generated from the
50 //! shape theS.
51 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& theS);
52
53 //! Returns the list of shapes modified from the
54 //! shape theS.
55 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& theS);
56
57 //! Returns true if the shape theS has been deleted.
58 Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& theS);
59
60 //! Returns true if the at least one shape(or subshape)
61 //! of arguments has been deleted.
62 Standard_EXPORT Standard_Boolean HasDeleted() const;
63
64 //! Returns true if the at least one shape(or subshape)
65 //! of arguments has generated shapes.
66 Standard_EXPORT Standard_Boolean HasGenerated() const;
67
68 //! Returns true if the at least one shape(or subshape)
69 //! of arguments has modified shapes.
70 Standard_EXPORT Standard_Boolean HasModified() const;
71
72 Standard_EXPORT const BOPCol_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
73
74
75
76
77protected:
78
79
80 Standard_EXPORT BOPAlgo_BuilderShape();
81Standard_EXPORT virtual ~BOPAlgo_BuilderShape();
82
83 Standard_EXPORT BOPAlgo_BuilderShape(const BOPCol_BaseAllocator& theAllocator);
84
85 //! Prepare information for history support
86 Standard_EXPORT virtual void PrepareHistory();
87
88
89 TopoDS_Shape myShape;
90 TopTools_ListOfShape myHistShapes;
91 BOPCol_MapOfShape myMapShape;
92 Standard_Boolean myHasDeleted;
93 Standard_Boolean myHasGenerated;
94 Standard_Boolean myHasModified;
95 BOPCol_IndexedDataMapOfShapeListOfShape myImagesResult;
96 Standard_Boolean myFlagHistory;
97
98
99private:
100
101
102
103
104
105};
106
107
108
109
110
111
112
113#endif // _BOPAlgo_BuilderShape_HeaderFile