Salome HOME
7138c1241ca0a298c6199878f6e2b658a4ea5e4c
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Group.h
1 // File:        FeaturesPlugin_Group.h
2 // Created:     08 Oct 2014
3 // Author:      Sergey BELASH
4
5 #ifndef FEATURESPLUGIN_GROUP_H_
6 #define FEATURESPLUGIN_GROUP_H_
7
8 #include "FeaturesPlugin.h"
9 #include <ModelAPI_Feature.h>
10 #include <GeomAPI_Shape.h>
11
12 class FeaturesPlugin_Group : public ModelAPI_Feature
13 {
14  public:
15   /// Extrusion kind
16   inline static const std::string& ID()
17   {
18     static const std::string MY_GROUP_ID("Group");
19     return MY_GROUP_ID;
20   }
21   /// attribute name of group name
22   //inline static const std::string& NAME_ID()
23   //{
24   //  static const std::string MY_GROUP_NAME_ID("group_name");
25   //  return MY_GROUP_NAME_ID;
26   //}
27   /// attribute name of selected entities list
28   inline static const std::string& LIST_ID()
29   {
30     static const std::string MY_GROUP_LIST_ID("group_list");
31     return MY_GROUP_LIST_ID;
32   }
33
34   /// Returns the kind of a feature
35   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
36   {
37     static std::string MY_KIND = FeaturesPlugin_Group::ID();
38     return MY_KIND;
39   }
40
41   /// Creates a new part document if needed
42   FEATURESPLUGIN_EXPORT virtual void execute();
43
44   /// Request for initialization of data model of the feature: adding all attributes
45   FEATURESPLUGIN_EXPORT virtual void initAttributes();
46
47   /// Result of groups is created on the fly and don't stored to the document
48   FEATURESPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
49
50   /// Use plugin manager for features creation
51   FeaturesPlugin_Group();
52
53 };
54
55 #endif