1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include <GeomAlgoAPI_MakeShapeCustom.h>
23 //=================================================================================================
24 GeomAlgoAPI_MakeShapeCustom::GeomAlgoAPI_MakeShapeCustom()
27 //=================================================================================================
28 void GeomAlgoAPI_MakeShapeCustom::setResult(const std::shared_ptr<GeomAPI_Shape> theShape)
33 //=================================================================================================
34 bool GeomAlgoAPI_MakeShapeCustom::addModified(const std::shared_ptr<GeomAPI_Shape> theBase,
35 const std::shared_ptr<GeomAPI_Shape> theResult)
37 return myModified.add(theBase, theResult);
40 //=================================================================================================
41 bool GeomAlgoAPI_MakeShapeCustom::addGenerated(const std::shared_ptr<GeomAPI_Shape> theBase,
42 const std::shared_ptr<GeomAPI_Shape> theResult)
44 return myGenerated.add(theBase, theResult);
47 //=================================================================================================
48 bool GeomAlgoAPI_MakeShapeCustom::addDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
50 return myDeleted.bind(theShape, theShape);
53 //=================================================================================================
54 void GeomAlgoAPI_MakeShapeCustom::generated(const std::shared_ptr<GeomAPI_Shape> theShape,
55 ListOfShape& theHistory)
57 ListOfShape aGenerated;
58 if(myGenerated.find(theShape, aGenerated)) {
59 theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
63 //=================================================================================================
64 void GeomAlgoAPI_MakeShapeCustom::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
65 ListOfShape& theHistory)
67 ListOfShape aModified;
68 if(myModified.find(theShape, aModified)) {
69 theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
73 //=================================================================================================
74 bool GeomAlgoAPI_MakeShapeCustom::isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
76 return myDeleted.isBound(theShape);