Salome HOME
4cceee37f4b7e1fca07f95f199119c773b0411d3
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Sketch.h
1 // File:        SketchPlugin_Sketch.h
2 // Created:     27 Mar 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef SketchPlugin_Sketch_HeaderFile
6 #define SketchPlugin_Sketch_HeaderFile
7
8 #include "SketchPlugin.h"
9 #include <SketchPlugin_Feature.h>
10
11 /// part reference attribute
12 const std::string PART_ATTR_DOC_REF = "SketchDocument";
13
14 /**\class SketchPlugin_Sketch
15  * \ingroup DataModel
16  * \brief Feature for creation of the new part in PartSet.
17  */
18 class SketchPlugin_Sketch: public SketchPlugin_Feature
19 {
20 public:
21   /// Returns the kind of a feature
22  SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
23   {static std::string MY_KIND = "Sketch"; return MY_KIND;}
24
25   /// Returns to which group in the document must be added feature
26  SKETCHPLUGIN_EXPORT virtual const std::string& getGroup() 
27   {static std::string MY_GROUP = "Construction"; return MY_GROUP;}
28
29   /// Creates a new part document if needed
30  SKETCHPLUGIN_EXPORT virtual void execute();
31
32   /// Request for initialization of data model of the feature: adding all attributes
33  SKETCHPLUGIN_EXPORT virtual void initAttributes();
34
35   /// Returns the sketch preview
36   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
37
38   /// Use plugin manager for features creation
39   SketchPlugin_Sketch();
40 };
41
42 #endif