Salome HOME
b0504698d93c7f9017edc73ad1ab98b925c45a9f
[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 /**\class ConstructionPlugin_Point
14  * \ingroup Plugins
15  * \brief Feature for creation of the new part in PartSet.
16  */
17 class ConstructionPlugin_Point : public ModelAPI_Feature
18 {
19  public:
20   /// Returns the kind of a feature
21   CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind();
22
23   inline static const std::string& ID()
24   {
25     static const std::string CONSTRUCTION_POINT_KIND("Point");
26     return CONSTRUCTION_POINT_KIND;
27   }
28
29   /// attribute name for X coordinate
30   inline static const std::string& X()
31   {
32     static const std::string POINT_ATTR_X("x");
33     return POINT_ATTR_X;
34   }
35   /// attribute name for Y coordinate
36   inline static const std::string& Y()
37   {
38     static const std::string POINT_ATTR_Y("y");
39     return POINT_ATTR_Y;
40   }
41   /// attribute name for Z coordinate
42   inline static const std::string& Z()
43   {
44     static const std::string POINT_ATTR_Z("z");
45     return POINT_ATTR_Z;
46   }
47
48   /// Creates a new part document if needed
49   CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
50
51   /// Request for initialization of data model of the feature: adding all attributes
52   CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
53
54   /// Construction result is allways recomuted on the fly
55   CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
56
57   /// Use plugin manager for features creation
58   ConstructionPlugin_Point();
59 };
60
61 #endif