0027067: Avoid use of virtual methods for implementation of destructors in legacy...
[occt.git] / src / QANewModTopOpe / QANewModTopOpe_Limitation.hxx
CommitLineData
42cf5bc1 1// Created on: 2001-05-03
2// Created by: Igor FEOKTISTOV
3// Copyright (c) 2001-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _QANewModTopOpe_Limitation_HeaderFile
17#define _QANewModTopOpe_Limitation_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_DefineAlloc.hxx>
21#include <Standard_Handle.hxx>
22
23#include <TopoDS_Shape.hxx>
24#include <QANewModTopOpe_CutPtr.hxx>
25#include <QANewModTopOpe_CommonPtr.hxx>
26#include <Standard_Boolean.hxx>
27#include <QANewModTopOpe_ModeOfLimitation.hxx>
28#include <BRepBuilderAPI_MakeShape.hxx>
29#include <TopTools_ListOfShape.hxx>
30class TopoDS_Shape;
31
32
33//! provides cutting shape by face or shell;
34class QANewModTopOpe_Limitation : public BRepBuilderAPI_MakeShape
35{
36public:
37
38 DEFINE_STANDARD_ALLOC
39
40
41 //! initializes and fills data structure for cutting and
42 //! makes cutting according to orientation theCutTool and
43 //! theMode.
44 //! if theCutTool is not face or shell does nothing.
45 Standard_EXPORT QANewModTopOpe_Limitation(const TopoDS_Shape& theObjectToCut, const TopoDS_Shape& theCutTool, const QANewModTopOpe_ModeOfLimitation theMode = QANewModTopOpe_Forward);
46
47 //! makes cutting according to orientation theCutTool
48 //! and current value of myMode. Does nothing if
49 //! result already exists.
50 Standard_EXPORT void Cut();
51
52 Standard_EXPORT void SetMode (const QANewModTopOpe_ModeOfLimitation theMode);
53
54 Standard_EXPORT QANewModTopOpe_ModeOfLimitation GetMode() const;
55
56 //! Returns the first shape.
57 Standard_EXPORT const TopoDS_Shape& Shape1() const;
58
59 //! Returns the second shape.
60 Standard_EXPORT const TopoDS_Shape& Shape2() const;
61
62 //! Returns the list of shapes modified from the shape
63 //! <S>.
64 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE;
65
66 //! Returns the list of shapes generated from the shape <S>.
67 //! For use in BRepNaming.
68 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
69
70 //! Returns true if there is at least one modified shape.
71 //! For use in BRepNaming.
72 Standard_EXPORT virtual Standard_Boolean HasModified() const;
73
74 //! Returns true if there is at least one generated shape.
75 //! For use in BRepNaming.
76 Standard_EXPORT virtual Standard_Boolean HasGenerated() const;
77
78 //! Returns true if there is at least one deleted shape.
79 //! For use in BRepNaming.
80 Standard_EXPORT virtual Standard_Boolean HasDeleted() const;
81
82 Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE;
83
e6f550da 84 Standard_EXPORT ~QANewModTopOpe_Limitation();
42cf5bc1 85
86private:
87
88
89
90 TopoDS_Shape myResultFwd;
91 TopoDS_Shape myResultRvs;
92 TopoDS_Shape myObjectToCut;
93 TopoDS_Shape myCutTool;
94 QANewModTopOpe_CutPtr myCut;
95 QANewModTopOpe_CommonPtr myCommon;
96 Standard_Boolean myFwdIsDone;
97 Standard_Boolean myRevIsDone;
98 QANewModTopOpe_ModeOfLimitation myMode;
99
100
101};
102
103
104
105
106
107
108
109#endif // _QANewModTopOpe_Limitation_HeaderFile