Salome HOME
Change color for construction/body/group.
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Point.h
index 56e921ab5a64ef527f49a44f3c76ad1198bf580e..84cb35cb35085d1b7461b84cf3da54ca5ea7f07f 100644 (file)
@@ -9,36 +9,41 @@
 
 #include "ConstructionPlugin.h"
 #include <ModelAPI_Feature.h>
-
-/// Point kind
-const std::string CONSTRUCTION_POINT_KIND("Point");
-
-/// attribute name for X coordinate
-const std::string POINT_ATTR_X = "x";
-/// attribute name for Y coordinate
-const std::string POINT_ATTR_Y = "y";
-/// attribute name for Z coordinate
-const std::string POINT_ATTR_Z = "z";
+#include <ModelAPI_Result.h>
 
 /**\class ConstructionPlugin_Point
- * \ingroup DataModel
+ * \ingroup Plugins
  * \brief Feature for creation of the new part in PartSet.
  */
 class ConstructionPlugin_Point : public ModelAPI_Feature
 {
  public:
   /// Returns the kind of a feature
-  CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind()
+  CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind();
+
+  inline static const std::string& ID()
   {
-    static std::string MY_KIND = CONSTRUCTION_POINT_KIND;
-    return MY_KIND;
+    static const std::string CONSTRUCTION_POINT_KIND("Point");
+    return CONSTRUCTION_POINT_KIND;
   }
 
-  /// Returns to which group in the document must be added feature
-  CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getGroup()
+  /// attribute name for X coordinate
+  inline static const std::string& X()
+  {
+    static const std::string POINT_ATTR_X("x");
+    return POINT_ATTR_X;
+  }
+  /// attribute name for Y coordinate
+  inline static const std::string& Y()
+  {
+    static const std::string POINT_ATTR_Y("y");
+    return POINT_ATTR_Y;
+  }
+  /// attribute name for Z coordinate
+  inline static const std::string& Z()
   {
-    static std::string MY_GROUP = "Construction";
-    return MY_GROUP;
+    static const std::string POINT_ATTR_Z("z");
+    return POINT_ATTR_Z;
   }
 
   /// Creates a new part document if needed