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