Salome HOME
Resolve batch runtime errors on debian squeeze
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Point.cpp
index e39bcc06efd38d8591c7f833c06ef193011a183a..7a9d66b2d6eedd161ea362b427cbc5793a21877b 100644 (file)
@@ -1,9 +1,11 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        ConstructionPlugin_Point.cxx
 // Created:     27 Mar 2014
 // Author:      Mikhail PONIKAROV
 
 #include "ConstructionPlugin_Point.h"
-#include "ModelAPI_PluginManager.h"
+#include "ModelAPI_Session.h"
 #include "ModelAPI_Document.h"
 #include "ModelAPI_Data.h"
 #include "ModelAPI_AttributeDouble.h"
@@ -19,18 +21,18 @@ ConstructionPlugin_Point::ConstructionPlugin_Point()
 
 void ConstructionPlugin_Point::initAttributes()
 {
-  data()->addAttribute(POINT_ATTR_X, ModelAPI_AttributeDouble::type());
-  data()->addAttribute(POINT_ATTR_Y, ModelAPI_AttributeDouble::type());
-  data()->addAttribute(POINT_ATTR_Z, ModelAPI_AttributeDouble::type());
+  data()->addAttribute(POINT_ATTR_X, ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(POINT_ATTR_Y, ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(POINT_ATTR_Z, ModelAPI_AttributeDouble::typeId());
 }
 
 void ConstructionPlugin_Point::execute()
 {
-  boost::shared_ptr<GeomAPI_Pnt> aPnt(
+  std::shared_ptr<GeomAPI_Pnt> aPnt(
       new GeomAPI_Pnt(data()->real(POINT_ATTR_X)->value(), data()->real(POINT_ATTR_Y)->value(),
                       data()->real(POINT_ATTR_Z)->value()));
 
-  boost::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(data());
+  std::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(data());
   aConstr->setShape(GeomAlgoAPI_PointBuilder::point(aPnt));
   setResult(aConstr);
 }