Salome HOME
4e62d79ae32ba190e60128af6c0012975173c48e
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Point.h
1 // File:        ConstructionPlugin_Point.h
2 // Created:     3 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ConstructionPlugin_Point_H_
6 #define ConstructionPlugin_Point_H_
7
8 #include "ConstructionPlugin.h"
9 #include <ModelAPI_Feature.h>
10
11 /// Point kind
12 const std::string CONSTRUCTION_POINT_KIND("Point");
13
14 /// attribute name for X coordinate
15 const std::string POINT_ATTR_X = "x";
16 /// attribute name for Y coordinate
17 const std::string POINT_ATTR_Y = "y";
18 /// attribute name for Z coordinate
19 const std::string POINT_ATTR_Z = "z";
20
21 /**\class ConstructionPlugin_Point
22  * \ingroup DataModel
23  * \brief Feature for creation of the new part in PartSet.
24  */
25 class ConstructionPlugin_Point : public ModelAPI_Feature
26 {
27  public:
28   /// Returns the kind of a feature
29   CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind()
30   {
31     static std::string MY_KIND = CONSTRUCTION_POINT_KIND;
32     return MY_KIND;
33   }
34
35   /// Returns to which group in the document must be added feature
36   CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getGroup()
37   {
38     static std::string MY_GROUP = "Construction";
39     return MY_GROUP;
40   }
41
42   /// Creates a new part document if needed
43   CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
44
45   /// Request for initialization of data model of the feature: adding all attributes
46   CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
47
48   /// Construction result is allways recomuted on the fly
49   CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
50
51   /// Use plugin manager for features creation
52   ConstructionPlugin_Point();
53 };
54
55 #endif