Salome HOME
26efd6e054c4fa6284ba73e02861afd75f7ad2fe
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Feature.h
1 // File:        SketchPlugin_Feature.h
2 // Created:     27 Mar 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef SketchPlugin_Feature_HeaderFile
6 #define SketchPlugin_Feature_HeaderFile
7
8 #include "SketchPlugin.h"
9 #include <ModelAPI_Feature.h>
10 #include <GeomAPI_Shape.h>
11
12 class SketchPlugin_Sketch;
13
14 /**\class SketchPlugin_Feature
15  * \ingroup DataModel
16  * \brief Feature for creation of the new feature in PartSet. This is an abstract class to give
17  * an interface to create the sketch feature preview.
18  */
19 class SketchPlugin_Feature: public ModelAPI_Feature
20 {
21 public:
22   /// Returns the sketch preview
23   /// \param theSketch the owner of this feature
24   /// \return the built preview
25   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview() = 0;
26
27 protected:
28   /// Set the shape to the internal preview field
29   /// \param theShape a preview shape
30   void setPreview(const boost::shared_ptr<GeomAPI_Shape>& theShape); ///< the preview shape
31   /// Return the shape from the internal preview field
32   /// \return theShape a preview shape
33   const boost::shared_ptr<GeomAPI_Shape>& getPreview() const;
34
35 private:
36   boost::shared_ptr<GeomAPI_Shape> myPreview; ///< the preview shape
37 };
38
39 #endif