Salome HOME
f028855edb4def81d963382b03a9ce57de7a03ef
[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 <GeomAlgoAPI.h>
11
12 #include <list>
13 #include <memory>
14
15 /**\class GeomAlgoAPI_MakeShape
16  * \ingroup DataAlgo
17  * \brief Interface to the root class of all topological shapes constructions
18  */
19 class GeomAlgoAPI_MakeShape : public GeomAPI_Interface
20 {
21 public:
22   /// Constructor
23   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape();
24   /// Constructor by the already stored builder in the interface
25   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder);
26
27   /// Constructor by the builder and wire. Used for pipe builder.
28   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, const std::shared_ptr<GeomAPI_Shape> theWire);
29
30   /// Returns a shape built by the shape construction algorithm
31   GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>  shape() const;
32
33   /// Returns the list of shapes generated from the shape \a theShape
34   GEOMALGOAPI_EXPORT virtual void generated(
35     const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
36
37   /// Returns the  list of shapes modified from the shape \a theShape
38   GEOMALGOAPI_EXPORT virtual void modified(
39     const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
40
41   /// Returns whether the shape is an edge
42   GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
43
44   protected:
45   /// The resulting shape
46   std::shared_ptr<GeomAPI_Shape> myShape;
47   std::shared_ptr<GeomAPI_Shape> myWire;
48 };
49
50 typedef std::list<std::shared_ptr<GeomAlgoAPI_MakeShape> > ListOfMakeShape;
51
52 #endif