Salome HOME
[CEA] Improve ShaperResults
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultGroup.h
index a8b183c12c62f4b10643f3a92650a7256a1572f3..60317b95ffc60ae8f1ad85386e76b8cfeb8cb669 100644 (file)
@@ -1,13 +1,28 @@
-// File:        ModelAPI_ResultGroup.hxx
-// Created:     07 Jul 2014
-// Author:      Mikhail PONIKAROV
+// Copyright (C) 2014-2024  CEA, EDF
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef ModelAPI_ResultGroup_H_
 #define ModelAPI_ResultGroup_H_
 
 #include "ModelAPI_Result.h"
 #include <GeomAPI_Shape.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <string>
 
 /**\class ModelAPI_ResultGroup
 class ModelAPI_ResultGroup : public ModelAPI_Result
 {
 public:
+  MODELAPI_EXPORT virtual ~ModelAPI_ResultGroup();
   /// Returns the group identifier of this result
-  virtual std::string groupName()
-  {
-    return group();
-  }
+  MODELAPI_EXPORT virtual std::string groupName();
 
   /// Returns the group identifier of this result
-  static std::string group()
+  inline static std::string group()
   {
     static std::string MY_GROUP = "Groups";
     return MY_GROUP;
   }
 
-  /// Returns the compound of selected entities
-  virtual boost::shared_ptr<GeomAPI_Shape> shape() const = 0;
+  /// default color for a result body
+  inline static const std::string& DEFAULT_COLOR()
+  {
+    static const std::string RESULT_GROUP_COLOR("150,150,180");
+    return RESULT_GROUP_COLOR;
+  }
+
+  /// \brief Stores the result of operation made on groups.
+  ///        Cleans the storage if empty shape is given.
+  /// param[in] theShape shape to store.
+  MODELAPI_EXPORT virtual void store(const GeomShapePtr& /*theShape*/)
+  {}
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_ResultGroup> ResultGroupPtr;
+typedef std::shared_ptr<ModelAPI_ResultGroup> ResultGroupPtr;
 
 #endif