1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_MakeShapeCustom.h
4 // Created: 4 September 2015
5 // Author: Dmitry Bobylev
7 #ifndef GeomAlgoAPI_MakeShapeCustom_H_
8 #define GeomAlgoAPI_MakeShapeCustom_H_
10 #include <GeomAlgoAPI_MakeShape.h>
12 #include <GeomAPI_DataMapOfShapeMapOfShapes.h>
13 #include <GeomAPI_DataMapOfShapeShape.h>
15 /** \class GeomAlgoAPI_MakeShapeCustom
17 * \brief Interface to the root class of all topological shapes constructions
19 class GeomAlgoAPI_MakeShapeCustom : public GeomAlgoAPI_MakeShape
22 /// Default constructor
23 GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShapeCustom();
25 /// Sets result shape.
26 GEOMALGOAPI_EXPORT void setResult(const std::shared_ptr<GeomAPI_Shape> theShape);
28 /// Adds modified shape.
29 GEOMALGOAPI_EXPORT bool addModified(const std::shared_ptr<GeomAPI_Shape> theBase,
30 const std::shared_ptr<GeomAPI_Shape> theResult);
32 /// Adds generated shape.
33 GEOMALGOAPI_EXPORT bool addGenerated(const std::shared_ptr<GeomAPI_Shape> theBase,
34 const std::shared_ptr<GeomAPI_Shape> theResult);
36 /// Adds deleted shape.
37 GEOMALGOAPI_EXPORT bool addDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
39 /// \return a shape built by the shape construction algorithms
40 GEOMALGOAPI_EXPORT virtual const std::shared_ptr<GeomAPI_Shape> shape() const;
42 /// \return the list of shapes generated from the shape theShape
43 GEOMALGOAPI_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape> theShape,
44 ListOfShape& theHistory);
46 /// \return the list of shapes modified from the shape theShape
47 GEOMALGOAPI_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape> theShape,
48 ListOfShape& theHistory);
50 /// \return whether the shape is deleted
51 GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
54 std::shared_ptr<GeomAPI_Shape> myShape;
55 GeomAPI_DataMapOfShapeMapOfShapes myGenerated;
56 GeomAPI_DataMapOfShapeMapOfShapes myModified;
57 GeomAPI_DataMapOfShapeShape myDeleted;