Salome HOME
Axis feature in Construction plugin is created
[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   /// Creates a new part document if needed
38   CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
39
40   /// Request for initialization of data model of the feature: adding all attributes
41   CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
42
43   /// Construction result is allways recomuted on the fly
44   CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
45
46   /// Use plugin manager for features creation
47   ConstructionPlugin_Point();
48 };
49
50 #endif