Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[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
11 #include <GeomAPI_Shape.h>
12
13 /**\class SketchPlugin_Feature
14  * \ingroup DataModel
15  * \brief Feature for creation of the new feature in PartSet. This is an abstract class to give
16  * an interface to create the sketch feature preview.
17  */
18 class SketchPlugin_Feature: public ModelAPI_Feature
19 {
20 public:
21   /// Returns the sketch preview
22   /// \return the built preview
23   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview() = 0;
24
25 protected:
26   /// Set the shape to the internal preview field
27   /// \param theShape a preview shape
28   void setPreview(const boost::shared_ptr<GeomAPI_Shape>& theShape); ///< the preview shape
29   /// Return the shape from the internal preview field
30   /// \return theShape a preview shape
31   const boost::shared_ptr<GeomAPI_Shape>& getPreview() const;
32
33 private:
34   boost::shared_ptr<GeomAPI_Shape> myPreview; ///< the preview shape
35 };
36
37 #endif