0027067: Avoid use of virtual methods for implementation of destructors in legacy...
[occt.git] / src / BRepLib / BRepLib_MakeShape.cxx
CommitLineData
b311480e 1// Created on: 1993-07-23
2// Created by: Remi LEQUETTE
3// Copyright (c) 1993-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
42cf5bc1 17
18#include <BRepLib_MakeShape.hxx>
19#include <StdFail_NotDone.hxx>
20#include <TopoDS_Edge.hxx>
21#include <TopoDS_Face.hxx>
22#include <TopoDS_Shape.hxx>
7fd59977 23
24//=======================================================================
25//function : BRepLib_MakeShape
26//purpose :
27//=======================================================================
7fd59977 28BRepLib_MakeShape::BRepLib_MakeShape()
29{
30}
31
32//=======================================================================
33//function : Build
34//purpose :
35//=======================================================================
36
37void BRepLib_MakeShape::Build()
38{
39}
40
41//=======================================================================
42//function : Shape
43//purpose :
44//=======================================================================
45
ecac41a9 46const TopoDS_Shape& BRepLib_MakeShape::Shape()
7fd59977 47{
48 if (!IsDone()) {
49 // the following is const cast away
50 ((BRepLib_MakeShape*) (void*) this)->Build();
51 Check();
52 }
53 return myShape;
54}
55
56
57//=======================================================================
58//function : operator
59//purpose :
60//=======================================================================
61
ecac41a9 62BRepLib_MakeShape::operator TopoDS_Shape()
7fd59977 63{
64 return Shape();
65}
66
67
68
69//=======================================================================
70//function : HasDescendants
71//purpose :
72//=======================================================================
73
74Standard_Boolean BRepLib_MakeShape::HasDescendants(const TopoDS_Face&)const
75{
76 return (Standard_True);
77}
78
79
80
81//=======================================================================
82//function : FaceStatus
83//purpose :
84//=======================================================================
85
86BRepLib_ShapeModification BRepLib_MakeShape::FaceStatus
87 (const TopoDS_Face&) const
88{
89 BRepLib_ShapeModification myStatus = BRepLib_Trimmed;
90 return myStatus;
91}
92
93
94//=======================================================================
95//function : GeneratedFaces
96//purpose :
97//=======================================================================
98
99const TopTools_ListOfShape& BRepLib_MakeShape::DescendantFaces
100 (const TopoDS_Face&)
101{
102 return myGenFaces;
103}
104
105//=======================================================================
106//function : NbSurfaces
107//purpose :
108//=======================================================================
109
110Standard_Integer BRepLib_MakeShape::NbSurfaces() const
111{
112 return (0);
113}
114
115//=======================================================================
116//function : NewFaces
117//purpose :
118//=======================================================================
119
120const TopTools_ListOfShape& BRepLib_MakeShape::NewFaces(const Standard_Integer)
121{
122 return myNewFaces;
123}
124
125
126//=======================================================================
127//function : FacesFromEdges
128//purpose :
129//=======================================================================
130
131const TopTools_ListOfShape& BRepLib_MakeShape::FacesFromEdges
132 (const TopoDS_Edge&)
133{
134 return myEdgFaces;
135}