Salome HOME
Copyright update 2020
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Recover.h
index a7c20c05868c27bc3087d9cdb2be127b7e06e686..47edd6a33b9d76b0b44f2406f90d0c040a2c007a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -12,9 +12,9 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef FEATURESPLUGIN_RECOVER_H_
@@ -38,6 +38,8 @@ class FeaturesPlugin_Recover : public ModelAPI_Feature
   FeaturePtr myCurrentBase;
   /// previous state of persistent flag
   bool myPersistent;
+  /// necessity to clean recovered list while changing the type of recover
+  bool myClearListOnTypeChange;
  public:
   /// Extrusion kind
   inline static const std::string& ID()
@@ -59,6 +61,26 @@ class FeaturesPlugin_Recover : public ModelAPI_Feature
     return MY_RECOVERED_ENTITIES_ID;
   }
 
+  /// Attribute name of the type of recover.
+  inline static const std::string& METHOD()
+  {
+    static const std::string MY_METHOD_ID("method");
+    return MY_METHOD_ID;
+  }
+
+  /// Value of default method, recovering concealed objects only.
+  inline static const std::string& METHOD_DEFAULT()
+  {
+    static const std::string MY_METHOD_ID("default");
+    return MY_METHOD_ID;
+  }
+  /// Value of method, recovering parent compounds of concealed objects.
+  inline static const std::string& METHOD_COMPOUND()
+  {
+    static const std::string MY_METHOD_ID("compound");
+    return MY_METHOD_ID;
+  }
+
   /// Returns the kind of a feature
   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
   {
@@ -66,12 +88,16 @@ class FeaturesPlugin_Recover : public ModelAPI_Feature
     return MY_KIND;
   }
 
-  /// Creates a new part document if needed
+  /// Performs the algorithm and stores results it in the data structure.
   FEATURESPLUGIN_EXPORT virtual void execute();
 
   /// Request for initialization of data model of the feature: adding all attributes
   FEATURESPLUGIN_EXPORT virtual void initAttributes();
 
+  /// Called on change of any argument-attribute of this object
+  /// \param theID identifier of changed attribute
+  FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
   /// Use plugin manager for features creation
   FeaturesPlugin_Recover();