Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShape.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_MakeShape.h
4 // Created:     17 Oct 2014
5 // Author:      Sergey ZARITCHNY
6 #ifndef GeomAlgoAPI_MakeShape_H_
7 #define GeomAlgoAPI_MakeShape_H_
8
9 #include <GeomAPI_Shape.h>
10 #include <memory>
11 #include <GeomAlgoAPI.h>
12
13 /**\class GeomAlgoAPI_MakeShape
14  * \ingroup DataAlgo
15  * \brief Interface to the root class of all topological shapes constructions
16  */
17 class GeomAlgoAPI_MakeShape : public GeomAPI_Interface
18 {
19 public:
20   /// Constructor
21   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape();
22   /// Constructor by the already stored builder in the interface
23   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder);
24
25   /// Returns a shape built by the shape construction algorithm
26   GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>  shape() const;
27
28   /// Returns the list of shapes generated from the shape \a theShape
29   GEOMALGOAPI_EXPORT virtual void generated(
30     const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
31
32   /// Returns the  list of shapes modified from the shape \a theShape
33   GEOMALGOAPI_EXPORT virtual void modified(
34     const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
35
36   /// Returns whether the shape is an edge
37   GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
38   /// Initializes the algorithm by the builder stored in the interface
39   GEOMALGOAPI_EXPORT void init(void* theMkShape);
40
41   protected:
42   /// The resulting shape
43         std::shared_ptr<GeomAPI_Shape> myShape;
44 };
45
46 #endif