Salome HOME
Fix regression in unit tests
[modules/shaper.git] / src / SketchShapePlugin / SketchShapePlugin_Feature.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        SketchShapePlugin_Feature.h
4 // Created:     25 Nov 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef SKETCHSHAPEPLUGIN_FEATURE_H_
8 #define SKETCHSHAPEPLUGIN_FEATURE_H_
9
10 #include "SketchShapePlugin.h"
11
12 #include <ModelAPI_Feature.h>
13
14 /**\class SketchShapePlugin_Feature
15  * \ingroup Plugins
16  * \brief Feature for extraction shapes from the sketch.
17  * The visualization of this object is a result and
18  * it is calculated if all attributes are initialized.
19  * It is possible to extract simultaneously vertices, edges and faces.
20  * 
21  */
22 class SketchShapePlugin_Feature : public ModelAPI_Feature
23 {
24  public:
25   /// SketchShape feature kind
26   inline static const std::string& ID()
27   {
28     static const std::string MY_SKETCH_SHAPE_ID("SketchShape");
29     return MY_SKETCH_SHAPE_ID;
30   }
31
32   /// Sketch feature
33   inline static const std::string& SKETCH_ID()
34   {
35     static const std::string MY_SKETCH_ID("Sketch");
36     return MY_SKETCH_ID;
37   }
38
39   /// State whether the vertices are selectable
40   inline static const std::string& VERTEX_CHOICE_ID()
41   {
42     static const std::string MY_VERTEX_CHOICE_ID("VertexChoice");
43     return MY_VERTEX_CHOICE_ID;
44   }
45
46   /// List of vertices to be extracted
47   inline static const std::string& VERTEX_LIST_ID()
48   {
49     static const std::string MY_VERTEX_LIST_ID("VertexList");
50     return MY_VERTEX_LIST_ID;
51   }
52
53     /// State whether the vertices are selectable
54   inline static const std::string& EDGE_CHOICE_ID()
55   {
56     static const std::string MY_EDGE_CHOICE_ID("EdgeChoice");
57     return MY_EDGE_CHOICE_ID;
58   }
59
60   /// List of vertices to be extracted
61   inline static const std::string& EDGE_LIST_ID()
62   {
63     static const std::string MY_EDGE_LIST_ID("EdgeList");
64     return MY_EDGE_LIST_ID;
65   }
66
67     /// State whether the vertices are selectable
68   inline static const std::string& FACE_CHOICE_ID()
69   {
70     static const std::string MY_FACE_CHOICE_ID("FaceChoice");
71     return MY_FACE_CHOICE_ID;
72   }
73
74   /// List of vertices to be extracted
75   inline static const std::string& FACE_LIST_ID()
76   {
77     static const std::string MY_FACE_LIST_ID("FaceList");
78     return MY_FACE_LIST_ID;
79   }
80
81   /// Returns the kind of a feature
82   SKETCHSHAPEPLUGIN_EXPORT virtual const std::string& getKind()
83   {
84     static std::string MY_KIND = SketchShapePlugin_Feature::ID();
85     return MY_KIND;
86   }
87
88   /// Creates an arc-shape
89   SKETCHSHAPEPLUGIN_EXPORT virtual void execute();
90
91   /// Request for initialization of data model of the feature: adding all attributes
92   SKETCHSHAPEPLUGIN_EXPORT virtual void initAttributes();
93
94   /// Called on change of any argument-attribute of this object
95   /// \param theID identifier of changed attribute
96   SKETCHSHAPEPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
97
98   /// Use plugin manager for features creation
99   SketchShapePlugin_Feature();
100 };
101
102 #endif