Salome HOME
Refactoring of the Bounding Box feature (change names of classes to be more evident)
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_BoundingBox.h
index 9238942c4325280c2d64f0c3cf1524d27471220d..0f8f14dcea04a87259502b8074ec1f314b88c507 100644 (file)
 #ifndef FeaturesPlugin_BoundingBox_H_
 #define FeaturesPlugin_BoundingBox_H_
 
-#include <FeaturesPlugin_CommonBoundingBox.h>
+#include <FeaturesPlugin_BoundingBoxBase.h>
 
 /// \class FeaturesPlugin_BoundingBox
 /// \ingroup Plugins
-/// \brief Feature to view the Bounding Box.
+/// \brief Persistence feature to create the bounding box.
 
-class FeaturesPlugin_BoundingBox : public FeaturesPlugin_CommonBoundingBox
+class FeaturesPlugin_BoundingBox : public FeaturesPlugin_BoundingBoxBase
 {
 public:
-  /// Bounding box macro kind.
+  /// Bounding box kind.
   inline static const std::string& ID()
   {
-    static const std::string MY_ID("BoundingBoxMacro");
+    static const std::string MY_ID("BoundingBox");
     return MY_ID;
   }
 
@@ -85,13 +85,6 @@ public:
     return MY_Z_MAX_COORD_ID;
   }
 
-  /// Attribute name for checkbox create box.
-  inline static const std::string& CREATEBOX_ID()
-  {
-    static const std::string MY_CREATEBOX_ID("createbox");
-    return MY_CREATEBOX_ID;
-  }
-
   /// Attribute name for values of result.
   inline static const std::string& RESULT_VALUES_ID()
   {
@@ -99,6 +92,13 @@ public:
     return MY_RESULT_VALUES_ID;
   }
 
+  /// Attribute name for indicate to compute the bounding box.
+  inline static const std::string& COMPUTE_ID()
+  {
+    static const std::string MY_COMPUTE_ID("compute");
+    return MY_COMPUTE_ID;
+  }
+
   /// \return the kind of a feature.
   virtual const std::string& getKind()
   {
@@ -115,25 +115,15 @@ public:
   /// \param theID identifier of changed attribute
   FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
 
-  /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
-  FEATURESPLUGIN_EXPORT virtual bool isMacro() const { return true; }
+  /// Return Attribut values of result.
+  FEATURESPLUGIN_EXPORT virtual AttributePtr attributResultValues();
 
   /// Use plugin manager for features creation
   FeaturesPlugin_BoundingBox();
 
 private:
-  /// Return Attribut values of result.
-  virtual AttributePtr attributResultValues();
-
   /// Update values displayed.
   bool updateValues();
-  /// Create Box
-  void createBox();
-  /// Update Box
-  void updateBox();
-
-  /// Feature to create box
-  FeaturePtr myCreateFeature;
 
 };