Salome HOME
Boost has been removed from code
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Duplicate.cpp
index b8919426b1f77c567129fdc3c7f980a6a4a11c2c..f92c0e912a895a79b195896df95811709a704f39 100644 (file)
@@ -8,6 +8,7 @@
 #include <ModelAPI_Data.h>
 #include <ModelAPI_Document.h>
 #include <ModelAPI_ResultPart.h>
+#include <ModelAPI_Session.h>
 
 using namespace std;
 
@@ -20,20 +21,20 @@ void PartSetPlugin_Duplicate::initAttributes()
   PartSetPlugin_Part::initAttributes();
   data()->addAttribute(ORIGIN_REF(), ModelAPI_AttributeRefAttr::type());
 
-  boost::shared_ptr<ModelAPI_Session> aPManager = ModelAPI_Session::get();
-  boost::shared_ptr<ModelAPI_Document> aRoot = aPManager->moduleDocument();
-  boost::shared_ptr<ModelAPI_ResultPart> aSource;  // searching for source document attribute
+  std::shared_ptr<ModelAPI_Session> aPManager = ModelAPI_Session::get();
+  std::shared_ptr<ModelAPI_Document> aRoot = aPManager->moduleDocument();
+  std::shared_ptr<ModelAPI_ResultPart> aSource;  // searching for source document attribute
   for (int a = aRoot->size(getGroup()) - 1; a >= 0; a--) {
-    aSource = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aRoot->object(getGroup(), a));
+    aSource = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aRoot->object(getGroup(), a));
     if (aSource && aSource->data()
-        && aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value()
+        && aSource->data()->document(ModelAPI_ResultPart::DOC_REF())->value()
             == aPManager->activeDocument())
       break;
     aSource.reset();
   }
   if (aSource) {
-    boost::shared_ptr<ModelAPI_Document> aCopy = aPManager->copy(
-        aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value(), data()->name());
+    std::shared_ptr<ModelAPI_Document> aCopy = aPManager->copy(
+        aSource->data()->document(ModelAPI_ResultPart::DOC_REF())->value(), data()->name());
     data()->refattr(ORIGIN_REF())->setObject(aSource);
   }
 }