Salome HOME
Partition naming for infinite planes
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShapeCustom.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_MakeShapeCustom.h
4 // Created:     4 September 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAlgoAPI_MakeShapeCustom_H_
8 #define GeomAlgoAPI_MakeShapeCustom_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_DataMapOfShapeMapOfShapes.h>
13 #include <GeomAPI_DataMapOfShapeShape.h>
14
15 /** \class GeomAlgoAPI_MakeShapeCustom
16  *  \ingroup DataAlgo
17  *  \brief Interface to the root class of all topological shapes constructions
18  */
19 class GeomAlgoAPI_MakeShapeCustom : public GeomAlgoAPI_MakeShape
20 {
21 public:
22   /// Default constructor
23   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShapeCustom();
24
25   /// Sets result shape.
26   GEOMALGOAPI_EXPORT void setResult(const std::shared_ptr<GeomAPI_Shape> theShape);
27
28   /// Adds modified shape.
29   GEOMALGOAPI_EXPORT bool addModified(const std::shared_ptr<GeomAPI_Shape> theBase,
30                                       const std::shared_ptr<GeomAPI_Shape> theResult);
31
32   /// Adds generated shape.
33   GEOMALGOAPI_EXPORT bool addGenerated(const std::shared_ptr<GeomAPI_Shape> theBase,
34                                        const std::shared_ptr<GeomAPI_Shape> theResult);
35
36   /// Adds deleted shape.
37   GEOMALGOAPI_EXPORT bool addDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
38
39   /// \return a shape built by the shape construction algorithms
40   GEOMALGOAPI_EXPORT virtual const std::shared_ptr<GeomAPI_Shape> shape() const;
41
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);
45
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);
49
50   /// \return whether the shape is deleted
51   GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
52
53 private:
54   std::shared_ptr<GeomAPI_Shape>    myShape;
55   GeomAPI_DataMapOfShapeMapOfShapes myGenerated;
56   GeomAPI_DataMapOfShapeMapOfShapes myModified;
57   GeomAPI_DataMapOfShapeShape       myDeleted;
58 };
59
60 #endif