Salome HOME
It replaces using of direct value "Sketch" to SKETCH_KIND, which is defined in the...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Point.h
1 // File:    SketchPlugin_Point.h
2 // Created: 07 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_Point_HeaderFile
6 #define SketchPlugin_Point_HeaderFile
7
8 #include "SketchPlugin.h"
9 #include <SketchPlugin_Sketch.h>
10 #include "SketchPlugin_Feature.h"
11 #include <list>
12
13 /// Coordinates of the point
14 const std::string POINT_ATTR_COORD("PointCoordindates");
15
16 /**\class SketchPlugin_Point
17  * \ingroup DataModel
18  * \brief Feature for creation of a new point.
19  */
20 class SketchPlugin_Point: public SketchPlugin_Feature
21 {
22 public:
23   /// Returns the kind of a feature
24   SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
25   {static std::string MY_KIND = "SketchPoint"; return MY_KIND;}
26
27   /// Returns to which group in the document must be added feature
28   SKETCHPLUGIN_EXPORT virtual const std::string& getGroup() 
29   {static std::string MY_GROUP = SKETCH_KIND; return MY_GROUP;}
30
31   /// Creates a new part document if needed
32   SKETCHPLUGIN_EXPORT virtual void execute();
33
34   /// Request for initialization of data model of the feature: adding all attributes
35   SKETCHPLUGIN_EXPORT virtual void initAttributes();
36
37   /// Returns the sketch preview
38   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
39
40   /// Adds sub-feature of the higher level feature (sub-element of the sketch)
41   /// \param theFeature sub-feature
42   SKETCHPLUGIN_EXPORT virtual const void addSub(
43     const boost::shared_ptr<ModelAPI_Feature>& theFeature) {};
44
45   /// Use plugin manager for features creation
46   SketchPlugin_Point();
47 };
48
49 #endif