Salome HOME
Commit of the current operation if the preselection is activated.
[modules/shaper.git] / src / Model / Model_ResultConstruction.h
index b24c2f31076d8febe821b74c5e461ea6ebad43f2..a1e395c5ed13919c8ae3cbc23f4074f43ae7819b 100644 (file)
@@ -2,8 +2,8 @@
 // Created:     07 Jul 2014
 // Author:      Mikhail PONIKAROV
 
-#ifndef Model_ResultConstruction_HeaderFile
-#define Model_ResultConstruction_HeaderFile
+#ifndef Model_ResultConstruction_H_
+#define Model_ResultConstruction_H_
 
 #include "Model.h"
 #include <ModelAPI_ResultConstruction.h>
  */
 class Model_ResultConstruction : public ModelAPI_ResultConstruction
 {
-  boost::shared_ptr<ModelAPI_Feature> myOwner; ///< owner of this result
-  boost::shared_ptr<GeomAPI_Shape> myShape; ///< shape of this result created "on the fly"
-public:
-  /// Returns the group identifier of this result
-  virtual std::string group()
-    {static std::string MY_GROUP = "Construction"; return MY_GROUP;}
+  std::shared_ptr<ModelAPI_Feature> myOwner;  ///< owner of this result
+  std::shared_ptr<GeomAPI_Shape> myShape;  ///< shape of this result created "on the fly"
+  bool myIsInHistory;
+ public:
+  /// By default object is displayed in the object browser.
+  MODEL_EXPORT virtual bool isInHistory()
+  {
+    return myIsInHistory;
+  }
+
   /// Sets the result
-  MODEL_EXPORT virtual void setShape(boost::shared_ptr<GeomAPI_Shape> theShape);
+  MODEL_EXPORT virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape);
   /// Returns the shape-result produced by this feature
-  MODEL_EXPORT virtual boost::shared_ptr<GeomAPI_Shape>& shape();
-  /// Returns the source feature of this result
-  //MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Feature> owner();
+  MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
+
+  /// Sets the flag that it must be displayed in history (default is true)
+  MODEL_EXPORT virtual void setIsInHistory(const bool myIsInHistory);
 
-protected:
+ protected:
   /// Makes a body on the given feature
   Model_ResultConstruction();