0027067: Avoid use of virtual methods for implementation of destructors in legacy...
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_MakeShape.hxx
1 // Created on: 1993-07-21
2 // Created by: Remi LEQUETTE
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 _BRepBuilderAPI_MakeShape_HeaderFile
18 #define _BRepBuilderAPI_MakeShape_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TopoDS_Shape.hxx>
25 #include <TopTools_ListOfShape.hxx>
26 #include <BRepBuilderAPI_Command.hxx>
27 #include <Standard_Boolean.hxx>
28 class StdFail_NotDone;
29 class TopoDS_Shape;
30
31
32 //! This    is  the  root     class for     all  shape
33 //! constructions.  It stores the result.
34 //!
35 //! It  provides deferred methods to trace the history
36 //! of sub-shapes.
37 class BRepBuilderAPI_MakeShape  : public BRepBuilderAPI_Command
38 {
39 public:
40
41   DEFINE_STANDARD_ALLOC
42
43   //! This is  called by  Shape().  It does  nothing but
44   //! may be redefined.
45   Standard_EXPORT virtual void Build();
46   
47   //! Returns a shape built by the shape construction algorithm.
48   //! Raises exception StdFail_NotDone if the shape was not built.
49   Standard_EXPORT virtual const TopoDS_Shape& Shape();
50   Standard_EXPORT operator TopoDS_Shape();
51   
52   //! Returns the  list   of shapes generated   from the
53   //! shape <S>.
54   Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
55   
56   //! Returns the list  of shapes modified from the shape
57   //! <S>.
58   Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S);
59   
60   //! Returns true if the shape S has been deleted.
61   Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S);
62
63
64
65
66 protected:
67
68   
69   Standard_EXPORT BRepBuilderAPI_MakeShape();
70
71
72   TopoDS_Shape myShape;
73   TopTools_ListOfShape myGenerated;
74
75
76 private:
77
78
79
80
81
82 };
83
84
85
86
87
88
89
90 #endif // _BRepBuilderAPI_MakeShape_HeaderFile