]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Boost has been removed from code
authorsbh <sergey.belash@opencascade.com>
Mon, 17 Nov 2014 17:24:12 +0000 (20:24 +0300)
committersbh <sergey.belash@opencascade.com>
Mon, 17 Nov 2014 17:24:12 +0000 (20:24 +0300)
235 files changed:
src/Config/Config_FeatureReader.cpp
src/Config/Config_FeatureReader.h
src/Config/Config_Prop.cpp
src/Config/Config_XMLReader.cpp
src/ConstructionPlugin/ConstructionPlugin_Point.cpp
src/Events/Events_Error.cpp
src/Events/Events_Listener.h
src/Events/Events_LongOp.cpp
src/Events/Events_Loop.cpp
src/Events/Events_Loop.h
src/Events/Events_MessageGroup.h
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.h
src/ExchangePlugin/ExchangePlugin_Plugin.cpp
src/ExchangePlugin/ExchangePlugin_Validators.cpp
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Boolean.h
src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp
src/FeaturesPlugin/FeaturesPlugin_Extrusion.h
src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp
src/GeomAPI/GeomAPI.i
src/GeomAPI/GeomAPI_AISObject.cpp
src/GeomAPI/GeomAPI_AISObject.h
src/GeomAPI/GeomAPI_Circ.cpp
src/GeomAPI/GeomAPI_Circ.h
src/GeomAPI/GeomAPI_Circ2d.cpp
src/GeomAPI/GeomAPI_Circ2d.h
src/GeomAPI/GeomAPI_Curve.cpp
src/GeomAPI/GeomAPI_Curve.h
src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp
src/GeomAPI/GeomAPI_DataMapOfShapeShape.h
src/GeomAPI/GeomAPI_Dir.cpp
src/GeomAPI/GeomAPI_Dir.h
src/GeomAPI/GeomAPI_Dir2d.cpp
src/GeomAPI/GeomAPI_Dir2d.h
src/GeomAPI/GeomAPI_Edge.cpp
src/GeomAPI/GeomAPI_Edge.h
src/GeomAPI/GeomAPI_IPresentable.h
src/GeomAPI/GeomAPI_Lin.cpp
src/GeomAPI/GeomAPI_Lin.h
src/GeomAPI/GeomAPI_Lin2d.cpp
src/GeomAPI/GeomAPI_Lin2d.h
src/GeomAPI/GeomAPI_PlanarEdges.cpp
src/GeomAPI/GeomAPI_PlanarEdges.h
src/GeomAPI/GeomAPI_Pln.cpp
src/GeomAPI/GeomAPI_Pln.h
src/GeomAPI/GeomAPI_Pnt.cpp
src/GeomAPI/GeomAPI_Pnt.h
src/GeomAPI/GeomAPI_Pnt2d.cpp
src/GeomAPI/GeomAPI_Pnt2d.h
src/GeomAPI/GeomAPI_Shape.cpp
src/GeomAPI/GeomAPI_Shape.h
src/GeomAPI/GeomAPI_XY.cpp
src/GeomAPI/GeomAPI_XY.h
src/GeomAPI/GeomAPI_XYZ.cpp
src/GeomAPI/GeomAPI_XYZ.h
src/GeomAlgoAPI/GeomAlgoAPI.i
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h
src/GeomAlgoAPI/GeomAlgoAPI_CompoundBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_CompoundBuilder.h
src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.h
src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.h
src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.h
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h
src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.h
src/GeomData/GeomData_Dir.cpp
src/GeomData/GeomData_Dir.h
src/GeomData/GeomData_Point.cpp
src/GeomData/GeomData_Point.h
src/GeomData/GeomData_Point2D.cpp
src/GeomData/GeomData_Point2D.h
src/GeomDataAPI/GeomDataAPI.i
src/GeomDataAPI/GeomDataAPI_Dir.h
src/GeomDataAPI/GeomDataAPI_Point.h
src/GeomDataAPI/GeomDataAPI_Point2D.h
src/GeomValidators/GeomValidators_Positive.cpp
src/Model/Model_Application.cpp
src/Model/Model_Application.h
src/Model/Model_AttributeDocRef.cpp
src/Model/Model_AttributeDocRef.h
src/Model/Model_AttributeRefAttr.cpp
src/Model/Model_AttributeRefAttr.h
src/Model/Model_AttributeRefList.cpp
src/Model/Model_AttributeReference.cpp
src/Model/Model_AttributeReference.h
src/Model/Model_AttributeSelection.cpp
src/Model/Model_AttributeSelection.h
src/Model/Model_AttributeSelectionList.cpp
src/Model/Model_AttributeSelectionList.h
src/Model/Model_Data.cpp
src/Model/Model_Data.h
src/Model/Model_Document.cpp
src/Model/Model_Document.h
src/Model/Model_Events.cpp
src/Model/Model_Events.h
src/Model/Model_FeatureValidator.cpp
src/Model/Model_FeatureValidator.h
src/Model/Model_ResultBody.cpp
src/Model/Model_ResultBody.h
src/Model/Model_ResultConstruction.cpp
src/Model/Model_ResultConstruction.h
src/Model/Model_ResultGroup.cpp
src/Model/Model_ResultGroup.h
src/Model/Model_ResultPart.cpp
src/Model/Model_ResultPart.h
src/Model/Model_Session.cpp
src/Model/Model_Session.h
src/Model/Model_Update.cpp
src/Model/Model_Update.h
src/Model/Model_Validator.cpp
src/Model/Model_Validator.h
src/ModelAPI/ModelAPI.i
src/ModelAPI/ModelAPI_Attribute.h
src/ModelAPI/ModelAPI_AttributeBoolean.h
src/ModelAPI/ModelAPI_AttributeDocRef.h
src/ModelAPI/ModelAPI_AttributeDouble.h
src/ModelAPI/ModelAPI_AttributeInteger.h
src/ModelAPI/ModelAPI_AttributeRefAttr.h
src/ModelAPI/ModelAPI_AttributeRefList.h
src/ModelAPI/ModelAPI_AttributeReference.h
src/ModelAPI/ModelAPI_AttributeSelection.h
src/ModelAPI/ModelAPI_AttributeSelectionList.h
src/ModelAPI/ModelAPI_AttributeString.h
src/ModelAPI/ModelAPI_CompositeFeature.h
src/ModelAPI/ModelAPI_Data.h
src/ModelAPI/ModelAPI_Document.h
src/ModelAPI/ModelAPI_Events.h
src/ModelAPI/ModelAPI_Feature.cpp
src/ModelAPI/ModelAPI_Feature.h
src/ModelAPI/ModelAPI_FeatureValidator.h
src/ModelAPI/ModelAPI_Object.h
src/ModelAPI/ModelAPI_Plugin.h
src/ModelAPI/ModelAPI_Result.h
src/ModelAPI/ModelAPI_ResultBody.h
src/ModelAPI/ModelAPI_ResultConstruction.h
src/ModelAPI/ModelAPI_ResultGroup.h
src/ModelAPI/ModelAPI_ResultParameters.h
src/ModelAPI/ModelAPI_ResultPart.h
src/ModelAPI/ModelAPI_Session.cpp
src/ModelAPI/ModelAPI_Session.h
src/ModelAPI/ModelAPI_Tools.cpp
src/ModelAPI/ModelAPI_Tools.h
src/ModelAPI/ModelAPI_Validator.h
src/ModuleBase/ModuleBase_IModule.cpp
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_Operation.cpp
src/ModuleBase/ModuleBase_Operation.h
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/ModuleBase/ModuleBase_ResultPrs.h
src/ModuleBase/ModuleBase_ViewerFilters.cpp
src/ModuleBase/ModuleBase_ViewerPrs.h
src/ModuleBase/ModuleBase_WidgetBoolValue.cpp
src/ModuleBase/ModuleBase_WidgetChoice.cpp
src/ModuleBase/ModuleBase_WidgetFeature.cpp
src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp
src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.h
src/ModuleBase/ModuleBase_WidgetFileSelector.cpp
src/ModuleBase/ModuleBase_WidgetLineEdit.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetPoint2D.cpp
src/ModuleBase/ModuleBase_WidgetPoint2D.h
src/ModuleBase/ModuleBase_WidgetPoint2dDistance.cpp
src/ModuleBase/ModuleBase_WidgetPoint2dDistance.h
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.h
src/ModuleBase/ModuleBase_WidgetValueFeature.cpp
src/ModuleBase/ModuleBase_WidgetValueFeature.h
src/PartSet/PartSet_Listener.cpp
src/PartSet/PartSet_Listener.h
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h
src/PartSet/PartSet_OperationFeatureBase.cpp
src/PartSet/PartSet_OperationFeatureEdit.cpp
src/PartSet/PartSet_OperationSketch.cpp
src/PartSet/PartSet_OperationSketch.h
src/PartSet/PartSet_OperationSketchBase.cpp
src/PartSet/PartSet_OperationSketchBase.h
src/PartSet/PartSet_TestOCC.cpp
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h
src/PartSetPlugin/PartSetPlugin_Duplicate.cpp
src/PartSetPlugin/PartSetPlugin_Part.cpp
src/PartSetPlugin/PartSetPlugin_Part.h
src/PartSetPlugin/PartSetPlugin_Remove.cpp
src/SketchPlugin/SketchPlugin_Arc.cpp
src/SketchPlugin/SketchPlugin_Arc.h
src/SketchPlugin/SketchPlugin_Circle.cpp
src/SketchPlugin/SketchPlugin_Circle.h
src/SketchPlugin/SketchPlugin_ConstraintBase.cpp
src/SketchPlugin/SketchPlugin_ConstraintBase.h
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
src/SketchPlugin/SketchPlugin_ConstraintDistance.h
src/SketchPlugin/SketchPlugin_ConstraintLength.cpp
src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp
src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp
src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp
src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp
src/SketchPlugin/SketchPlugin_Feature.cpp
src/SketchPlugin/SketchPlugin_Feature.h
src/SketchPlugin/SketchPlugin_Line.cpp
src/SketchPlugin/SketchPlugin_Line.h
src/SketchPlugin/SketchPlugin_Point.cpp
src/SketchPlugin/SketchPlugin_Point.h
src/SketchPlugin/SketchPlugin_ResultValidators.cpp
src/SketchPlugin/SketchPlugin_Sketch.cpp
src/SketchPlugin/SketchPlugin_Sketch.h
src/SketchPlugin/SketchPlugin_Validators.cpp
src/SketchSolver/SketchSolver_Constraint.cpp
src/SketchSolver/SketchSolver_Constraint.h
src/SketchSolver/SketchSolver_ConstraintGroup.cpp
src/SketchSolver/SketchSolver_ConstraintGroup.h
src/SketchSolver/SketchSolver_ConstraintManager.cpp
src/SketchSolver/SketchSolver_ConstraintManager.h
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_Displayer.h
src/XGUI/XGUI_DocumentDataModel.cpp
src/XGUI/XGUI_DocumentDataModel.h
src/XGUI/XGUI_ObjectsBrowser.cpp
src/XGUI/XGUI_ObjectsBrowser.h
src/XGUI/XGUI_PartDataModel.cpp
src/XGUI/XGUI_QtEvents.cpp
src/XGUI/XGUI_QtEvents.h
src/XGUI/XGUI_Tools.cpp
src/XGUI/XGUI_Tools.h
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

index 947fdb8ab9cf1e1711c010f5232712c533378210..9ebc93f78f821c399ec5106c85bb5844db09e5d5 100644 (file)
@@ -49,7 +49,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
   Events_ID aMenuItemEvent = Events_Loop::eventByName(myEventGenerated);
   if (isNode(theNode, NODE_FEATURE, NULL)) {
     storeAttribute(theNode, _ID);
-    boost::shared_ptr<Config_FeatureMessage> aMessage(new Config_FeatureMessage(aMenuItemEvent, this));
+    std::shared_ptr<Config_FeatureMessage> aMessage(new Config_FeatureMessage(aMenuItemEvent, this));
     fillFeature(theNode, aMessage);
     myFeatures.push_back(getProperty(theNode, _ID));
     //If a feature has xml definition for it's widget:
@@ -60,7 +60,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
     storeAttribute(theNode, _ID);
     storeAttribute(theNode, WORKBENCH_DOC);
   } else if (myIsProcessWidgets && isWidgetNode(theNode)) {
-    boost::shared_ptr<Config_AttributeMessage> aMessage(new Config_AttributeMessage(aMenuItemEvent, this));
+    std::shared_ptr<Config_AttributeMessage> aMessage(new Config_AttributeMessage(aMenuItemEvent, this));
     aMessage->setFeatureId(restoreAttribute(NODE_FEATURE, _ID));
     std::string anAttributeID = getProperty(theNode, _ID);
     if (!anAttributeID.empty()) {
@@ -84,7 +84,7 @@ bool Config_FeatureReader::processChildren(xmlNodePtr theNode)
 }
 
 void Config_FeatureReader::fillFeature(xmlNodePtr theNode, 
-  const boost::shared_ptr<Config_FeatureMessage>& outFeatureMessage)
+  const std::shared_ptr<Config_FeatureMessage>& outFeatureMessage)
 {
   outFeatureMessage->setId(getProperty(theNode, _ID));
   outFeatureMessage->setPluginLibrary(myLibraryName);
index 3f5d7f7054d0ee5e1e187a8d2228a6aa781eee1b..005c9d7f2594fb791005a8cbfbbd3009d89b848a 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <Config_def.h>
 #include <Config_XMLReader.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <string>
 #include <list>
@@ -32,7 +32,7 @@ class Config_FeatureReader : public Config_XMLReader
   bool processChildren(xmlNodePtr aNode);
 
   void fillFeature(xmlNodePtr theRoot, 
-                   const boost::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
+                   const std::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
 
   void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
   std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
index 6de7627b04eb94c056b0ed18b42c098900eebc82..f2854009b70494c8995e9a9ba053ce9a691d0758 100644 (file)
@@ -12,7 +12,7 @@ void Config_Prop::setValue(const std::string& theValue)
   if (theValue != myValue) {
     myValue = theValue;
     static const Events_ID aChangedEvent = Events_Loop::loop()->eventByName("PreferenceChanged");
-    Events_Loop::loop()->send(boost::shared_ptr<Events_Message>(
+    Events_Loop::loop()->send(std::shared_ptr<Events_Message>(
       new Events_Message(aChangedEvent, this)));
   }
 }
index 66bd850a883c58cfd503551cd1951af4dab008cb..44c806ce919faebbb6e70e7121e6ee6eecf0cd4c 100644 (file)
@@ -152,7 +152,7 @@ void Config_XMLReader::processValidator(xmlNodePtr theNode)
 {
   Events_ID aValidatoEvent = Events_Loop::eventByName(EVENT_VALIDATOR_LOADED);
   Events_Loop* aEvLoop = Events_Loop::loop();
-  boost::shared_ptr<Config_ValidatorMessage> 
+  std::shared_ptr<Config_ValidatorMessage> 
     aMessage(new Config_ValidatorMessage(aValidatoEvent, this));
   std::string aValidatorId;
   std::list<std::string> aValidatorParameters;
index 61c20a9ee79333a3b6de3d27f32d63fd5df2d94e..f98ac1b85b449d164887efe527fc02602d739c20 100644 (file)
@@ -26,11 +26,11 @@ void ConstructionPlugin_Point::initAttributes()
 
 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);
 }
index 3ac990edb5893922ecb85a3cca24c1fe0276055c..712478c894c2e049a16b264b14723304805a6652 100644 (file)
@@ -31,8 +31,8 @@ char* Events_Error::description() const
 
 void Events_Error::send(char* theDescription, const void* theSender)
 {
-  boost::shared_ptr<Events_Message> aNewOne = 
-    boost::shared_ptr<Events_Message>(new Events_Error(theDescription, theSender));
+  std::shared_ptr<Events_Message> aNewOne = 
+    std::shared_ptr<Events_Message>(new Events_Error(theDescription, theSender));
   Events_Loop::loop()->send(aNewOne);
 }
 
index f59bbd2f9d36de78f3cbb9839b06a3d20c889eaf..8d2df430ba75a28ce59fe4aeb74f2c48119bfd6c 100644 (file)
@@ -6,7 +6,7 @@
 #define Events_Listener_H_
 
 #include <Events.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class Events_Message;
 
@@ -22,7 +22,7 @@ class EVENTS_EXPORT Events_Listener
 
  public:
   //! This method is called by loop when the event is started to process.
-  virtual void processEvent(const boost::shared_ptr<Events_Message>& theMessage) = 0;
+  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage) = 0;
 };
 
 #endif
index 75b7a0dfdaa1e72372742c3b15483d6430396b97..17c373c651ff99e0f0770d6ac507e4391883141a 100644 (file)
@@ -33,8 +33,8 @@ void Events_LongOp::start(void* theSender)
     MY_SENDERS[theSender]++;
 
   if (toSend) {
-    boost::shared_ptr<Events_Message> aNewOne = 
-      boost::shared_ptr<Events_Message>(new Events_LongOp(theSender));
+    std::shared_ptr<Events_Message> aNewOne = 
+      std::shared_ptr<Events_Message>(new Events_LongOp(theSender));
     Events_Loop::loop()->send(aNewOne);
   }
 }
@@ -49,8 +49,8 @@ void Events_LongOp::end(void* theSender)
       MY_SENDERS[theSender] = aCount - 1;
   }
   if (MY_SENDERS.empty()) {
-    boost::shared_ptr<Events_Message> aNewOne = 
-      boost::shared_ptr<Events_Message>(new Events_LongOp(theSender));
+    std::shared_ptr<Events_Message> aNewOne = 
+      std::shared_ptr<Events_Message>(new Events_LongOp(theSender));
     Events_Loop::loop()->send(aNewOne);
   }
 }
index eadae7283f44541edb18b0a29c53404ef304d891..9447c376b97c6a4f017be8206e8c13f41325fed6 100644 (file)
@@ -37,24 +37,24 @@ Events_ID Events_Loop::eventByName(const char* theName)
   return Events_ID(aResult);
 }
 
-void Events_Loop::send(const boost::shared_ptr<Events_Message>& theMessage, bool isGroup)
+void Events_Loop::send(const std::shared_ptr<Events_Message>& theMessage, bool isGroup)
 {
   if (myImmediateListeners.find(theMessage->eventID().eventText()) != myImmediateListeners.end()) {
     myImmediateListeners[theMessage->eventID().eventText()]->processEvent(theMessage);
   }
   // if it is grouped message, just accumulate it
   if (isGroup && myFlushed.find(theMessage->eventID().myID) == myFlushed.end()) {
-    boost::shared_ptr<Events_MessageGroup> aGroup = 
-      boost::dynamic_pointer_cast<Events_MessageGroup>(theMessage);
+    std::shared_ptr<Events_MessageGroup> aGroup = 
+      std::dynamic_pointer_cast<Events_MessageGroup>(theMessage);
     if (aGroup) {
-      std::map<char*, boost::shared_ptr<Events_Message> >::iterator aMyGroup = myGroups.find(
+      std::map<char*, std::shared_ptr<Events_Message> >::iterator aMyGroup = myGroups.find(
           aGroup->eventID().eventText());
       if (aMyGroup == myGroups.end()) {  // create a new group of messages for accumulation
         myGroups[aGroup->eventID().eventText()] = aGroup->newEmpty();
         aMyGroup = myGroups.find(aGroup->eventID().eventText());
       }
-      boost::shared_ptr<Events_MessageGroup> aStored =
-        boost::dynamic_pointer_cast<Events_MessageGroup>(aMyGroup->second);
+      std::shared_ptr<Events_MessageGroup> aStored =
+        std::dynamic_pointer_cast<Events_MessageGroup>(aMyGroup->second);
       aStored->Join(aGroup);
       return;
     }
@@ -115,11 +115,11 @@ void Events_Loop::flush(const Events_ID& theID)
 {
   if (!myFlushActive)
     return;
-  std::map<char*, boost::shared_ptr<Events_Message>>::iterator aMyGroup =
+  std::map<char*, std::shared_ptr<Events_Message>>::iterator aMyGroup =
     myGroups.find(theID.eventText());
   if (aMyGroup != myGroups.end()) {  // really sends
     myFlushed.insert(theID.myID);
-    boost::shared_ptr<Events_Message> aGroup = aMyGroup->second;
+    std::shared_ptr<Events_Message> aGroup = aMyGroup->second;
     myGroups.erase(aMyGroup);
     send(aGroup, false);
     myFlushed.erase(myFlushed.find(theID.myID));
@@ -133,7 +133,7 @@ void Events_Loop::activateFlushes(const bool theActivate)
 
 void Events_Loop::clear(const Events_ID& theID)
 {
-  std::map<char*, boost::shared_ptr<Events_Message>>::iterator aMyGroup =
+  std::map<char*, std::shared_ptr<Events_Message>>::iterator aMyGroup =
     myGroups.find(theID.eventText());
   if (aMyGroup != myGroups.end()) {  // really sends
     myGroups.erase(aMyGroup);
index b8a628ff7d73a9050e6ab527f5b620d4661ea2ca..c8b7798c0e06944cdc3348fdbe6e60126a662ee1 100644 (file)
@@ -33,7 +33,7 @@ class Events_Loop
   std::map<char*, Events_Listener*> myImmediateListeners;
 
   /// map from event ID to groupped messages (accumulated on flush)
-  std::map<char*, boost::shared_ptr<Events_Message> > myGroups;
+  std::map<char*, std::shared_ptr<Events_Message> > myGroups;
 
   ///< set of messages that are flushed right now, so they are not grouped
   std::set<char*> myFlushed;
@@ -53,7 +53,7 @@ class Events_Loop
 
   //! Allows to send an event
   //! \param isGroup is true for grouping messages if possible
-  EVENTS_EXPORT void send(const boost::shared_ptr<Events_Message>& theMessage, bool isGroup = true);
+  EVENTS_EXPORT void send(const std::shared_ptr<Events_Message>& theMessage, bool isGroup = true);
 
   //! Registers (or adds if such listener is already registered) a listener 
   //! that will be called on the event and from the defined sender
index b41d4ffcb557d08fa0d2883cf9b55f2cfe5089e1..8f6561f0b6a287bfa6fbbe82b59b3b608776583f 100644 (file)
@@ -6,7 +6,7 @@
 #define Events_MessageGroup_H_
 
 #include <Events_Message.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /**\class Events_Message
  * \ingroup EventsLoop
@@ -26,9 +26,9 @@ class EVENTS_EXPORT Events_MessageGroup : public Events_Message
   virtual ~Events_MessageGroup();
 
   //! Creates a new empty group (to store it in the loop before flush)
-  virtual boost::shared_ptr<Events_MessageGroup> newEmpty() = 0;
+  virtual std::shared_ptr<Events_MessageGroup> newEmpty() = 0;
   //! Allows to join the given message with the current one
-  virtual void Join(const boost::shared_ptr<Events_MessageGroup>& theJoined) = 0;
+  virtual void Join(const std::shared_ptr<Events_MessageGroup>& theJoined) = 0;
 };
 
 #endif
index 13a61e5469ce0c4e152e4415f9c09f38b525976d..6493870df6ea6a6260f552f10576471c83837246 100644 (file)
@@ -68,7 +68,7 @@ void ExchangePlugin_ImportFeature::initAttributes()
  */
 void ExchangePlugin_ImportFeature::execute()
 {
-  AttributeStringPtr aFilePathAttr = boost::dynamic_pointer_cast<ModelAPI_AttributeString>(
+  AttributeStringPtr aFilePathAttr = std::dynamic_pointer_cast<ModelAPI_AttributeString>(
       data()->attribute(ExchangePlugin_ImportFeature::FILE_PATH_ID()));
   std::string aFilePath = aFilePathAttr->value();
   if(aFilePath.empty())
@@ -112,8 +112,8 @@ bool ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
    // Pass the results into the model
    std::string anObjectName = aPath.Name().ToCString();
    data()->setName(anObjectName);
-   boost::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
-   boost::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
+   std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
+   std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
    aGeomShape->setImpl(new TopoDS_Shape(aShape));
 
    //LoadNamingDS of the imported shape
@@ -126,8 +126,8 @@ bool ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
 
 //============================================================================
 void ExchangePlugin_ImportFeature::loadNamingDS(
-                                   boost::shared_ptr<GeomAPI_Shape> theGeomShape, 
-                                            boost::shared_ptr<ModelAPI_ResultBody> theResultBody)
+                                   std::shared_ptr<GeomAPI_Shape> theGeomShape, 
+                                            std::shared_ptr<ModelAPI_ResultBody> theResultBody)
 {  
   //load result
   theResultBody->store(theGeomShape);
index 6a90bf0b9014b11c8c568113a9eac2c005a46270..c4c254e0026a7cabb491588e29c9a375e4d93295 100644 (file)
@@ -66,8 +66,8 @@ class ExchangePlugin_ImportFeature : public ModelAPI_Feature
 
 private:
   /// Loads Naming data structure to the document
-  void loadNamingDS(boost::shared_ptr<GeomAPI_Shape> theGeomShape, 
-                                       boost::shared_ptr<ModelAPI_ResultBody> theResultBody);
+  void loadNamingDS(std::shared_ptr<GeomAPI_Shape> theGeomShape, 
+                                       std::shared_ptr<ModelAPI_ResultBody> theResultBody);
 };
 
 #endif /* IMPORT_IMPORTFEATURE_H_ */
index b37a0690623525edb7e7be443c9c5fa0c98c4ce6..5168e91f77c6916251f7bcd69e07d905014a68e9 100644 (file)
@@ -9,7 +9,7 @@
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Validator.h>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 
 using namespace std;
 
index 7954c540be2e8a9c71230e78021b915c7b35a603..2582ca76e115063bcb941e10ab4d0e586e9e69b4 100644 (file)
@@ -55,7 +55,7 @@ bool ExchangePlugin_ImportFormatValidator::isValid(const AttributePtr& theAttrib
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
   if (theAttribute->isInitialized()) {
     const AttributeStringPtr aStrAttr =
-        boost::dynamic_pointer_cast<ModelAPI_AttributeString>(theAttribute);
+        std::dynamic_pointer_cast<ModelAPI_AttributeString>(theAttribute);
     if(!aStrAttr)
       return false;
     std::string aFileName = aStrAttr->value();
index de5cdbf2204eaf94ad0be7e3a4c87ac07dbcaa36..d8b8198ed1219c4ec710785d678a2f5722c0c242 100644 (file)
@@ -31,37 +31,37 @@ void FeaturesPlugin_Boolean::initAttributes()
   data()->addAttribute(FeaturesPlugin_Boolean::TOOL_ID(), ModelAPI_AttributeReference::type());
 }
 
-boost::shared_ptr<GeomAPI_Shape> FeaturesPlugin_Boolean::getShape(const std::string& theAttrName)
+std::shared_ptr<GeomAPI_Shape> FeaturesPlugin_Boolean::getShape(const std::string& theAttrName)
 {
-  boost::shared_ptr<ModelAPI_AttributeReference> aObjRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeReference> aObjRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeReference>(data()->attribute(theAttrName));
   if (aObjRef) {
-    boost::shared_ptr<ModelAPI_ResultBody> aConstr = boost::dynamic_pointer_cast<
+    std::shared_ptr<ModelAPI_ResultBody> aConstr = std::dynamic_pointer_cast<
         ModelAPI_ResultBody>(aObjRef->value());
     if (aConstr)
       return aConstr->shape();
   }
-  return boost::shared_ptr<GeomAPI_Shape>();
+  return std::shared_ptr<GeomAPI_Shape>();
 }
 
 
 void FeaturesPlugin_Boolean::execute()
 {
-  boost::shared_ptr<ModelAPI_AttributeInteger> aTypeAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeInteger> aTypeAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeInteger>(data()->attribute(FeaturesPlugin_Boolean::TYPE_ID()));
   if (!aTypeAttr)
     return;
   int aType = aTypeAttr->value();
 
-  boost::shared_ptr<GeomAPI_Shape> anObject = this->getShape(FeaturesPlugin_Boolean::OBJECT_ID());
+  std::shared_ptr<GeomAPI_Shape> anObject = this->getShape(FeaturesPlugin_Boolean::OBJECT_ID());
   if (!anObject)
     return;
 
-  boost::shared_ptr<GeomAPI_Shape> aTool = this->getShape(FeaturesPlugin_Boolean::TOOL_ID());
+  std::shared_ptr<GeomAPI_Shape> aTool = this->getShape(FeaturesPlugin_Boolean::TOOL_ID());
   if (!aTool)
     return;
 
-  boost::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
+  std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
 
   GeomAlgoAPI_Boolean* aFeature = new GeomAlgoAPI_Boolean(anObject, aTool, aType);
   if(aFeature && !aFeature->isDone()) {
@@ -98,9 +98,9 @@ void FeaturesPlugin_Boolean::execute()
 
 //============================================================================
 void FeaturesPlugin_Boolean::LoadNamingDS(GeomAlgoAPI_Boolean* theFeature, 
-                                               boost::shared_ptr<ModelAPI_ResultBody> theResultBody, 
-                                               boost::shared_ptr<GeomAPI_Shape> theObject,
-                                               boost::shared_ptr<GeomAPI_Shape> theTool,
+                                               std::shared_ptr<ModelAPI_ResultBody> theResultBody, 
+                                               std::shared_ptr<GeomAPI_Shape> theObject,
+                                               std::shared_ptr<GeomAPI_Shape> theTool,
                                                int theType)
 {  
 
index 2f99dbdf42314c5312b7c5f34e6771c0501a919a..021b99da602c34a0904831825132345db713e93f 100644 (file)
@@ -62,13 +62,13 @@ class FeaturesPlugin_Boolean : public ModelAPI_Feature
   FeaturesPlugin_Boolean();
 
 private:
-  boost::shared_ptr<GeomAPI_Shape> getShape(const std::string& theAttrName);
+  std::shared_ptr<GeomAPI_Shape> getShape(const std::string& theAttrName);
   
   /// Load Naming data structure of the feature to the document
   void LoadNamingDS(GeomAlgoAPI_Boolean* theFeature, 
-                                       boost::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                       boost::shared_ptr<GeomAPI_Shape> theObject,
-                       boost::shared_ptr<GeomAPI_Shape> theTool,
+                                       std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                       std::shared_ptr<GeomAPI_Shape> theObject,
+                       std::shared_ptr<GeomAPI_Shape> theTool,
                                        int theType);
 };
 
index ab5c393e65277767a9a76715b0fcc0e009e75aa0..55bc605c16f4c9f2ecdf67f510bf30268cd022a8 100644 (file)
@@ -37,23 +37,23 @@ void FeaturesPlugin_Extrusion::initAttributes()
 
 void FeaturesPlugin_Extrusion::execute()
 {
-  boost::shared_ptr<ModelAPI_AttributeSelection> aFaceRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeSelection> aFaceRef = std::dynamic_pointer_cast<
     ModelAPI_AttributeSelection>(data()->attribute(FeaturesPlugin_Extrusion::FACE_ID()));
   if (!aFaceRef)
     return;
 
-  boost::shared_ptr<GeomAPI_Shape> aFace = 
-    boost::dynamic_pointer_cast<GeomAPI_Shape>(aFaceRef->value());
+  std::shared_ptr<GeomAPI_Shape> aFace = 
+    std::dynamic_pointer_cast<GeomAPI_Shape>(aFaceRef->value());
   if (!aFace)
     return;
 
-  boost::shared_ptr<GeomAPI_Shape> aContext;
+  std::shared_ptr<GeomAPI_Shape> aContext;
   ResultPtr aContextRes = aFaceRef->context();
   if (aContextRes) {
     if (aContextRes->groupName() == ModelAPI_ResultBody::group())
-      aContext = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(aContextRes)->shape();
+      aContext = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aContextRes)->shape();
     else if (aContextRes->groupName() == ModelAPI_ResultConstruction::group())
-      aContext = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContextRes)->shape();
+      aContext = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContextRes)->shape();
   }
   if (!aContext) {
     std::string aContextError = "The selection context is bad";
@@ -65,7 +65,7 @@ void FeaturesPlugin_Extrusion::execute()
   if (data()->boolean(FeaturesPlugin_Extrusion::REVERSE_ID())->value())
     aSize = -aSize;
 
-  boost::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
+  std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
   GeomAlgoAPI_Extrusion aFeature(aFace, aSize);
   if(!aFeature.isDone()) {
     std::string aFeatureError = "Extrusion algorithm failed";  
@@ -95,9 +95,9 @@ void FeaturesPlugin_Extrusion::execute()
 
 //============================================================================
 void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature, 
-  boost::shared_ptr<ModelAPI_ResultBody> theResultBody, 
-  boost::shared_ptr<GeomAPI_Shape> theBasis,
-  boost::shared_ptr<GeomAPI_Shape> theContext)
+  std::shared_ptr<ModelAPI_ResultBody> theResultBody, 
+  std::shared_ptr<GeomAPI_Shape> theBasis,
+  std::shared_ptr<GeomAPI_Shape> theContext)
 {  
 
 
@@ -114,7 +114,7 @@ void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature,
   theResultBody->loadAndOrientGeneratedShapes(theFeature.makeShape(), theBasis, EDGE,_LATERAL_TAG, *aSubShapes);
 
   //Insert bottom face
-  boost::shared_ptr<GeomAPI_Shape> aBottomFace = theFeature.firstShape();  
+  std::shared_ptr<GeomAPI_Shape> aBottomFace = theFeature.firstShape();  
   if (!aBottomFace->isNull()) {
        if (aSubShapes->isBound(aBottomFace)) {  
                aBottomFace = aSubShapes->find(aBottomFace);            
@@ -125,7 +125,7 @@ void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature,
 
 
   //Insert top face
-  boost::shared_ptr<GeomAPI_Shape> aTopFace = theFeature.lastShape();
+  std::shared_ptr<GeomAPI_Shape> aTopFace = theFeature.lastShape();
   if (!aTopFace->isNull()) {
     if (aSubShapes->isBound(aTopFace)) {        
       aTopFace = aSubShapes->find(aTopFace);   
index 57c84efde8ef9c3f7c862f41d6efa7ae3552546a..1519682995b3e343058d0a1c86dc64a1d72461ee 100644 (file)
@@ -55,9 +55,9 @@ class FeaturesPlugin_Extrusion : public ModelAPI_Feature
   FeaturesPlugin_Extrusion();
 private:
   /// Load Naming data structure of the feature to the document
-  void LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature, boost::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                       boost::shared_ptr<GeomAPI_Shape> theBasis,
-                       boost::shared_ptr<GeomAPI_Shape> theContext);
+  void LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature, std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                       std::shared_ptr<GeomAPI_Shape> theBasis,
+                       std::shared_ptr<GeomAPI_Shape> theContext);
 };
 
 #endif
index 32c95813f68f1258d2f7b434e4226bacaefbeaa4..681479032f7c5359fec4cbd5bc425d4e9e59bb36 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <string>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 
 using namespace std;
 
index 67d8297f7baa307eb1c14caacba98ca43a264dd8..474ea1caa67fc0f0475d92afa9401837532fe66f 100644 (file)
@@ -1,7 +1,6 @@
 /* GeomAPI.i */
 %module GeomAPI
 %{
-  #include "boost/shared_ptr.hpp"
   #include "GeomAPI.h"
   #include "GeomAPI_Interface.h"
   #include "GeomAPI_Pnt.h"
 // standard definitions
 %include "typemaps.i"
 %include "std_string.i"
-//%include <std_shared_ptr.i>
-%include <boost_shared_ptr.i>
+%include "std_shared_ptr.i"
 
-// boost pointers
-// %include <boost_shared_ptr.i>
+// shared pointers
 %shared_ptr(GeomAPI_Interface)
 %shared_ptr(GeomAPI_Pnt)
 %shared_ptr(GeomAPI_Dir)
index ec84c8c3460660c9974f0f190773700aff4f613e..b381074b8de85f2a577edd5d618070880ca17a54 100644 (file)
@@ -41,7 +41,7 @@ GeomAPI_AISObject::GeomAPI_AISObject()
 {
 }
 
-void GeomAPI_AISObject::createShape(boost::shared_ptr<GeomAPI_Shape> theShape)
+void GeomAPI_AISObject::createShape(std::shared_ptr<GeomAPI_Shape> theShape)
 {
   const TopoDS_Shape& aTDS =
       (theShape && theShape->implPtr<TopoDS_Shape>()) ?
@@ -64,10 +64,10 @@ void GeomAPI_AISObject::createShape(boost::shared_ptr<GeomAPI_Shape> theShape)
     setImpl(new Handle(AIS_InteractiveObject)(new AIS_Shape(aTDS)));
 }
 
-void GeomAPI_AISObject::createDistance(boost::shared_ptr<GeomAPI_Pnt> theStartPoint,
-                                       boost::shared_ptr<GeomAPI_Pnt> theEndPoint,
-                                       boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
-                                       boost::shared_ptr<GeomAPI_Pln> thePlane, double theDistance)
+void GeomAPI_AISObject::createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
+                                       std::shared_ptr<GeomAPI_Pnt> theEndPoint,
+                                       std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
+                                       std::shared_ptr<GeomAPI_Pln> thePlane, double theDistance)
 {
   double aFlyout = 0;
   if (theFlyoutPoint) {
@@ -75,15 +75,15 @@ void GeomAPI_AISObject::createDistance(boost::shared_ptr<GeomAPI_Pnt> theStartPo
     if (theStartPoint->distance(theEndPoint) < tolerance)
       aDist = theStartPoint->distance(theFlyoutPoint);
     else {
-      boost::shared_ptr<GeomAPI_Lin> aLine = boost::shared_ptr<GeomAPI_Lin>(
+      std::shared_ptr<GeomAPI_Lin> aLine = std::shared_ptr<GeomAPI_Lin>(
           new GeomAPI_Lin(theStartPoint, theEndPoint));
       aDist = aLine->distance(theFlyoutPoint);
     }
 
-    boost::shared_ptr<GeomAPI_XYZ> aLineDir = theEndPoint->xyz()->decreased(theStartPoint->xyz());
-    boost::shared_ptr<GeomAPI_XYZ> aFOutDir = theFlyoutPoint->xyz()->decreased(
+    std::shared_ptr<GeomAPI_XYZ> aLineDir = theEndPoint->xyz()->decreased(theStartPoint->xyz());
+    std::shared_ptr<GeomAPI_XYZ> aFOutDir = theFlyoutPoint->xyz()->decreased(
         theStartPoint->xyz());
-    boost::shared_ptr<GeomAPI_XYZ> aNorm = thePlane->direction()->xyz();
+    std::shared_ptr<GeomAPI_XYZ> aNorm = thePlane->direction()->xyz();
     if (aLineDir->cross(aFOutDir)->dot(aNorm) < 0)
       aDist = -aDist;
     aFlyout = aDist;
@@ -122,11 +122,11 @@ void GeomAPI_AISObject::createDistance(boost::shared_ptr<GeomAPI_Pnt> theStartPo
   }
 }
 
-void GeomAPI_AISObject::createRadius(boost::shared_ptr<GeomAPI_Circ> theCircle,
-                                     boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
+void GeomAPI_AISObject::createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
+                                     std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
                                      double theRadius)
 {
-  boost::shared_ptr<GeomAPI_Pnt> aCenter = theCircle->center();
+  std::shared_ptr<GeomAPI_Pnt> aCenter = theCircle->center();
 
   // TODO: a bug in AIS_RadiusDimension:
   // The anchor point can't be myCirc.Location() - an exception is raised.
@@ -134,10 +134,10 @@ void GeomAPI_AISObject::createRadius(boost::shared_ptr<GeomAPI_Circ> theCircle,
   // We want to show a radius dimension starting from the circle centre and 
   // ending at the user-defined point.
   // Also, if anchor point coincides with myP2, the radius dimension is not displayed at all.
-  boost::shared_ptr<GeomAPI_Pnt> anAnchor = theCircle->project(theFlyoutPoint);
-  boost::shared_ptr<GeomAPI_XYZ> anAnchorXYZ = anAnchor->xyz();
+  std::shared_ptr<GeomAPI_Pnt> anAnchor = theCircle->project(theFlyoutPoint);
+  std::shared_ptr<GeomAPI_XYZ> anAnchorXYZ = anAnchor->xyz();
   anAnchorXYZ = anAnchorXYZ->decreased(aCenter->xyz());
-  boost::shared_ptr<GeomAPI_Dir> aDeltaDir(new GeomAPI_Dir(anAnchorXYZ));
+  std::shared_ptr<GeomAPI_Dir> aDeltaDir(new GeomAPI_Dir(anAnchorXYZ));
   const double aDelta = 1e-3;
   anAnchor->setX(anAnchor->x() + aDelta * aDeltaDir->x());
   anAnchor->setY(anAnchor->y() + aDelta * aDeltaDir->y());
@@ -171,10 +171,10 @@ void GeomAPI_AISObject::createRadius(boost::shared_ptr<GeomAPI_Circ> theCircle,
   }
 }
 
-void GeomAPI_AISObject::createParallel(boost::shared_ptr<GeomAPI_Shape> theLine1,
-                                       boost::shared_ptr<GeomAPI_Shape> theLine2,
-                                       boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
-                                       boost::shared_ptr<GeomAPI_Pln> thePlane)
+void GeomAPI_AISObject::createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
+                                       std::shared_ptr<GeomAPI_Shape> theLine2,
+                                       std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
+                                       std::shared_ptr<GeomAPI_Pln> thePlane)
 {
   Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
@@ -198,9 +198,9 @@ void GeomAPI_AISObject::createParallel(boost::shared_ptr<GeomAPI_Shape> theLine1
   }
 }
 
-void GeomAPI_AISObject::createPerpendicular(boost::shared_ptr<GeomAPI_Shape> theLine1,
-                                            boost::shared_ptr<GeomAPI_Shape> theLine2,
-                                            boost::shared_ptr<GeomAPI_Pln> thePlane)
+void GeomAPI_AISObject::createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
+                                            std::shared_ptr<GeomAPI_Shape> theLine2,
+                                            std::shared_ptr<GeomAPI_Pln> thePlane)
 {
   Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
@@ -222,8 +222,8 @@ void GeomAPI_AISObject::createPerpendicular(boost::shared_ptr<GeomAPI_Shape> the
 }
 
 
-void GeomAPI_AISObject::createFixed(boost::shared_ptr<GeomAPI_Shape> theShape,
-                                    boost::shared_ptr<GeomAPI_Pln> thePlane)
+void GeomAPI_AISObject::createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
+                                    std::shared_ptr<GeomAPI_Pln> thePlane)
 {
   Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
index 0c8034d0dd8038875e1baefb3053c96bf7c03bb3..97b4688e02f289d43fd5c64d22cb82396c369431 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <GeomAPI_Interface.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Circ;
 class GeomAPI_Lin;
@@ -35,7 +35,7 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
   GeomAPI_AISObject();
 
   /// \brief Creates AIS_Shape object using specified shape
-  void createShape(boost::shared_ptr<GeomAPI_Shape> theShape);
+  void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
 
   /** \brief Creates AIS_LengthDimension object
    *  \param[in] theStartPoint  first point for dimension
@@ -44,18 +44,18 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] thePlane       the plane which contains all points above
    *  \param[in] theDistance    value of the distance to be shown
    */
-  void createDistance(boost::shared_ptr<GeomAPI_Pnt> theStartPoint,
-                      boost::shared_ptr<GeomAPI_Pnt> theEndPoint,
-                      boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
-                      boost::shared_ptr<GeomAPI_Pln> thePlane, double theDistance);
+  void createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
+                      std::shared_ptr<GeomAPI_Pnt> theEndPoint,
+                      std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
+                      std::shared_ptr<GeomAPI_Pln> thePlane, double theDistance);
 
   /** \brief Creates AIS_RadiusDimension object
    *  \param[in] theCircle      the radius is created for this circle
    *  \param[in] theFlyoutPoint the flyout of dimension
    *  \param[in] theRadius      value of the radius to be shown
    */
-  void createRadius(boost::shared_ptr<GeomAPI_Circ> theCircle,
-                    boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
+  void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
+                    std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
 
   /** \brief Creates AIS_ParallelRelation object for two lines
    *  \param[in] theLine1       first parallel line
@@ -63,26 +63,26 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] theFlyoutPoint the flyout point for relation
    *  \param[in] thePlane       the plane which contains the lines
    */
-  void createParallel(boost::shared_ptr<GeomAPI_Shape> theLine1,
-                      boost::shared_ptr<GeomAPI_Shape> theLine2,
-                      boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
-                      boost::shared_ptr<GeomAPI_Pln> thePlane);
+  void createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
+                      std::shared_ptr<GeomAPI_Shape> theLine2,
+                      std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
+                      std::shared_ptr<GeomAPI_Pln> thePlane);
 
   /** \brief Creates AIS_PerpendicularRelation object for two lines
    *  \param[in] theLine1       first parallel line
    *  \param[in] theLine2       second parallel line
    *  \param[in] thePlane       the plane which contains the lines
    */
-  void createPerpendicular(boost::shared_ptr<GeomAPI_Shape> theLine1,
-                           boost::shared_ptr<GeomAPI_Shape> theLine2,
-                           boost::shared_ptr<GeomAPI_Pln> thePlane);
+  void createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
+                           std::shared_ptr<GeomAPI_Shape> theLine2,
+                           std::shared_ptr<GeomAPI_Pln> thePlane);
 
   /** \brief Creates AIS_FixedRelation object for an object
    *  \param[in] theShape       the object
    *  \param[in] thePlane       the plane which contains the lines
    */
-  void createFixed(boost::shared_ptr<GeomAPI_Shape> theShape,
-                   boost::shared_ptr<GeomAPI_Pln> thePlane);
+  void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
+                   std::shared_ptr<GeomAPI_Pln> thePlane);
 
   /** \brief Assigns the color for the shape
    *  \param[in] theColor index of the color
@@ -104,7 +104,7 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
 };
 
 //! Pointer on attribute object
-typedef boost::shared_ptr<GeomAPI_AISObject> AISObjectPtr;
+typedef std::shared_ptr<GeomAPI_AISObject> AISObjectPtr;
 
 #endif
 
index 566824e06007ddc6144f6f5127eed047de547f73..e2b46853b956a189e76321897a07231733351736 100644 (file)
@@ -21,16 +21,16 @@ static gp_Circ* newCirc(const gp_Pnt& theCenter, const gp_Dir& theDir, const dou
   return new gp_Circ(gp_Ax2(theCenter, theDir), theRadius);
 }
 
-GeomAPI_Circ::GeomAPI_Circ(const boost::shared_ptr<GeomAPI_Pnt>& theCenter,
-                           const boost::shared_ptr<GeomAPI_Dir>& theDir, double theRadius)
+GeomAPI_Circ::GeomAPI_Circ(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
+                           const std::shared_ptr<GeomAPI_Dir>& theDir, double theRadius)
     : GeomAPI_Interface(newCirc(theCenter->impl<gp_Pnt>(), theDir->impl<gp_Dir>(), theRadius))
 {
 }
 
-const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Circ::project(
-    const boost::shared_ptr<GeomAPI_Pnt>& thePoint) const
+const std::shared_ptr<GeomAPI_Pnt> GeomAPI_Circ::project(
+    const std::shared_ptr<GeomAPI_Pnt>& thePoint) const
 {
-  boost::shared_ptr<GeomAPI_Pnt> aResult;
+  std::shared_ptr<GeomAPI_Pnt> aResult;
   if (!MY_CIRC)
   return aResult;
 
@@ -47,7 +47,7 @@ const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Circ::project(
       aDistance = aNewPoint.Distance(aPoint);
       if (!aMinDistance || aDistance < aMinDistance) {
         aMinDistance = aDistance;
-        aResult = boost::shared_ptr<GeomAPI_Pnt>(
+        aResult = std::shared_ptr<GeomAPI_Pnt>(
             new GeomAPI_Pnt(aNewPoint.X(), aNewPoint.Y(), aNewPoint.Z()));
       }
     }
@@ -55,10 +55,10 @@ const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Circ::project(
   return aResult;
 }
 
-const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Circ::center() const
+const std::shared_ptr<GeomAPI_Pnt> GeomAPI_Circ::center() const
 {
   const gp_Pnt& aCenter = MY_CIRC->Location();
-  return boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aCenter.X(), aCenter.Y(), aCenter.Z()));
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aCenter.X(), aCenter.Y(), aCenter.Z()));
 }
 
 double GeomAPI_Circ::radius() const
index 37f8bfaf2299cd8507b28c4e47d364b2443c96b2..8036faf5600cd408b1c555b017142fc315456ecd 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Circ_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Pnt;
 class GeomAPI_Dir;
@@ -20,18 +20,18 @@ class GEOMAPI_EXPORT GeomAPI_Circ : public GeomAPI_Interface
 {
  public:
   /// Creation of circle defined by center point, direction and circle radius
-  GeomAPI_Circ(const boost::shared_ptr<GeomAPI_Pnt>& theCenter,
-               const boost::shared_ptr<GeomAPI_Dir>& theDir, double theRadius);
+  GeomAPI_Circ(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
+               const std::shared_ptr<GeomAPI_Dir>& theDir, double theRadius);
 
   /// Return center of the circle
-  const boost::shared_ptr<GeomAPI_Pnt> center() const;
+  const std::shared_ptr<GeomAPI_Pnt> center() const;
 
   /// Return radius of the circle
   double radius() const;
 
   /// Project point on circle
-  const boost::shared_ptr<GeomAPI_Pnt> project(
-      const boost::shared_ptr<GeomAPI_Pnt>& thePoint) const;
+  const std::shared_ptr<GeomAPI_Pnt> project(
+      const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
 };
 
 #endif
index d5a67b8f81ec27ffa666ca3400702d061d1d8b71..0a7a9a01bd77c3848d9582b0e2e06f502e2af92e 100644 (file)
@@ -41,25 +41,25 @@ static gp_Circ2d* newCirc2d(const double theCenterX, const double theCenterY,
   return newCirc2d(theCenterX, theCenterY, aDir, aRadius);
 }
 
-GeomAPI_Circ2d::GeomAPI_Circ2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                               const boost::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint)
+GeomAPI_Circ2d::GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                               const std::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint)
     : GeomAPI_Interface(
         newCirc2d(theCenter->x(), theCenter->y(), theCirclePoint->x(), theCirclePoint->y()))
 {
 }
 
-GeomAPI_Circ2d::GeomAPI_Circ2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                               const boost::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius)
+GeomAPI_Circ2d::GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                               const std::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius)
     : GeomAPI_Interface(
         newCirc2d(theCenter->x(), theCenter->y(), theDir->impl<gp_Dir2d>(), theRadius))
 {
 
 }
 
-const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Circ2d::project(
-    const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
+const std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Circ2d::project(
+    const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
 {
-  boost::shared_ptr<GeomAPI_Pnt2d> aResult;
+  std::shared_ptr<GeomAPI_Pnt2d> aResult;
   if (!MY_CIRC2D)
     return aResult;
 
@@ -72,22 +72,22 @@ const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Circ2d::project(
 
   if (Abs(aDist - MY_CIRC2D->Radius()) < Precision::Confusion()) {
     // Point on the circle
-    aResult = boost::shared_ptr<GeomAPI_Pnt2d>(
+    aResult = std::shared_ptr<GeomAPI_Pnt2d>(
         new GeomAPI_Pnt2d(thePoint->x(), thePoint->y()));
   } else {
     gp_Dir2d aDir(aPoint.XY() - aCenter.XY());
     gp_XY aNewPoint = aCenter.XY() + aDir.XY() * MY_CIRC2D->Radius();
-    aResult = boost::shared_ptr<GeomAPI_Pnt2d>(
+    aResult = std::shared_ptr<GeomAPI_Pnt2d>(
         new GeomAPI_Pnt2d(aNewPoint.X(), aNewPoint.Y()));
   }
 
   return aResult;
 }
 
-const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Circ2d::center() const
+const std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Circ2d::center() const
 {
   const gp_Pnt2d& aCenter = MY_CIRC2D->Location();
-  return boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aCenter.X(), aCenter.Y()));
+  return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aCenter.X(), aCenter.Y()));
 }
 
 double GeomAPI_Circ2d::radius() const
index 58a292c162dd49fec0ce435562a1f5be72526d52..6a2627baf59465085ce25ed7bdfa95d99734053b 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Circ2d_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Pnt2d;
 class GeomAPI_Dir2d;
@@ -20,22 +20,22 @@ class GEOMAPI_EXPORT GeomAPI_Circ2d : public GeomAPI_Interface
 {
  public:
   /// Creation of circle defined by center point and circle radius
-  GeomAPI_Circ2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                 const boost::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint);
+  GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                 const std::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint);
 
   /// Creation of circle defined by center point, direction and circle radius
-  GeomAPI_Circ2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                 const boost::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius);
+  GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                 const std::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius);
 
   /// Return center of the circle
-  const boost::shared_ptr<GeomAPI_Pnt2d> center() const;
+  const std::shared_ptr<GeomAPI_Pnt2d> center() const;
 
   /// Return radius of the circle
   double radius() const;
 
   /// Project point on line
-  const boost::shared_ptr<GeomAPI_Pnt2d> project(
-      const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
+  const std::shared_ptr<GeomAPI_Pnt2d> project(
+      const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
 };
 
 #endif
index 53a84581054f743f48e1bb1dafadb93e72b5fde6..d6a7280c644b74eaf3aac23f0303925558300cfb 100644 (file)
@@ -19,7 +19,7 @@ GeomAPI_Curve::GeomAPI_Curve()
 {
 }
 
-GeomAPI_Curve::GeomAPI_Curve(const boost::shared_ptr<GeomAPI_Shape>& theShape)
+GeomAPI_Curve::GeomAPI_Curve(const std::shared_ptr<GeomAPI_Shape>& theShape)
   : GeomAPI_Interface(new Handle_Geom_Curve()) // initially it is null
 {
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
index e4f494875c029aec2065b8c6758908886d791ff9..f09f1d375e22af89b48a0d4c43dfda11b9002126 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Curve_H_
 
 #include <GeomAPI_Shape.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /**\class GeomAPI_Curve
  * \ingroup DataModel
@@ -20,7 +20,7 @@ class GEOMAPI_EXPORT GeomAPI_Curve : public GeomAPI_Interface
   GeomAPI_Curve();
 
   /// Creates a curve from the shape (edge)
-  GeomAPI_Curve(const boost::shared_ptr<GeomAPI_Shape>& theShape);
+  GeomAPI_Curve(const std::shared_ptr<GeomAPI_Shape>& theShape);
 
   /// Returns true if curve is not initialized
   bool isNull() const;
index 56002d3a58018623bd1bc2895313e9f52124003b..c20e9fd89161620b560adca7347eb54eecfa5259 100644 (file)
@@ -19,7 +19,7 @@ void GeomAPI_DataMapOfShapeShape::clear()
 }
 
 /// Adds the Key <K> to  the Map <me>  with  the  Item. Returns True  if the Key  was not already in the map
-bool GeomAPI_DataMapOfShapeShape::bind (boost::shared_ptr<GeomAPI_Shape> theKey, boost::shared_ptr<GeomAPI_Shape> theItem)
+bool GeomAPI_DataMapOfShapeShape::bind (std::shared_ptr<GeomAPI_Shape> theKey, std::shared_ptr<GeomAPI_Shape> theItem)
 {
   bool flag(false);
   if(implPtr<TopTools_DataMapOfShapeShape>()->Bind(theKey->impl<TopoDS_Shape>(), theItem->impl<TopoDS_Shape>()))
@@ -28,7 +28,7 @@ bool GeomAPI_DataMapOfShapeShape::bind (boost::shared_ptr<GeomAPI_Shape> theKey,
 }
 
 /// Returns true if theKey is stored  in the map.
-bool GeomAPI_DataMapOfShapeShape::isBound (boost::shared_ptr<GeomAPI_Shape> theKey)
+bool GeomAPI_DataMapOfShapeShape::isBound (std::shared_ptr<GeomAPI_Shape> theKey)
 {
   bool flag(false);
   if(impl<TopTools_DataMapOfShapeShape>().IsBound(theKey->impl<TopoDS_Shape>()))
@@ -37,15 +37,15 @@ bool GeomAPI_DataMapOfShapeShape::isBound (boost::shared_ptr<GeomAPI_Shape> theK
 }
 
 /// Returns  the Item stored  with the Key in the Map. To be checked before with isBound()
-const boost::shared_ptr<GeomAPI_Shape> GeomAPI_DataMapOfShapeShape::find(boost::shared_ptr<GeomAPI_Shape> theKey)
+const std::shared_ptr<GeomAPI_Shape> GeomAPI_DataMapOfShapeShape::find(std::shared_ptr<GeomAPI_Shape> theKey)
 {
-  boost::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());  
+  std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());  
   aShape->setImpl(new TopoDS_Shape(impl<TopTools_DataMapOfShapeShape>().Find(theKey->impl<TopoDS_Shape>())));
   return aShape;
 }  
   
 /// Removes the Key from the  map. Returns true if the Key was in the Map
-bool GeomAPI_DataMapOfShapeShape::unBind(boost::shared_ptr<GeomAPI_Shape> theKey)
+bool GeomAPI_DataMapOfShapeShape::unBind(std::shared_ptr<GeomAPI_Shape> theKey)
 {
   bool flag(false);
   if(implPtr<TopTools_DataMapOfShapeShape>()->UnBind(theKey->impl<TopoDS_Shape>()))
index 20b63903afe1b72998522857b96d60d7fcf4eaf4..94a35b780ea9c087acf1ac4b39a07d3da7681a84 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef GeomAPI_DataMapOfShapeShape_H_
 #define GeomAPI_DataMapOfShapeShape_H_
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <GeomAPI_Interface.h>
 
 class GeomAPI_Pnt;
@@ -26,16 +26,16 @@ class GEOMAPI_EXPORT GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
   void clear();
 
   /// Adds the Key <K> to  the Map <me>  with  the  Item. Returns True  if the Key  was not already in the map
-  bool bind (boost::shared_ptr<GeomAPI_Shape> theKey, boost::shared_ptr<GeomAPI_Shape> theItem);
+  bool bind (std::shared_ptr<GeomAPI_Shape> theKey, std::shared_ptr<GeomAPI_Shape> theItem);
 
   /// Returns true if theKey is stored  in the map.
-  bool isBound (boost::shared_ptr<GeomAPI_Shape> theKey);
+  bool isBound (std::shared_ptr<GeomAPI_Shape> theKey);
 
   /// Returns  the Item stored  with the Key in the Map.
-  const boost::shared_ptr<GeomAPI_Shape> find(boost::shared_ptr<GeomAPI_Shape> theKey);  
+  const std::shared_ptr<GeomAPI_Shape> find(std::shared_ptr<GeomAPI_Shape> theKey);  
   
   /// Removes the Key from the  map. Returns true if the Key was in the Map
-  bool unBind(boost::shared_ptr<GeomAPI_Shape> theKey);
+  bool unBind(std::shared_ptr<GeomAPI_Shape> theKey);
 
   /// Destructor
   ~GeomAPI_DataMapOfShapeShape();
index c1b88a78d5e89dbed12f721cf6e84317e8ce5c07..c81efd26e98b61f382454d744fe0171bf63d5e1d 100644 (file)
@@ -14,7 +14,7 @@ GeomAPI_Dir::GeomAPI_Dir(const double theX, const double theY, const double theZ
 {
 }
 
-GeomAPI_Dir::GeomAPI_Dir(const boost::shared_ptr<GeomAPI_XYZ>& theCoords)
+GeomAPI_Dir::GeomAPI_Dir(const std::shared_ptr<GeomAPI_XYZ>& theCoords)
     : GeomAPI_Interface(new gp_Dir(theCoords->x(), theCoords->y(), theCoords->z()))
 {
 }
@@ -34,20 +34,20 @@ double GeomAPI_Dir::z() const
   return MY_DIR->Z();
 }
 
-const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_Dir::xyz()
+const std::shared_ptr<GeomAPI_XYZ> GeomAPI_Dir::xyz()
 {
-  return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(MY_DIR->X(), MY_DIR->Y(), MY_DIR->Z()));
+  return std::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(MY_DIR->X(), MY_DIR->Y(), MY_DIR->Z()));
 }
 
-double GeomAPI_Dir::dot(const boost::shared_ptr<GeomAPI_Dir>& theArg) const
+double GeomAPI_Dir::dot(const std::shared_ptr<GeomAPI_Dir>& theArg) const
 {
   return MY_DIR->Dot(theArg->impl<gp_Dir>());
 }
 
-const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_Dir::cross(
-    const boost::shared_ptr<GeomAPI_Dir>& theArg) const
+const std::shared_ptr<GeomAPI_XYZ> GeomAPI_Dir::cross(
+    const std::shared_ptr<GeomAPI_Dir>& theArg) const
 {
   gp_XYZ aResult = MY_DIR->XYZ().Crossed(theArg->impl<gp_Dir>().XYZ());
-  return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(aResult.X(), aResult.Y(), aResult.Z()));
+  return std::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(aResult.X(), aResult.Y(), aResult.Z()));
 }
 
index 3d666af67e09c9ccb2973b51c245dbe5650e05af..12f3b0b3fbb45c16900009dab8e5ca15be119533 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Dir_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_XYZ;
 
@@ -21,7 +21,7 @@ class GEOMAPI_EXPORT GeomAPI_Dir : public GeomAPI_Interface
   /// Creation of direction by coordinates
   GeomAPI_Dir(const double theX, const double theY, const double theZ);
   /// Creation of direction by coordinates
-  GeomAPI_Dir(const boost::shared_ptr<GeomAPI_XYZ>& theCoords);
+  GeomAPI_Dir(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
 
   /// returns X coordinate
   double x() const;
@@ -31,12 +31,12 @@ class GEOMAPI_EXPORT GeomAPI_Dir : public GeomAPI_Interface
   double z() const;
 
   /// returns coordinates of the direction
-  const boost::shared_ptr<GeomAPI_XYZ> xyz();
+  const std::shared_ptr<GeomAPI_XYZ> xyz();
 
   /// result is a scalar product of directions
-  double dot(const boost::shared_ptr<GeomAPI_Dir>& theArg) const;
+  double dot(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
   /// result is a cross product of two directions
-  const boost::shared_ptr<GeomAPI_XYZ> cross(const boost::shared_ptr<GeomAPI_Dir>& theArg) const;
+  const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
 };
 
 #endif
index e3089d8b95afb74937a5d45077f26876c24c1d73..b7dcfc96089ac2301a5ab745bd226d81534c0c43 100644 (file)
@@ -14,7 +14,7 @@ GeomAPI_Dir2d::GeomAPI_Dir2d(const double theX, const double theY)
 {
 }
 
-GeomAPI_Dir2d::GeomAPI_Dir2d(const boost::shared_ptr<GeomAPI_XY>& theCoords)
+GeomAPI_Dir2d::GeomAPI_Dir2d(const std::shared_ptr<GeomAPI_XY>& theCoords)
     : GeomAPI_Interface(new gp_Dir2d(theCoords->x(), theCoords->y()))
 {
 }
@@ -29,17 +29,17 @@ double GeomAPI_Dir2d::y() const
   return MY_DIR->Y();
 }
 
-const boost::shared_ptr<GeomAPI_XY> GeomAPI_Dir2d::xy()
+const std::shared_ptr<GeomAPI_XY> GeomAPI_Dir2d::xy()
 {
-  return boost::shared_ptr<GeomAPI_XY>(new GeomAPI_XY(MY_DIR->X(), MY_DIR->Y()));
+  return std::shared_ptr<GeomAPI_XY>(new GeomAPI_XY(MY_DIR->X(), MY_DIR->Y()));
 }
 
-double GeomAPI_Dir2d::dot(const boost::shared_ptr<GeomAPI_Dir2d>& theArg) const
+double GeomAPI_Dir2d::dot(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const
 {
   return MY_DIR->Dot(theArg->impl<gp_Dir2d>());
 }
 
-double GeomAPI_Dir2d::cross(const boost::shared_ptr<GeomAPI_Dir2d>& theArg) const
+double GeomAPI_Dir2d::cross(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const
 {
   return MY_DIR->XY().Crossed(theArg->impl<gp_Dir2d>().XY());
 }
index 906e1af0f6a82ce44a22c37e8ba81582ca231780..3453f1247cefd065c1d13f876f53cc0e8b8d5aa3 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Dir2d_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_XY;
 
@@ -21,7 +21,7 @@ class GEOMAPI_EXPORT GeomAPI_Dir2d : public GeomAPI_Interface
   /// Creation of direction by coordinates
   GeomAPI_Dir2d(const double theX, const double theY);
   /// Creation of direction by coordinates
-  GeomAPI_Dir2d(const boost::shared_ptr<GeomAPI_XY>& theCoords);
+  GeomAPI_Dir2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
 
   /// returns X coordinate
   double x() const;
@@ -29,12 +29,12 @@ class GEOMAPI_EXPORT GeomAPI_Dir2d : public GeomAPI_Interface
   double y() const;
 
   /// returns coordinates of the direction
-  const boost::shared_ptr<GeomAPI_XY> xy();
+  const std::shared_ptr<GeomAPI_XY> xy();
 
   /// result is a scalar product of directions
-  double dot(const boost::shared_ptr<GeomAPI_Dir2d>& theArg) const;
+  double dot(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
   /// result is a cross product of two directions
-  double cross(const boost::shared_ptr<GeomAPI_Dir2d>& theArg) const;
+  double cross(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
 };
 
 #endif
index 5c61a94a1360d4588b652f5c5ac26c84115ba8a8..5e455f9f3dd3f3bd426fa0f85999859c4bac463f 100644 (file)
@@ -22,7 +22,7 @@ GeomAPI_Edge::GeomAPI_Edge()
 {
 }
 
-GeomAPI_Edge::GeomAPI_Edge(const boost::shared_ptr<GeomAPI_Shape>& theShape)
+GeomAPI_Edge::GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape)
 {
   if (!theShape->isNull() && theShape->isEdge()) {
     setImpl(new TopoDS_Shape(theShape->impl<TopoDS_Shape>()));
@@ -59,27 +59,27 @@ bool GeomAPI_Edge::isArc() const
   return false;
 }
 
-boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Edge::firstPoint()
+std::shared_ptr<GeomAPI_Pnt> GeomAPI_Edge::firstPoint()
 {
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Edge*>(this)->impl<TopoDS_Shape>();
   double aFirst, aLast;
   Handle(Geom_Curve) aCurve = BRep_Tool::Curve((const TopoDS_Edge&)aShape, aFirst, aLast);
   gp_Pnt aPoint;
   aCurve->D0(aFirst, aPoint);
-  return boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aPoint.X(), aPoint.Y(), aPoint.Z()));
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aPoint.X(), aPoint.Y(), aPoint.Z()));
 }
 
-boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Edge::lastPoint()
+std::shared_ptr<GeomAPI_Pnt> GeomAPI_Edge::lastPoint()
 {
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Edge*>(this)->impl<TopoDS_Shape>();
   double aFirst, aLast;
   Handle(Geom_Curve) aCurve = BRep_Tool::Curve((const TopoDS_Edge&)aShape, aFirst, aLast);
   gp_Pnt aPoint;
   aCurve->D0(aLast, aPoint);
-  return boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aPoint.X(), aPoint.Y(), aPoint.Z()));
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aPoint.X(), aPoint.Y(), aPoint.Z()));
 }
 
-boost::shared_ptr<GeomAPI_Circ> GeomAPI_Edge::circle()
+std::shared_ptr<GeomAPI_Circ> GeomAPI_Edge::circle()
 {
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Edge*>(this)->impl<TopoDS_Shape>();
   double aFirst, aLast;
@@ -88,17 +88,17 @@ boost::shared_ptr<GeomAPI_Circ> GeomAPI_Edge::circle()
     Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast(aCurve);
     if (aCirc) {
       gp_Pnt aLoc = aCirc->Location();
-      boost::shared_ptr<GeomAPI_Pnt> aCenter(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
+      std::shared_ptr<GeomAPI_Pnt> aCenter(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
       gp_Dir anAxis = aCirc->Axis().Direction();
-      boost::shared_ptr<GeomAPI_Dir> aDir(new GeomAPI_Dir(anAxis.X(), anAxis.Y(), anAxis.Z()));
-      return boost::shared_ptr<GeomAPI_Circ>(new GeomAPI_Circ(aCenter, aDir, aCirc->Radius()));
+      std::shared_ptr<GeomAPI_Dir> aDir(new GeomAPI_Dir(anAxis.X(), anAxis.Y(), anAxis.Z()));
+      return std::shared_ptr<GeomAPI_Circ>(new GeomAPI_Circ(aCenter, aDir, aCirc->Radius()));
     }
   }
-  return boost::shared_ptr<GeomAPI_Circ>(); // not circle
+  return std::shared_ptr<GeomAPI_Circ>(); // not circle
 }
 
 
-bool GeomAPI_Edge::isEqual(boost::shared_ptr<GeomAPI_Shape> theEdge)
+bool GeomAPI_Edge::isEqual(std::shared_ptr<GeomAPI_Shape> theEdge)
 {
   const TopoDS_Shape& aMyShape = const_cast<GeomAPI_Edge*>(this)->impl<TopoDS_Shape>();
   const TopoDS_Shape& aInShape = theEdge->impl<TopoDS_Shape>();
index ea4be9ef62f0aebc8ba02769f4dc99b5321d7c85..1ecf750786be277173b77f93477964ba441a80dd 100644 (file)
@@ -22,7 +22,7 @@ public:
    GeomAPI_Edge();
 
    /// Creation of edge by the edge-shape
-   GeomAPI_Edge(const boost::shared_ptr<GeomAPI_Shape>& theShape);
+   GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
 
   /// Verifies that the edge is a line
   bool isLine() const;
@@ -34,16 +34,16 @@ public:
   bool isArc() const;
 
   /// Returns the first vertex coordinates of the edge 
-  boost::shared_ptr<GeomAPI_Pnt> firstPoint();
+  std::shared_ptr<GeomAPI_Pnt> firstPoint();
 
   /// Returns the Last vertex coordinates of the edge 
-  boost::shared_ptr<GeomAPI_Pnt> lastPoint();
+  std::shared_ptr<GeomAPI_Pnt> lastPoint();
 
   /// Returns a circle if edge is based on the cirsle curve
-  boost::shared_ptr<GeomAPI_Circ> circle();
+  std::shared_ptr<GeomAPI_Circ> circle();
 
   /// Returns true if the current edge is geometrically equal to the given edge
-  bool isEqual(boost::shared_ptr<GeomAPI_Shape> theEdge);
+  bool isEqual(std::shared_ptr<GeomAPI_Shape> theEdge);
 };
 
 #endif
index 34868048a92877e79b8617abb5ad85bba607c8c1..8f9a6d8d34d994cc6a3e6911f9100d109f0837b6 100644 (file)
@@ -19,6 +19,6 @@ class GeomAPI_IPresentable
   virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious) = 0;
 };
 
-typedef boost::shared_ptr<GeomAPI_IPresentable> GeomPresentablePtr;
+typedef std::shared_ptr<GeomAPI_IPresentable> GeomPresentablePtr;
 
 #endif
index 58095f0e8f1432d4b10086ad5a48634549da044d..770d7175f0230fc7ea6e8576836db182bb212749 100644 (file)
@@ -33,23 +33,23 @@ GeomAPI_Lin::GeomAPI_Lin(const double theStartX, const double theStartY, const d
 {
 }
 
-GeomAPI_Lin::GeomAPI_Lin(const boost::shared_ptr<GeomAPI_Pnt>& theStart,
-                         const boost::shared_ptr<GeomAPI_Pnt>& theEnd)
+GeomAPI_Lin::GeomAPI_Lin(const std::shared_ptr<GeomAPI_Pnt>& theStart,
+                         const std::shared_ptr<GeomAPI_Pnt>& theEnd)
     : GeomAPI_Interface(
         newLine(theStart->x(), theStart->y(), theStart->z(), theEnd->x(), theEnd->y(), theEnd->z()))
 {
 }
 
-double GeomAPI_Lin::distance(const boost::shared_ptr<GeomAPI_Pnt>& thePoint) const
+double GeomAPI_Lin::distance(const std::shared_ptr<GeomAPI_Pnt>& thePoint) const
 {
   return MY_LIN->Distance(thePoint->impl<gp_Pnt>());
 }
 
-const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Lin::intersect(
-    const boost::shared_ptr<GeomAPI_Lin>& theLine) const
+const std::shared_ptr<GeomAPI_Pnt> GeomAPI_Lin::intersect(
+    const std::shared_ptr<GeomAPI_Lin>& theLine) const
 {
   if (MY_LIN->SquareDistance(theLine->impl<gp_Lin>()) > Precision::Confusion())
-  return boost::shared_ptr<GeomAPI_Pnt>();
+  return std::shared_ptr<GeomAPI_Pnt>();
 
   const gp_Dir& aDir1 = MY_LIN->Direction();
   const gp_Dir& aDir2 = theLine->impl<gp_Lin>().Direction();
@@ -61,16 +61,16 @@ const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Lin::intersect(
 
   IntAna2d_AnaIntersection anInter(aPrjLine1, aPrjLine1);
   if (!anInter.IsDone() || anInter.IsEmpty())
-  return boost::shared_ptr<GeomAPI_Pnt>();
+  return std::shared_ptr<GeomAPI_Pnt>();
   const gp_Pnt2d& anIntPnt2d = anInter.Point(0).Value();
   gp_Pnt aResult = ElSLib::Value(anIntPnt2d.X(), anIntPnt2d.Y(), aPlane);
 
-  return boost::shared_ptr<GeomAPI_Pnt>(
+  return std::shared_ptr<GeomAPI_Pnt>(
   new GeomAPI_Pnt(aResult.X(), aResult.Y(), aResult.Z()));
 }
 
-const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Lin::project(
-    const boost::shared_ptr<GeomAPI_Pnt>& thePoint) const
+const std::shared_ptr<GeomAPI_Pnt> GeomAPI_Lin::project(
+    const std::shared_ptr<GeomAPI_Pnt>& thePoint) const
 {
   const gp_XYZ& aDir = MY_LIN->Direction().XYZ();
   const gp_XYZ& aLoc = MY_LIN->Location().XYZ();
@@ -78,6 +78,6 @@ const boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Lin::project(
   double aParam = aDir.Dot(aPnt - aLoc);
 
   gp_XYZ aResult = aPnt + aDir * aParam;
-  return boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aResult.X(), aResult.Y(), aResult.Z()));
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aResult.X(), aResult.Y(), aResult.Z()));
 }
 
index 69d1ba48a1c2a432fbb5395cbd968de87452276f..b6b3cca5af8a47c9e5b245a3c55b3fd5e6a9bf1a 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Lin_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Pnt;
 
@@ -22,17 +22,17 @@ class GEOMAPI_EXPORT GeomAPI_Lin : public GeomAPI_Interface
   GeomAPI_Lin(const double theStartX, const double theStartY, const double theStartZ,
               const double theEndX, const double theEndY, const double theEndZ);
   /// Creation of line defined by start and end points
-  GeomAPI_Lin(const boost::shared_ptr<GeomAPI_Pnt>& theStart,
-              const boost::shared_ptr<GeomAPI_Pnt>& theEnd);
+  GeomAPI_Lin(const std::shared_ptr<GeomAPI_Pnt>& theStart,
+              const std::shared_ptr<GeomAPI_Pnt>& theEnd);
 
   /// Distance between two points
-  double distance(const boost::shared_ptr<GeomAPI_Pnt>& thePoint) const;
+  double distance(const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
   /// Intersection of two lines
-  const boost::shared_ptr<GeomAPI_Pnt> intersect(
-      const boost::shared_ptr<GeomAPI_Lin>& theLine) const;
+  const std::shared_ptr<GeomAPI_Pnt> intersect(
+      const std::shared_ptr<GeomAPI_Lin>& theLine) const;
   /// Project point on line
-  const boost::shared_ptr<GeomAPI_Pnt> project(
-      const boost::shared_ptr<GeomAPI_Pnt>& thePoint) const;
+  const std::shared_ptr<GeomAPI_Pnt> project(
+      const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
 };
 
 #endif
index 929cff9f84d29ad8a48a9c0c70b22c3ec18e4c25..a59c5b4ea0fa801faa8ba7eb54ff97e3fb6afecf 100644 (file)
@@ -28,29 +28,29 @@ GeomAPI_Lin2d::GeomAPI_Lin2d(const double theStartX, const double theStartY, con
 {
 }
 
-GeomAPI_Lin2d::GeomAPI_Lin2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theStart,
-                             const boost::shared_ptr<GeomAPI_Pnt2d>& theEnd)
+GeomAPI_Lin2d::GeomAPI_Lin2d(const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
+                             const std::shared_ptr<GeomAPI_Pnt2d>& theEnd)
     : GeomAPI_Interface(newLine2d(theStart->x(), theStart->y(), theEnd->x(), theEnd->y()))
 {
 }
 
-double GeomAPI_Lin2d::distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const
+double GeomAPI_Lin2d::distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const
 {
   return MY_LIN2D->Distance(theOther->impl<gp_Pnt2d>());
 }
 
-const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::intersect(
-    const boost::shared_ptr<GeomAPI_Lin2d>& theLine) const
+const std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::intersect(
+    const std::shared_ptr<GeomAPI_Lin2d>& theLine) const
 {
   IntAna2d_AnaIntersection anInter(*MY_LIN2D, theLine->impl<gp_Lin2d>());
   if (!anInter.IsDone() || anInter.IsEmpty())
-  return boost::shared_ptr<GeomAPI_Pnt2d>();
+  return std::shared_ptr<GeomAPI_Pnt2d>();
   const gp_Pnt2d& aResult = anInter.Point(1).Value();
-  return boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aResult.X(), aResult.Y()));
+  return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aResult.X(), aResult.Y()));
 }
 
-const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::project(
-    const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
+const std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::project(
+    const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
 {
   const gp_XY& aDir = MY_LIN2D->Direction().XY();
   const gp_XY& aLoc = MY_LIN2D->Location().XY();
@@ -58,10 +58,10 @@ const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::project(
   double aParam = aDir.Dot(aPnt - aLoc);
 
   gp_XY aResult = aLoc + aDir * aParam;
-  return boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aResult.X(), aResult.Y()));
+  return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aResult.X(), aResult.Y()));
 }
 
-bool GeomAPI_Lin2d::isRight(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
+bool GeomAPI_Lin2d::isRight(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
 {
   const gp_XY& aDir = MY_LIN2D->Direction().XY();
   const gp_XY& aLoc = MY_LIN2D->Location().XY();
@@ -71,7 +71,7 @@ bool GeomAPI_Lin2d::isRight(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) co
 }
 
 
-boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::shiftedLocation(double theShift) const
+std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::shiftedLocation(double theShift) const
 {
   gp_Vec2d aVec = MY_LIN2D->Direction();
   aVec = aVec.GetNormal();
@@ -79,5 +79,5 @@ boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::shiftedLocation(double theShift)
   aVec.Reverse();
   aVec.Scale(theShift);
   gp_Lin2d aLin = MY_LIN2D->Translated(aVec);
-  return boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aLin.Location().X(), aLin.Location().Y()));
+  return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aLin.Location().X(), aLin.Location().Y()));
 }
index 10089d67a73b72890aece0daa93081b0f8f103d5..50a8fbfb1f23c6e88ca2d7895f9fb3726ce4d650 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Lin2d_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Pnt2d;
 
@@ -22,22 +22,22 @@ class GEOMAPI_EXPORT GeomAPI_Lin2d : public GeomAPI_Interface
   GeomAPI_Lin2d(const double theStartX, const double theStartY, const double theEndX,
                 const double theEndY);
   /// Creation of line defined by start and end points
-  GeomAPI_Lin2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theStart,
-                const boost::shared_ptr<GeomAPI_Pnt2d>& theEnd);
+  GeomAPI_Lin2d(const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
+                const std::shared_ptr<GeomAPI_Pnt2d>& theEnd);
 
   /// Distance between two points
-  double distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
+  double distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
   /// Intersection of two lines
-  const boost::shared_ptr<GeomAPI_Pnt2d> intersect(
-      const boost::shared_ptr<GeomAPI_Lin2d>& theLine) const;
+  const std::shared_ptr<GeomAPI_Pnt2d> intersect(
+      const std::shared_ptr<GeomAPI_Lin2d>& theLine) const;
   /// Project point on line
-  const boost::shared_ptr<GeomAPI_Pnt2d> project(
-      const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
+  const std::shared_ptr<GeomAPI_Pnt2d> project(
+      const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
   /// Computes the cross product of the line direction and a vector from the line start point to the point
-  bool isRight(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
+  bool isRight(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
 
   /// Returns a location point shifted on theShift in perpendicular direction
-  boost::shared_ptr<GeomAPI_Pnt2d> shiftedLocation(double theShift) const;
+  std::shared_ptr<GeomAPI_Pnt2d> shiftedLocation(double theShift) const;
 };
 
 #endif
index f12d62204838cccd8a44cbbdcb1e2107a79771c7..fc09a74b32c148e910d850357a2840f308ad0b2f 100644 (file)
@@ -25,7 +25,7 @@ GeomAPI_PlanarEdges::GeomAPI_PlanarEdges() : GeomAPI_Shape()
   this->setImpl(new TopoDS_Shape(aBigWireImpl));
 }
 
-void GeomAPI_PlanarEdges::addEdge(boost::shared_ptr<GeomAPI_Shape> theEdge)
+void GeomAPI_PlanarEdges::addEdge(std::shared_ptr<GeomAPI_Shape> theEdge)
 {
   const TopoDS_Edge& anEdge = theEdge->impl<TopoDS_Edge>();
   if (anEdge.ShapeType() != TopAbs_EDGE)
@@ -35,14 +35,14 @@ void GeomAPI_PlanarEdges::addEdge(boost::shared_ptr<GeomAPI_Shape> theEdge)
   aBuilder.Add(aWire, anEdge);
 }
 
-std::list<boost::shared_ptr<GeomAPI_Shape> > GeomAPI_PlanarEdges::getEdges()
+std::list<std::shared_ptr<GeomAPI_Shape> > GeomAPI_PlanarEdges::getEdges()
 {
   TopoDS_Shape& aShape = const_cast<TopoDS_Shape&>(impl<TopoDS_Shape>());
   //BRepTools_WireExplorer aWireExp(TopoDS::Wire(aShape));
   TopExp_Explorer aWireExp(aShape, TopAbs_EDGE);
-  std::list<boost::shared_ptr<GeomAPI_Shape> > aResult;
+  std::list<std::shared_ptr<GeomAPI_Shape> > aResult;
   for (; aWireExp.More(); aWireExp.Next()) {
-    boost::shared_ptr<GeomAPI_Shape> anEdge(new GeomAPI_Shape);
+    std::shared_ptr<GeomAPI_Shape> anEdge(new GeomAPI_Shape);
     anEdge->setImpl(new TopoDS_Shape(aWireExp.Current()));
     aResult.push_back(anEdge);
   }
index af8422619f84f1e08f1b9cfe9a7be1cfd8a83c70..1521d5addae1d5cc1004c43f12bf2381bde9c0e9 100644 (file)
@@ -10,7 +10,7 @@
 #include "GeomAPI_Pnt.h"
 #include "GeomAPI_Dir.h"
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 
 #include <list>
 
@@ -36,34 +36,34 @@ class GeomAPI_PlanarEdges : public GeomAPI_Shape
     return false;
   }
 
-  GEOMAPI_EXPORT void addEdge(boost::shared_ptr<GeomAPI_Shape> theEdge);
-  GEOMAPI_EXPORT std::list<boost::shared_ptr<GeomAPI_Shape> > getEdges();
+  GEOMAPI_EXPORT void addEdge(std::shared_ptr<GeomAPI_Shape> theEdge);
+  GEOMAPI_EXPORT std::list<std::shared_ptr<GeomAPI_Shape> > getEdges();
 
   /// Returns True if the wire is defined in a plane
   GEOMAPI_EXPORT bool hasPlane() const { return myOrigin && myNorm && myDirX && myDirY; }
 
   /// Set/Get origin point
-  GEOMAPI_EXPORT void setOrigin(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin) 
+  GEOMAPI_EXPORT void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin) 
   { myOrigin = theOrigin; }
-  GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Pnt> origin() const { return myOrigin; }
+  GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const { return myOrigin; }
 
   /// Set/Get X direction vector
-  GEOMAPI_EXPORT void setDirX(const boost::shared_ptr<GeomAPI_Dir>& theDirX) { myDirX = theDirX; }
-  GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> dirX() const { return myDirX; }
+  GEOMAPI_EXPORT void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX) { myDirX = theDirX; }
+  GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirX() const { return myDirX; }
 
   /// Set/Get Y direction vector
-  GEOMAPI_EXPORT void setDirY(const boost::shared_ptr<GeomAPI_Dir>& theDirY) { myDirY = theDirY; }
-  GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> dirY() const { return myDirY; }
+  GEOMAPI_EXPORT void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY) { myDirY = theDirY; }
+  GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirY() const { return myDirY; }
 
   /// Set/Get Normal direction vector
-  GEOMAPI_EXPORT void setNorm(const boost::shared_ptr<GeomAPI_Dir>& theNorm) { myNorm = theNorm; }
-  GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> norm() const { return myNorm; }
+  GEOMAPI_EXPORT void setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm) { myNorm = theNorm; }
+  GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> norm() const { return myNorm; }
 
 private:
-  boost::shared_ptr<GeomAPI_Pnt> myOrigin;
-  boost::shared_ptr<GeomAPI_Dir> myDirX;
-  boost::shared_ptr<GeomAPI_Dir> myDirY;
-  boost::shared_ptr<GeomAPI_Dir> myNorm;
+  std::shared_ptr<GeomAPI_Pnt> myOrigin;
+  std::shared_ptr<GeomAPI_Dir> myDirX;
+  std::shared_ptr<GeomAPI_Dir> myDirY;
+  std::shared_ptr<GeomAPI_Dir> myNorm;
 };
 
 #endif
index 2f4e0cec402d46cdecd2174c765b51f1cc303071..cee05500816e80885f7f4e5fd7cf6a02fe4be594 100644 (file)
@@ -10,8 +10,8 @@
 
 using namespace std;
 
-GeomAPI_Pln::GeomAPI_Pln(const boost::shared_ptr<GeomAPI_Pnt>& thePoint,
-                         const boost::shared_ptr<GeomAPI_Dir>& theNormal)
+GeomAPI_Pln::GeomAPI_Pln(const std::shared_ptr<GeomAPI_Pnt>& thePoint,
+                         const std::shared_ptr<GeomAPI_Dir>& theNormal)
     : GeomAPI_Interface(new gp_Pln(thePoint->impl<gp_Pnt>(), theNormal->impl<gp_Dir>()))
 {
 }
@@ -21,16 +21,16 @@ GeomAPI_Pln::GeomAPI_Pln(const double theA, const double theB, const double theC
 {
 }
 
-boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Pln::location()
+std::shared_ptr<GeomAPI_Pnt> GeomAPI_Pln::location()
 {
   gp_Pnt aLoc = impl<gp_Pln>().Location();
-  return boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
 }
 
-boost::shared_ptr<GeomAPI_Dir> GeomAPI_Pln::direction()
+std::shared_ptr<GeomAPI_Dir> GeomAPI_Pln::direction()
 {
   const gp_Dir& aDir = impl<gp_Pln>().Axis().Direction();
-  return boost::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
+  return std::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
 }
 
 void GeomAPI_Pln::coefficients(double& theA, double& theB, double& theC, double& theD)
index 5471a34ad86fd4a50531d33e5ec666522c6921b3..c1a99f6ef6bae4640b6cb25079f25952973ae12e 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef GeomAPI_Pln_H_
 #define GeomAPI_Pln_H_
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <GeomAPI_Interface.h>
 
 class GeomAPI_Pnt;
@@ -20,17 +20,17 @@ class GEOMAPI_EXPORT GeomAPI_Pln : public GeomAPI_Interface
 {
  public:
   /// Creation of plane by the point and normal
-  GeomAPI_Pln(const boost::shared_ptr<GeomAPI_Pnt>& thePoint,
-              const boost::shared_ptr<GeomAPI_Dir>& theNormal);
+  GeomAPI_Pln(const std::shared_ptr<GeomAPI_Pnt>& thePoint,
+              const std::shared_ptr<GeomAPI_Dir>& theNormal);
 
   /// Creation of plane by coefficients (Ax+By+Cz+D=0)
   GeomAPI_Pln(const double theA, const double theB, const double theC, const double theD);
 
   /// Returns a point of this plane
-  boost::shared_ptr<GeomAPI_Pnt> location();
+  std::shared_ptr<GeomAPI_Pnt> location();
 
   /// Returns a plane normal
-  boost::shared_ptr<GeomAPI_Dir> direction();
+  std::shared_ptr<GeomAPI_Dir> direction();
 
   /// Returns the plane coefficients (Ax+By+Cz+D=0)
   void coefficients(double& theA, double& theB, double& theC, double& theD);
index aae0d1b8b03ebc64b9d29006e9b0c0489b4b5beb..ef7b5800135fdcd92d182a123c3b0fbbfbd23d42 100644 (file)
@@ -16,7 +16,7 @@ GeomAPI_Pnt::GeomAPI_Pnt(const double theX, const double theY, const double theZ
 {
 }
 
-GeomAPI_Pnt::GeomAPI_Pnt(const boost::shared_ptr<GeomAPI_XYZ>& theCoords)
+GeomAPI_Pnt::GeomAPI_Pnt(const std::shared_ptr<GeomAPI_XYZ>& theCoords)
     : GeomAPI_Interface(new gp_Pnt(theCoords->x(), theCoords->y(), theCoords->z()))
 {
 }
@@ -51,23 +51,23 @@ void GeomAPI_Pnt::setZ(const double theZ)
   return MY_PNT->SetZ(theZ);
 }
 
-const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_Pnt::xyz()
+const std::shared_ptr<GeomAPI_XYZ> GeomAPI_Pnt::xyz()
 {
-  return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(MY_PNT->X(), MY_PNT->Y(), MY_PNT->Z()));
+  return std::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(MY_PNT->X(), MY_PNT->Y(), MY_PNT->Z()));
 }
 
-double GeomAPI_Pnt::distance(const boost::shared_ptr<GeomAPI_Pnt>& theOther) const
+double GeomAPI_Pnt::distance(const std::shared_ptr<GeomAPI_Pnt>& theOther) const
 {
   return MY_PNT->Distance(theOther->impl<gp_Pnt>());
 }
 
-boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Pnt::to2D(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
-  const boost::shared_ptr<GeomAPI_Dir>& theDirX, const boost::shared_ptr<GeomAPI_Dir>& theDirY)
+std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Pnt::to2D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+  const std::shared_ptr<GeomAPI_Dir>& theDirX, const std::shared_ptr<GeomAPI_Dir>& theDirY)
 {
   gp_Pnt anOriginPnt(theOrigin->x(), theOrigin->y(), theOrigin->z());
   gp_Vec aVec(anOriginPnt, impl<gp_Pnt>());
 
   double aX = aVec.X() * theDirX->x() + aVec.Y() * theDirX->y() + aVec.Z() * theDirX->z();
   double aY = aVec.X() * theDirY->x() + aVec.Y() * theDirY->y() + aVec.Z() * theDirY->z();
-  return boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, aY));
+  return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, aY));
 }
index af4cce8493b180a4b189f733a3025b1b5c5f188c..e01c80647d8cbc57bc92dbc612e90fcd330f47bf 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Pnt_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_XYZ;
 class GeomAPI_Pnt2d;
@@ -23,7 +23,7 @@ class GEOMAPI_EXPORT GeomAPI_Pnt : public GeomAPI_Interface
   /// Creation of point by coordinates
   GeomAPI_Pnt(const double theX, const double theY, const double theZ);
   /// Creation of point by coordinates
-  GeomAPI_Pnt(const boost::shared_ptr<GeomAPI_XYZ>& theCoords);
+  GeomAPI_Pnt(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
 
   /// returns X coordinate
   double x() const;
@@ -40,15 +40,15 @@ class GEOMAPI_EXPORT GeomAPI_Pnt : public GeomAPI_Interface
   void setZ(const double theZ);
 
   /// returns coordinates of the point
-  const boost::shared_ptr<GeomAPI_XYZ> xyz();
+  const std::shared_ptr<GeomAPI_XYZ> xyz();
 
   /// Distance between two points
-  double distance(const boost::shared_ptr<GeomAPI_Pnt>& theOther) const;
+  double distance(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
 
   /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
-  boost::shared_ptr<GeomAPI_Pnt2d> to2D(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
-                                        const boost::shared_ptr<GeomAPI_Dir>& theDirX,
-                                        const boost::shared_ptr<GeomAPI_Dir>& theDirY);
+  std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+                                        const std::shared_ptr<GeomAPI_Dir>& theDirX,
+                                        const std::shared_ptr<GeomAPI_Dir>& theDirY);
 };
 
 #endif
index 062cbfb998e71b1d6ac0956945e8f169bbefdb34..5ef9df175c3eb9f6f18e3386d20b8df1d7acf97c 100644 (file)
@@ -19,7 +19,7 @@ GeomAPI_Pnt2d::GeomAPI_Pnt2d(const double theX, const double theY)
 {
 }
 
-GeomAPI_Pnt2d::GeomAPI_Pnt2d(const boost::shared_ptr<GeomAPI_XY>& theCoords)
+GeomAPI_Pnt2d::GeomAPI_Pnt2d(const std::shared_ptr<GeomAPI_XY>& theCoords)
     : GeomAPI_Interface(new gp_Pnt2d(theCoords->x(), theCoords->y()))
 {
 }
@@ -44,27 +44,27 @@ void GeomAPI_Pnt2d::setY(const double theY)
   return MY_PNT2D->SetY(theY);
 }
 
-boost::shared_ptr<GeomAPI_Pnt> GeomAPI_Pnt2d::to3D(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
-                                                   const boost::shared_ptr<GeomAPI_Dir>& theDirX,
-                                                   const boost::shared_ptr<GeomAPI_Dir>& theDirY)
+std::shared_ptr<GeomAPI_Pnt> GeomAPI_Pnt2d::to3D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+                                                   const std::shared_ptr<GeomAPI_Dir>& theDirX,
+                                                   const std::shared_ptr<GeomAPI_Dir>& theDirY)
 {
-  boost::shared_ptr<GeomAPI_XYZ> aSum = theOrigin->xyz()->added(theDirX->xyz()->multiplied(x()))
+  std::shared_ptr<GeomAPI_XYZ> aSum = theOrigin->xyz()->added(theDirX->xyz()->multiplied(x()))
       ->added(theDirY->xyz()->multiplied(y()));
 
-  return boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aSum));
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aSum));
 }
 
-const boost::shared_ptr<GeomAPI_XY> GeomAPI_Pnt2d::xy()
+const std::shared_ptr<GeomAPI_XY> GeomAPI_Pnt2d::xy()
 {
-  return boost::shared_ptr<GeomAPI_XY>(new GeomAPI_XY(MY_PNT2D->X(), MY_PNT2D->Y()));
+  return std::shared_ptr<GeomAPI_XY>(new GeomAPI_XY(MY_PNT2D->X(), MY_PNT2D->Y()));
 }
 
-double GeomAPI_Pnt2d::distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const
+double GeomAPI_Pnt2d::distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const
 {
   return MY_PNT2D->Distance(theOther->impl<gp_Pnt2d>());
 }
 
-bool GeomAPI_Pnt2d::isEqual(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const
+bool GeomAPI_Pnt2d::isEqual(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const
 {
   return distance(theOther) < Precision::Confusion();
 }
index 4470a2aa6d0a995170c2a6e44a09790bf0983438..7d1716cb000551f4253128e41e2252540ee51e29 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Pnt2d_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_XY;
 class GeomAPI_Pnt;
@@ -23,7 +23,7 @@ class GEOMAPI_EXPORT GeomAPI_Pnt2d : public GeomAPI_Interface
   /// Creation of point by coordinates
   GeomAPI_Pnt2d(const double theX, const double theY);
   /// Creation of point by coordinates
-  GeomAPI_Pnt2d(const boost::shared_ptr<GeomAPI_XY>& theCoords);
+  GeomAPI_Pnt2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
 
   /// returns X coordinate
   double x() const;
@@ -36,18 +36,18 @@ class GEOMAPI_EXPORT GeomAPI_Pnt2d : public GeomAPI_Interface
   void setY(const double theY);
 
   /// Returns the 3D point
-  boost::shared_ptr<GeomAPI_Pnt> to3D(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
-                                      const boost::shared_ptr<GeomAPI_Dir>& theDirX,
-                                      const boost::shared_ptr<GeomAPI_Dir>& theDirY);
+  std::shared_ptr<GeomAPI_Pnt> to3D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+                                      const std::shared_ptr<GeomAPI_Dir>& theDirX,
+                                      const std::shared_ptr<GeomAPI_Dir>& theDirY);
 
   /// returns coordinates of the point
-  const boost::shared_ptr<GeomAPI_XY> xy();
+  const std::shared_ptr<GeomAPI_XY> xy();
 
   /// Distance between two points
-  double distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
+  double distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
 
   /// Returns whether the distance between two points is less then precision confusion
-  bool isEqual(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
+  bool isEqual(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
 };
 
 #endif
index 0e5bcb010afce528fa68654ab66f867f918af232..5b9694ccce509b77e915aa2724636c138045c8c0 100644 (file)
@@ -18,7 +18,7 @@ bool GeomAPI_Shape::isNull() const
   return MY_SHAPE->IsNull() == Standard_True;
 }
 
-bool GeomAPI_Shape::isEqual(const boost::shared_ptr<GeomAPI_Shape> theShape) const
+bool GeomAPI_Shape::isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const
 {
   if (isNull())
     return theShape->isNull();
index 03f75d7453da0e4c85e475bb7e1595a2f6d44b0e..c55d9ab314d3b5cff5e5ce8a9228de60c652eb7b 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_Shape_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <list>
 
 /**\class GeomAPI_Shape
@@ -22,7 +22,7 @@ class GEOMAPI_EXPORT GeomAPI_Shape : public GeomAPI_Interface
   bool isNull() const;
 
   /// Returns whether the shapes are equal
-  virtual bool isEqual(const boost::shared_ptr<GeomAPI_Shape> theShape) const;
+  virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
 
   /// Returns whether the shape is a vertex
   virtual bool isVertex() const;
@@ -33,9 +33,9 @@ class GEOMAPI_EXPORT GeomAPI_Shape : public GeomAPI_Interface
 };
 
 //! Pointer on list of shapes
-typedef std::list<boost::shared_ptr<GeomAPI_Shape> > ListOfShape;
+typedef std::list<std::shared_ptr<GeomAPI_Shape> > ListOfShape;
 
 //! Pointer on attribute object
-typedef boost::shared_ptr<GeomAPI_Shape> GeomShapePtr;
+typedef std::shared_ptr<GeomAPI_Shape> GeomShapePtr;
 
 #endif
index d3c2b86f39239d99893c94dc349320b537198ed2..beff35c27fadb9f10b5cab6efaddb22cd98181e8 100644 (file)
@@ -33,29 +33,29 @@ void GeomAPI_XY::setY(const double theY)
   return MY_XY->SetY(theY);
 }
 
-const boost::shared_ptr<GeomAPI_XY> GeomAPI_XY::added(const boost::shared_ptr<GeomAPI_XY>& theArg)
+const std::shared_ptr<GeomAPI_XY> GeomAPI_XY::added(const std::shared_ptr<GeomAPI_XY>& theArg)
 {
-  boost::shared_ptr<GeomAPI_XY> aResult(new GeomAPI_XY(MY_XY->X() + theArg->x(), MY_XY->Y() + theArg->y()));
+  std::shared_ptr<GeomAPI_XY> aResult(new GeomAPI_XY(MY_XY->X() + theArg->x(), MY_XY->Y() + theArg->y()));
   return aResult;
 }
 
-const boost::shared_ptr<GeomAPI_XY> GeomAPI_XY::multiplied(const double theArg)
+const std::shared_ptr<GeomAPI_XY> GeomAPI_XY::multiplied(const double theArg)
 {
-  boost::shared_ptr<GeomAPI_XY> aResult(new GeomAPI_XY(MY_XY->X() * theArg, MY_XY->Y() * theArg));
+  std::shared_ptr<GeomAPI_XY> aResult(new GeomAPI_XY(MY_XY->X() * theArg, MY_XY->Y() * theArg));
   return aResult;
 }
 
-double GeomAPI_XY::dot(const boost::shared_ptr<GeomAPI_XY>& theArg) const
+double GeomAPI_XY::dot(const std::shared_ptr<GeomAPI_XY>& theArg) const
 {
   return MY_XY->Dot(theArg->impl<gp_XY>());
 }
 
-double GeomAPI_XY::cross(const boost::shared_ptr<GeomAPI_XY>& theArg) const
+double GeomAPI_XY::cross(const std::shared_ptr<GeomAPI_XY>& theArg) const
 {
   return MY_XY->Crossed(theArg->impl<gp_XY>());
 }
 
-double GeomAPI_XY::distance(const boost::shared_ptr<GeomAPI_XY>& theOther) const
+double GeomAPI_XY::distance(const std::shared_ptr<GeomAPI_XY>& theOther) const
 {
   gp_XY aResult(theOther->x() - x(), theOther->y() - y());
   return aResult.Modulus();
index 5e0fef8c975b60b7dccf29a86289f988f167c842..b4439b93d49d25bbf7d21e2ace21edee71924e66 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_XY_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /**\class GeomAPI_XY
  * \ingroup DataModel
@@ -30,17 +30,17 @@ class GEOMAPI_EXPORT GeomAPI_XY : public GeomAPI_Interface
   void setY(const double theY);
 
   /// result is sum of coordinates of this and the given argument
-  const boost::shared_ptr<GeomAPI_XY> added(const boost::shared_ptr<GeomAPI_XY>& theArg);
+  const std::shared_ptr<GeomAPI_XY> added(const std::shared_ptr<GeomAPI_XY>& theArg);
   /// result is coordinates multiplied by the argument
-  const boost::shared_ptr<GeomAPI_XY> multiplied(const double theArg);
+  const std::shared_ptr<GeomAPI_XY> multiplied(const double theArg);
 
   /// result is a scalar product of two triplets
-  double dot(const boost::shared_ptr<GeomAPI_XY>& theArg) const;
+  double dot(const std::shared_ptr<GeomAPI_XY>& theArg) const;
   /// result is a cross product of two triplets
-  double cross(const boost::shared_ptr<GeomAPI_XY>& theArg) const;
+  double cross(const std::shared_ptr<GeomAPI_XY>& theArg) const;
 
   /// Distance between two pairs
-  double distance(const boost::shared_ptr<GeomAPI_XY>& theOther) const;
+  double distance(const std::shared_ptr<GeomAPI_XY>& theOther) const;
 };
 
 #endif
index 37ba3aa9faa60d8d44e7237fcb3881dce33a17a8..6d4b97c2fc9f6139ee2048291d5f07c45798c752 100644 (file)
@@ -43,42 +43,42 @@ void GeomAPI_XYZ::setZ(const double theZ)
   return MY_XYZ->SetZ(theZ);
 }
 
-const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::added(
-    const boost::shared_ptr<GeomAPI_XYZ>& theArg)
+const std::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::added(
+    const std::shared_ptr<GeomAPI_XYZ>& theArg)
 {
-  boost::shared_ptr<GeomAPI_XYZ> aResult(new GeomAPI_XYZ(MY_XYZ->X() + theArg->x(),
+  std::shared_ptr<GeomAPI_XYZ> aResult(new GeomAPI_XYZ(MY_XYZ->X() + theArg->x(),
   MY_XYZ->Y() + theArg->y(), MY_XYZ->Z() + theArg->z()));
   return aResult;
 }
 
-const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::decreased(
-    const boost::shared_ptr<GeomAPI_XYZ>& theArg)
+const std::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::decreased(
+    const std::shared_ptr<GeomAPI_XYZ>& theArg)
 {
-  boost::shared_ptr<GeomAPI_XYZ> aResult(new GeomAPI_XYZ(MY_XYZ->X() - theArg->x(),
+  std::shared_ptr<GeomAPI_XYZ> aResult(new GeomAPI_XYZ(MY_XYZ->X() - theArg->x(),
   MY_XYZ->Y() - theArg->y(), MY_XYZ->Z() - theArg->z()));
   return aResult;
 }
 
-const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::multiplied(const double theArg)
+const std::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::multiplied(const double theArg)
 {
-  boost::shared_ptr<GeomAPI_XYZ> aResult(new GeomAPI_XYZ(MY_XYZ->X() * theArg,
+  std::shared_ptr<GeomAPI_XYZ> aResult(new GeomAPI_XYZ(MY_XYZ->X() * theArg,
   MY_XYZ->Y() * theArg, MY_XYZ->Z() * theArg));
   return aResult;
 }
 
-double GeomAPI_XYZ::dot(const boost::shared_ptr<GeomAPI_XYZ>& theArg) const
+double GeomAPI_XYZ::dot(const std::shared_ptr<GeomAPI_XYZ>& theArg) const
 {
   return MY_XYZ->Dot(theArg->impl<gp_XYZ>());
 }
 
-const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::cross(
-    const boost::shared_ptr<GeomAPI_XYZ>& theArg) const
+const std::shared_ptr<GeomAPI_XYZ> GeomAPI_XYZ::cross(
+    const std::shared_ptr<GeomAPI_XYZ>& theArg) const
 {
   gp_XYZ aResult = MY_XYZ->Crossed(theArg->impl<gp_XYZ>());
-  return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(aResult.X(), aResult.Y(), aResult.Z()));
+  return std::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(aResult.X(), aResult.Y(), aResult.Z()));
 }
 
-double GeomAPI_XYZ::distance(const boost::shared_ptr<GeomAPI_XYZ>& theOther) const
+double GeomAPI_XYZ::distance(const std::shared_ptr<GeomAPI_XYZ>& theOther) const
 {
   gp_XYZ aResult(theOther->x() - x(), theOther->y() - y(), theOther->z() - z());
   return aResult.Modulus();
index eadee91a3e0cb7154d7758e02fc93a86569cb912..2ff628824929bc6943fc506846b4b92afc83adca 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAPI_XYZ_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /**\class GeomAPI_XYZ
  * \ingroup DataModel
@@ -34,19 +34,19 @@ class GEOMAPI_EXPORT GeomAPI_XYZ : public GeomAPI_Interface
   void setZ(const double theZ);
 
   /// result is sum of coordinates of this and the given argument
-  const boost::shared_ptr<GeomAPI_XYZ> added(const boost::shared_ptr<GeomAPI_XYZ>& theArg);
+  const std::shared_ptr<GeomAPI_XYZ> added(const std::shared_ptr<GeomAPI_XYZ>& theArg);
   /// result is difference between coordinates of this and the given argument
-  const boost::shared_ptr<GeomAPI_XYZ> decreased(const boost::shared_ptr<GeomAPI_XYZ>& theArg);
+  const std::shared_ptr<GeomAPI_XYZ> decreased(const std::shared_ptr<GeomAPI_XYZ>& theArg);
   /// result is coordinates multiplied by the argument
-  const boost::shared_ptr<GeomAPI_XYZ> multiplied(const double theArg);
+  const std::shared_ptr<GeomAPI_XYZ> multiplied(const double theArg);
 
   /// result is a scalar product of two triplets
-  double dot(const boost::shared_ptr<GeomAPI_XYZ>& theArg) const;
+  double dot(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
   /// result is a cross product of two triplets
-  const boost::shared_ptr<GeomAPI_XYZ> cross(const boost::shared_ptr<GeomAPI_XYZ>& theArg) const;
+  const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
 
   /// Distance between two triplets
-  double distance(const boost::shared_ptr<GeomAPI_XYZ>& theOther) const;
+  double distance(const std::shared_ptr<GeomAPI_XYZ>& theOther) const;
 };
 
 #endif
index c2dbb80f02aea85a57e2eaae35826df36bf43faf..b93be2a7e5af7c1f565a014a5845e2e60088d79f 100644 (file)
@@ -1,7 +1,6 @@
 /* GeomAPI.i */
 %module GeomAlgoAPI
 %{
-  #include "memory"
   #include "GeomAlgoAPI.h"
   #include "GeomAlgoAPI_FaceBuilder.h"
   #include "GeomAlgoAPI_EdgeBuilder.h"
 %include "typemaps.i"
 %include "std_string.i"
 %include "std_list.i"
-//%include <std_shared_ptr.i>
-%include <boost_shared_ptr.i>
+%include "std_shared_ptr.i"
 
-%template(ShapeList) std::list<boost::shared_ptr<GeomAPI_Shape> >;
+%template(ShapeList) std::list<std::shared_ptr<GeomAPI_Shape> >;
 
 // all supported interfaces
 %include "GeomAlgoAPI_FaceBuilder.h"
index 6d2e740be49e473810fe4203ccd0c2dff70b698e..24598c5416c2047d83f10af67ce6e5a5dd3ac2d8 100644 (file)
 #include <TopExp_Explorer.hxx>
 #include <GeomAlgoAPI_DFLoader.h>
 
-boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeCut(
-  boost::shared_ptr<GeomAPI_Shape> theShape,
-  boost::shared_ptr<GeomAPI_Shape> theTool)
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeCut(
+  std::shared_ptr<GeomAPI_Shape> theShape,
+  std::shared_ptr<GeomAPI_Shape> theTool)
 {
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
   const TopoDS_Shape& aTool = theTool->impl<TopoDS_Shape>();
 
   BRepAlgoAPI_Cut aCut(aShape, aTool);
   if (aCut.IsDone()) {
-    boost::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape());
+    std::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape());
     aResult->setImpl(new TopoDS_Shape(aCut.Shape()));
     return aResult;
   }
-  return boost::shared_ptr<GeomAPI_Shape>();
+  return std::shared_ptr<GeomAPI_Shape>();
 }
 
 
-boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeFuse(
-  boost::shared_ptr<GeomAPI_Shape> theShape,
-  boost::shared_ptr<GeomAPI_Shape> theTool)
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeFuse(
+  std::shared_ptr<GeomAPI_Shape> theShape,
+  std::shared_ptr<GeomAPI_Shape> theTool)
 {
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
   const TopoDS_Shape& aTool = theTool->impl<TopoDS_Shape>();
 
   BRepAlgoAPI_Fuse aFuse(aShape, aTool);
   if (aFuse.IsDone()) {
-    boost::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape());
+    std::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape());
     aResult->setImpl(new TopoDS_Shape(aFuse.Shape()));
     return aResult;
   }
-  return boost::shared_ptr<GeomAPI_Shape>();
+  return std::shared_ptr<GeomAPI_Shape>();
 }
 
 
-boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeCommon(
-  boost::shared_ptr<GeomAPI_Shape> theShape,
-  boost::shared_ptr<GeomAPI_Shape> theTool)
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeCommon(
+  std::shared_ptr<GeomAPI_Shape> theShape,
+  std::shared_ptr<GeomAPI_Shape> theTool)
 {
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
   const TopoDS_Shape& aTool = theTool->impl<TopoDS_Shape>();
 
   BRepAlgoAPI_Common aCommon(aShape, aTool);
   if (aCommon.IsDone()) {
-    boost::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape());
+    std::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape());
     aResult->setImpl(new TopoDS_Shape(aCommon.Shape()));
     return aResult;
   }
-  return boost::shared_ptr<GeomAPI_Shape>();
+  return std::shared_ptr<GeomAPI_Shape>();
 }
 
 //============================================================================
-GeomAlgoAPI_Boolean::GeomAlgoAPI_Boolean(boost::shared_ptr<GeomAPI_Shape> theObject,
-                                         boost::shared_ptr<GeomAPI_Shape> theTool,
+GeomAlgoAPI_Boolean::GeomAlgoAPI_Boolean(std::shared_ptr<GeomAPI_Shape> theObject,
+                                         std::shared_ptr<GeomAPI_Shape> theTool,
                                          int theType)
 : myOperation(theType), myDone(false), myShape(new GeomAPI_Shape())
 {
@@ -72,8 +72,8 @@ GeomAlgoAPI_Boolean::GeomAlgoAPI_Boolean(boost::shared_ptr<GeomAPI_Shape> theObj
 
 
 //============================================================================
-void GeomAlgoAPI_Boolean::build(boost::shared_ptr<GeomAPI_Shape> theObject,
-                                boost::shared_ptr<GeomAPI_Shape> theTool)
+void GeomAlgoAPI_Boolean::build(std::shared_ptr<GeomAPI_Shape> theObject,
+                                std::shared_ptr<GeomAPI_Shape> theTool)
 {
   const TopoDS_Shape& anObject = theObject->impl<TopoDS_Shape>();
   const TopoDS_Shape& aTool    = theTool->impl<TopoDS_Shape>();
@@ -117,12 +117,12 @@ void GeomAlgoAPI_Boolean::build(boost::shared_ptr<GeomAPI_Shape> theObject,
        if(aResult.ShapeType() == TopAbs_COMPOUND) 
       aResult = GeomAlgoAPI_DFLoader::refineResult(aResult);
        myShape->setImpl(new TopoDS_Shape(aResult));
-       boost::shared_ptr<GeomAPI_Shape> aGeomResult(new GeomAPI_Shape());
+       std::shared_ptr<GeomAPI_Shape> aGeomResult(new GeomAPI_Shape());
        aGeomResult->setImpl(new TopoDS_Shape(aResult)); 
 
        // fill data map to keep correct orientation of sub-shapes 
        for (TopExp_Explorer Exp(aResult,TopAbs_FACE); Exp.More(); Exp.Next()) {
-         boost::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
+         std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
       aCurrentShape->setImpl(new TopoDS_Shape(Exp.Current()));
          myMap.bind(aCurrentShape, aCurrentShape);
        }
@@ -142,7 +142,7 @@ const bool GeomAlgoAPI_Boolean::isValid() const
 }
 
 //============================================================================
-const boost::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Boolean::shape () const 
+const std::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Boolean::shape () const 
 {
   return myShape;
 }
index a46ab91a969f902f170e9e6821d1f6e13b7a89ce..7c315d9a65705800be55bd4eb45d35a32e816bac 100644 (file)
@@ -9,7 +9,7 @@
 #include <GeomAPI_Shape.h>
 #include <GeomAlgoAPI_MakeShape.h>
 #include <GeomAPI_DataMapOfShapeShape.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /**\class GeomAlgoAPI_Boolean
  * \ingroup DataAlgo
@@ -23,18 +23,18 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface
    * \param[in] theTool  toole shape for boolean
    * \return a solid as result of operation
    */
-  GEOMALGOAPI_EXPORT static boost::shared_ptr<GeomAPI_Shape> makeCut(
-                                                 boost::shared_ptr<GeomAPI_Shape> theShape,
-                                              boost::shared_ptr<GeomAPI_Shape> theTool);
+  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape> makeCut(
+                                                 std::shared_ptr<GeomAPI_Shape> theShape,
+                                              std::shared_ptr<GeomAPI_Shape> theTool);
 
   /* \brief Creates fuse boolean operation
    * \param[in] theShape the main shape
    * \param[in] theTool  second shape
    * \return a solid as result of operation
    */
-  GEOMALGOAPI_EXPORT static boost::shared_ptr<GeomAPI_Shape> makeFuse(
-                                                 boost::shared_ptr<GeomAPI_Shape> theShape,
-                                              boost::shared_ptr<GeomAPI_Shape> theTool);
+  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape> makeFuse(
+                                                 std::shared_ptr<GeomAPI_Shape> theShape,
+                                              std::shared_ptr<GeomAPI_Shape> theTool);
 
   /* \brief Creates common boolean operation
    * \param[in] theObject the main shape
@@ -42,9 +42,9 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface
    * \param[in] theType  type of the operation: Fuse, Cut, Common
    * \return a solid as result of operation
    */
-  GEOMALGOAPI_EXPORT static boost::shared_ptr<GeomAPI_Shape> makeCommon(
-                                                 boost::shared_ptr<GeomAPI_Shape> theObject,
-                                              boost::shared_ptr<GeomAPI_Shape> theTool);
+  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape> makeCommon(
+                                                 std::shared_ptr<GeomAPI_Shape> theObject,
+                                              std::shared_ptr<GeomAPI_Shape> theTool);
 
    enum {
        BOOL_CUT,
@@ -52,8 +52,8 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface
     BOOL_COMMON
   };
   /// Constructor
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Boolean (boost::shared_ptr<GeomAPI_Shape> theObject,
-                                          boost::shared_ptr<GeomAPI_Shape> theTool,
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Boolean (std::shared_ptr<GeomAPI_Shape> theObject,
+                                          std::shared_ptr<GeomAPI_Shape> theTool,
                                                                                  int theType);
 
   /// Returns True if algorithm succeed
@@ -63,7 +63,7 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface
   GEOMALGOAPI_EXPORT const bool isValid() const;
 
   /// Returns result of the boolean algorithm which may be a Solid or a Face
-  GEOMALGOAPI_EXPORT const boost::shared_ptr<GeomAPI_Shape>& shape () const; 
+  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& shape () const; 
  
   /// Returns map of sub-shapes of the result. To be used for History keeping
   GEOMALGOAPI_EXPORT void  mapOfShapes (GeomAPI_DataMapOfShapeShape& theMap) const;
@@ -76,13 +76,13 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface
 
   private:
   /// builds resulting shape
-  void build(boost::shared_ptr<GeomAPI_Shape> theObject,
-             boost::shared_ptr<GeomAPI_Shape> theTool);
+  void build(std::shared_ptr<GeomAPI_Shape> theObject,
+             std::shared_ptr<GeomAPI_Shape> theTool);
   /// fields
   double mySize;
   bool myDone;
   int  myOperation;
-  boost::shared_ptr<GeomAPI_Shape> myShape;  
+  std::shared_ptr<GeomAPI_Shape> myShape;  
   GeomAPI_DataMapOfShapeShape myMap;
   GeomAlgoAPI_MakeShape * myMkShape;
 };
index 934390faa84f286b04a3f95f4d2b941f55ea41ee..8ce54d347adf98d35701495bd93121c587cab445 100644 (file)
@@ -9,20 +9,20 @@
 #include <BRep_Builder.hxx>
 #include <TopoDS_Compound.hxx>
 
-boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_CompoundBuilder::compound(
-    std::list<boost::shared_ptr<GeomAPI_Shape> > theShapes)
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_CompoundBuilder::compound(
+    std::list<std::shared_ptr<GeomAPI_Shape> > theShapes)
 {
   BRep_Builder aBuilder;
   TopoDS_Compound aComp;
   aBuilder.MakeCompound(aComp);
 
-  std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = theShapes.begin(), aLast =
+  std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = theShapes.begin(), aLast =
       theShapes.end();
   for (; anIt != aLast; anIt++) {
     aBuilder.Add(aComp, (*anIt)->impl<TopoDS_Shape>());
   }
 
-  boost::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
+  std::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
   aRes->setImpl(new TopoDS_Shape(aComp));
   return aRes;
 }
index bf9f8374a1d544c6b7a11e0f05c7653ce97a4a97..dac10ee8cdc7d156550d71b0afe8223f25c958e2 100644 (file)
@@ -9,7 +9,7 @@
 #include <GeomAPI_Shape.h>
 #include <GeomAPI_Pnt.h>
 #include <GeomAPI_Dir.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <list>
 
@@ -23,8 +23,8 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_CompoundBuilder
  public:
   /// Creates compund of the given shapes
   /// \param theShapes a list of shapes
-  static boost::shared_ptr<GeomAPI_Shape> compound(
-      std::list<boost::shared_ptr<GeomAPI_Shape> > theShapes);
+  static std::shared_ptr<GeomAPI_Shape> compound(
+      std::list<std::shared_ptr<GeomAPI_Shape> > theShapes);
 };
 
 #endif
index 5f3aba03e7ea68dd98e4a1db09a3ab2065826e20..5d314dd8e1583a12c727a8a343a2bd8c25f7fb3b 100644 (file)
 #include <gp_Ax2.hxx>
 #include <gp_Circ.hxx>
 
-boost::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::line(
-    boost::shared_ptr<GeomAPI_Pnt> theStart, boost::shared_ptr<GeomAPI_Pnt> theEnd)
+std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::line(
+    std::shared_ptr<GeomAPI_Pnt> theStart, std::shared_ptr<GeomAPI_Pnt> theEnd)
 {
   const gp_Pnt& aStart = theStart->impl<gp_Pnt>();
   const gp_Pnt& anEnd = theEnd->impl<gp_Pnt>();
 
   if (aStart.IsEqual(anEnd, Precision::Confusion()))
-    return boost::shared_ptr<GeomAPI_Edge>();
+    return std::shared_ptr<GeomAPI_Edge>();
   if (Abs(aStart.SquareDistance(anEnd)) > 1.e+100)
-    return boost::shared_ptr<GeomAPI_Edge>();
+    return std::shared_ptr<GeomAPI_Edge>();
   BRepBuilderAPI_MakeEdge anEdgeBuilder(aStart, anEnd);
-  boost::shared_ptr<GeomAPI_Edge> aRes(new GeomAPI_Edge);
+  std::shared_ptr<GeomAPI_Edge> aRes(new GeomAPI_Edge);
   TopoDS_Edge anEdge = anEdgeBuilder.Edge();
   aRes->setImpl(new TopoDS_Shape(anEdge));
   return aRes;
 }
 
-boost::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::lineCircle(
-    boost::shared_ptr<GeomAPI_Pnt> theCenter, boost::shared_ptr<GeomAPI_Dir> theNormal,
+std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::lineCircle(
+    std::shared_ptr<GeomAPI_Pnt> theCenter, std::shared_ptr<GeomAPI_Dir> theNormal,
     double theRadius)
 {
   const gp_Pnt& aCenter = theCenter->impl<gp_Pnt>();
@@ -40,15 +40,15 @@ boost::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::lineCircle(
   gp_Circ aCircle(gp_Ax2(aCenter, aDir), theRadius);
 
   BRepBuilderAPI_MakeEdge anEdgeBuilder(aCircle);
-  boost::shared_ptr<GeomAPI_Edge> aRes(new GeomAPI_Edge);
+  std::shared_ptr<GeomAPI_Edge> aRes(new GeomAPI_Edge);
   TopoDS_Edge anEdge = anEdgeBuilder.Edge();
   aRes->setImpl(new TopoDS_Shape(anEdge));
   return aRes;
 }
 
-boost::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::lineCircleArc(
-    boost::shared_ptr<GeomAPI_Pnt> theCenter, boost::shared_ptr<GeomAPI_Pnt> theStartPoint,
-    boost::shared_ptr<GeomAPI_Pnt> theEndPoint, boost::shared_ptr<GeomAPI_Dir> theNormal)
+std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::lineCircleArc(
+    std::shared_ptr<GeomAPI_Pnt> theCenter, std::shared_ptr<GeomAPI_Pnt> theStartPoint,
+    std::shared_ptr<GeomAPI_Pnt> theEndPoint, std::shared_ptr<GeomAPI_Dir> theNormal)
 {
   const gp_Pnt& aCenter = theCenter->impl<gp_Pnt>();
   const gp_Dir& aDir = theNormal->impl<gp_Dir>();
@@ -66,12 +66,12 @@ boost::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::lineCircleArc(
   else
     anEdgeBuilder = BRepBuilderAPI_MakeEdge(aCircle, aStart, anEnd);
 
-  boost::shared_ptr<GeomAPI_Edge> aRes(new GeomAPI_Edge);
+  std::shared_ptr<GeomAPI_Edge> aRes(new GeomAPI_Edge);
   anEdgeBuilder.Build();
 
   if (anEdgeBuilder.IsDone())
     aRes->setImpl(new TopoDS_Shape(anEdgeBuilder.Edge()));
   else
-    aRes = boost::shared_ptr<GeomAPI_Edge>();
+    aRes = std::shared_ptr<GeomAPI_Edge>();
   return aRes;
 }
index 1db144ed1d2658e6d2caa3daa85cf09986510321..bc29d923c4ba19ef14bbb48862e4a02c2e6f1586 100644 (file)
@@ -9,7 +9,7 @@
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Pnt.h>
 #include <GeomAPI_Dir.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /**\class GeomAlgoAPI_EdgeBuilder
  * \ingroup DataAlgo
@@ -20,19 +20,19 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_EdgeBuilder
 {
  public:
   /// Creates linear edge by two points
-  static boost::shared_ptr<GeomAPI_Edge> line(boost::shared_ptr<GeomAPI_Pnt> theStart,
-                                              boost::shared_ptr<GeomAPI_Pnt> theEnd);
+  static std::shared_ptr<GeomAPI_Edge> line(std::shared_ptr<GeomAPI_Pnt> theStart,
+                                              std::shared_ptr<GeomAPI_Pnt> theEnd);
 
   /// Creates linear edge in a form of a circle by a point and a circle radius
-  static boost::shared_ptr<GeomAPI_Edge> lineCircle(boost::shared_ptr<GeomAPI_Pnt> theCenter,
-                                                    boost::shared_ptr<GeomAPI_Dir> theNormal,
+  static std::shared_ptr<GeomAPI_Edge> lineCircle(std::shared_ptr<GeomAPI_Pnt> theCenter,
+                                                    std::shared_ptr<GeomAPI_Dir> theNormal,
                                                     double theRadius);
 
   /// Creates linear edge in a form of a circle arc by a three points
-  static boost::shared_ptr<GeomAPI_Edge> lineCircleArc(boost::shared_ptr<GeomAPI_Pnt> theCenter,
-                                                       boost::shared_ptr<GeomAPI_Pnt> theStartPoint,
-                                                       boost::shared_ptr<GeomAPI_Pnt> theEndPoint,
-                                                       boost::shared_ptr<GeomAPI_Dir> theNormal);
+  static std::shared_ptr<GeomAPI_Edge> lineCircleArc(std::shared_ptr<GeomAPI_Pnt> theCenter,
+                                                       std::shared_ptr<GeomAPI_Pnt> theStartPoint,
+                                                       std::shared_ptr<GeomAPI_Pnt> theEndPoint,
+                                                       std::shared_ptr<GeomAPI_Dir> theNormal);
 };
 
 #endif
index d8eefb25d48e1cd0671f9010755540afadede6ca..7d76979b2e22003881e6c1d1c5c9988eb80aad6a 100644 (file)
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <Precision.hxx>
 #include <TDF_TagSource.hxx>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <BRepPrimAPI_MakePrism.hxx>
 #include <TopoDS_Shape.hxx>
 
 const double tolerance = Precision::Angular();
 // Constructor
 GeomAlgoAPI_Extrusion::GeomAlgoAPI_Extrusion(
-  boost::shared_ptr<GeomAPI_Shape> theBasis, double theSize)
+  std::shared_ptr<GeomAPI_Shape> theBasis, double theSize)
 : mySize(theSize), myDone(false), myShape(new GeomAPI_Shape()),
   myFirst(new GeomAPI_Shape()), myLast(new GeomAPI_Shape())
 {
@@ -34,7 +34,7 @@ GeomAlgoAPI_Extrusion::GeomAlgoAPI_Extrusion(
 }
 
 //============================================================================
-void GeomAlgoAPI_Extrusion::build(const boost::shared_ptr<GeomAPI_Shape>& theBasis)
+void GeomAlgoAPI_Extrusion::build(const std::shared_ptr<GeomAPI_Shape>& theBasis)
 {
   bool isFirstNorm = true;
   gp_Dir aShapeNormal;
@@ -60,7 +60,7 @@ void GeomAlgoAPI_Extrusion::build(const boost::shared_ptr<GeomAPI_Shape>& theBas
         aResult = aBuilder->Shape();
          // fill data map to keep correct orientation of sub-shapes 
          for (TopExp_Explorer Exp(aResult,TopAbs_FACE); Exp.More(); Exp.Next()) {
-           boost::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
+           std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
         aCurrentShape->setImpl(new TopoDS_Shape(Exp.Current()));
            myMap.bind(aCurrentShape, aCurrentShape);
          }   
@@ -98,19 +98,19 @@ const bool GeomAlgoAPI_Extrusion::hasVolume() const
 }
 
 //============================================================================
-const boost::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Extrusion::shape () const 
+const std::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Extrusion::shape () const 
 {
   return myShape;
 }
 
 //============================================================================
-const boost::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Extrusion::firstShape()
+const std::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Extrusion::firstShape()
 {
   return myFirst;
 }
 
 //============================================================================
-const boost::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Extrusion::lastShape()
+const std::shared_ptr<GeomAPI_Shape>& GeomAlgoAPI_Extrusion::lastShape()
 {
   return myLast;
 }
index ead8a8a8d446d4e9df18b1b9328f2ea1cdcfaea6..26a22bf5d85d58ce87d0cd47f55080a585461cd7 100644 (file)
@@ -10,7 +10,7 @@
 #include <GeomAPI_Dir.h>
 #include <GeomAlgoAPI_MakeShape.h>
 #include <GeomAPI_DataMapOfShapeShape.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 /**\class GeomAlgoAPI_Extrusion
  * \ingroup DataAlgo
  * \brief Allows to create the prism based on a given face and a direction
@@ -26,7 +26,7 @@ class GeomAlgoAPI_Extrusion : public GeomAPI_Interface
    * \return a solid or a face/shell which is obtained from specified one  
    */
   /// Constructor
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Extrusion (boost::shared_ptr<GeomAPI_Shape> theBasis, double theSize);
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Extrusion (std::shared_ptr<GeomAPI_Shape> theBasis, double theSize);
 
   /// Returns True if algorithm succeed
   GEOMALGOAPI_EXPORT const bool isDone() const;
@@ -38,13 +38,13 @@ class GeomAlgoAPI_Extrusion : public GeomAPI_Interface
   GEOMALGOAPI_EXPORT const bool hasVolume() const;
 
   /// Returns result of the Extrusion algorithm which may be a Solid or a Face
-  GEOMALGOAPI_EXPORT const boost::shared_ptr<GeomAPI_Shape>& shape () const;
+  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& shape () const;
 
   /// Returns the first shape 
-  GEOMALGOAPI_EXPORT const boost::shared_ptr<GeomAPI_Shape>& firstShape();
+  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& firstShape();
 
   /// returns last shape
-  GEOMALGOAPI_EXPORT const boost::shared_ptr<GeomAPI_Shape>& lastShape();      
+  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& lastShape();        
  
   /// Returns map of sub-shapes of the result. To be used for History keeping
   GEOMALGOAPI_EXPORT void  mapOfShapes (GeomAPI_DataMapOfShapeShape& theMap) const;
@@ -56,13 +56,13 @@ class GeomAlgoAPI_Extrusion : public GeomAPI_Interface
   GEOMALGOAPI_EXPORT  ~GeomAlgoAPI_Extrusion();
 private:
   /// builds resulting shape
-  void build(const boost::shared_ptr<GeomAPI_Shape>& theBasis);
+  void build(const std::shared_ptr<GeomAPI_Shape>& theBasis);
   /// fields
   double mySize;
   bool myDone;
-  boost::shared_ptr<GeomAPI_Shape> myShape;
-  boost::shared_ptr<GeomAPI_Shape> myFirst;
-  boost::shared_ptr<GeomAPI_Shape> myLast;
+  std::shared_ptr<GeomAPI_Shape> myShape;
+  std::shared_ptr<GeomAPI_Shape> myFirst;
+  std::shared_ptr<GeomAPI_Shape> myLast;
   GeomAPI_DataMapOfShapeShape myMap;
   GeomAlgoAPI_MakeShape * myMkShape;
 };
index 85df8286aa5288e9ee402ec670fa6260c7934b53..b1a7d5e924bb2feee9aa5c614fafa333344d1fe4 100644 (file)
@@ -10,8 +10,8 @@
 #include <BRep_Tool.hxx>
 #include <Geom_Plane.hxx>
 
-boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_FaceBuilder::square(
-    boost::shared_ptr<GeomAPI_Pnt> theCenter, boost::shared_ptr<GeomAPI_Dir> theNormal,
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_FaceBuilder::square(
+    std::shared_ptr<GeomAPI_Pnt> theCenter, std::shared_ptr<GeomAPI_Dir> theNormal,
     const double theSize)
 {
   const gp_Pnt& aCenter = theCenter->impl<gp_Pnt>();
@@ -20,15 +20,15 @@ boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_FaceBuilder::square(
   // half of the size in each direction from the center
   BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, -theSize / 2., theSize / 2., -theSize / 2.,
                                        theSize / 2.);
-  boost::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
+  std::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
   aRes->setImpl(new TopoDS_Shape(aFaceBuilder.Face()));
   return aRes;
 }
 
-boost::shared_ptr<GeomAPI_Pln> GeomAlgoAPI_FaceBuilder::plane(
-    boost::shared_ptr<GeomAPI_Shape> theFace)
+std::shared_ptr<GeomAPI_Pln> GeomAlgoAPI_FaceBuilder::plane(
+    std::shared_ptr<GeomAPI_Shape> theFace)
 {
-  boost::shared_ptr<GeomAPI_Pln> aResult;
+  std::shared_ptr<GeomAPI_Pln> aResult;
   if (!theFace)
     return aResult;  // bad shape
   TopoDS_Shape aShape = theFace->impl<TopoDS_Shape>();
@@ -47,6 +47,6 @@ boost::shared_ptr<GeomAPI_Pln> GeomAlgoAPI_FaceBuilder::plane(
     return aResult;  // not planar
   double aA, aB, aC, aD;
   aPlane->Coefficients(aA, aB, aC, aD);
-  aResult = boost::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(aA, aB, aC, aD));
+  aResult = std::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(aA, aB, aC, aD));
   return aResult;
 }
index b95fad92bf6619003bea5e570a568b0724415209..4880566dffebb912667ae29fc477dd1b3bae0e4c 100644 (file)
@@ -10,7 +10,7 @@
 #include <GeomAPI_Pnt.h>
 #include <GeomAPI_Pln.h>
 #include <GeomAPI_Dir.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /**\class GeomAlgoAPI_FaceBuilder
  * \ingroup DataAlgo
@@ -22,12 +22,12 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_FaceBuilder
  public:
   /// Creates square planar face by given point of the center,
   /// normal to the plane and size of square
-  static boost::shared_ptr<GeomAPI_Shape> square(boost::shared_ptr<GeomAPI_Pnt> theCenter,
-                                                 boost::shared_ptr<GeomAPI_Dir> theNormal,
+  static std::shared_ptr<GeomAPI_Shape> square(std::shared_ptr<GeomAPI_Pnt> theCenter,
+                                                 std::shared_ptr<GeomAPI_Dir> theNormal,
                                                  const double theSize);
 
   /// Returns the plane of the planar face. If it is not planar, returns empty ptr.
-  static boost::shared_ptr<GeomAPI_Pln> plane(boost::shared_ptr<GeomAPI_Shape> theFace);
+  static std::shared_ptr<GeomAPI_Pln> plane(std::shared_ptr<GeomAPI_Shape> theFace);
 };
 
 #endif
index 70cfad9f831744218604d9b6ffd778533a6f042e..402457c954219dc5ef543e768c7eb580f380ad96 100644 (file)
@@ -20,21 +20,21 @@ void GeomAlgoAPI_MakeShape::init(void* theMkShape)
   setImpl((void *)implPtr<BRepBuilderAPI_MakeShape>());
 }
 
-const boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_MakeShape::shape() const
+const std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_MakeShape::shape() const
 {
   return myShape;
 }
 
 /// Returns the  list   of shapes generated   from the shape <theShape>
 void GeomAlgoAPI_MakeShape::generated(
-  const boost::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory)
+  const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory)
 {
   BRepBuilderAPI_MakeShape* aBuilder = implPtr<BRepBuilderAPI_MakeShape>();
   if(aBuilder) {
     const TopTools_ListOfShape& aList =  aBuilder->Generated(theShape->impl<TopoDS_Shape>());
     TopTools_ListIteratorOfListOfShape it(aList);
     for(;it.More();it.Next()) {
-      boost::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+      std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
       aShape->setImpl(new TopoDS_Shape(it.Value()));
       theHistory.push_back(aShape);
     }
@@ -43,14 +43,14 @@ void GeomAlgoAPI_MakeShape::generated(
 
 /// Returns the  list   of shapes modified   from the shape <theShape>
 void GeomAlgoAPI_MakeShape::modified(
-  const boost::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory)
+  const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory)
 {
   BRepBuilderAPI_MakeShape* aBuilder = implPtr<BRepBuilderAPI_MakeShape>();
   if(aBuilder) {
     const TopTools_ListOfShape& aList =  aBuilder->Modified(theShape->impl<TopoDS_Shape>());
     TopTools_ListIteratorOfListOfShape it(aList);
     for(;it.More();it.Next()) {
-      boost::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+      std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
       aShape->setImpl(new TopoDS_Shape(it.Value()));
       theHistory.push_back(aShape);
     }
@@ -58,7 +58,7 @@ void GeomAlgoAPI_MakeShape::modified(
 }
 
 /// Returns whether the shape is an edge
-bool GeomAlgoAPI_MakeShape::isDeleted(const boost::shared_ptr<GeomAPI_Shape> theShape)
+bool GeomAlgoAPI_MakeShape::isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
 {
   bool isDeleted(false);
   BRepBuilderAPI_MakeShape* aBuilder = implPtr<BRepBuilderAPI_MakeShape>();
index 4fa0ef0a13522ec6d794db8e62369a56c31ca740..6848898b6c9615ab7784692dca7e0327696a6a19 100644 (file)
@@ -5,7 +5,7 @@
 #define GeomAlgoAPI_MakeShape_H_
 
 #include <GeomAPI_Shape.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <GeomAlgoAPI.h>
 //#include <BRepBuilderAPI_MakeShape.hxx>
 /**\class GeomAlgoAPI_MakeShape
@@ -21,23 +21,23 @@ class GeomAlgoAPI_MakeShape : public GeomAPI_Interface
   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder);
 
   /// Returns a shape built by the shape construction algorithm
-  GEOMALGOAPI_EXPORT const boost::shared_ptr<GeomAPI_Shape>  shape() const;
+  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>  shape() const;
 
   /// Returns the  list   of shapes generated   from the shape <theShape>
   GEOMALGOAPI_EXPORT virtual void generated(
-    const boost::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
+    const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
 
   /// Returns the  list   of shapes modified   from the shape <theShape>
   GEOMALGOAPI_EXPORT virtual void modified(
-    const boost::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
+    const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
 
   /// Returns whether the shape is an edge
-  GEOMALGOAPI_EXPORT virtual bool isDeleted(const boost::shared_ptr<GeomAPI_Shape> theShape);
+  GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
 
   GEOMALGOAPI_EXPORT void init(void* theMkShape);
 
   protected:
-       boost::shared_ptr<GeomAPI_Shape> myShape;
+       std::shared_ptr<GeomAPI_Shape> myShape;
 };
 
 #endif
index 053504d79e227c08c400bf02a50039129593947e..086cc419b429c43205fea01aba229792954b2955 100644 (file)
@@ -8,13 +8,13 @@
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #include <TopoDS_Vertex.hxx>
 
-boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_PointBuilder::point(
-    boost::shared_ptr<GeomAPI_Pnt> thePoint)
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_PointBuilder::point(
+    std::shared_ptr<GeomAPI_Pnt> thePoint)
 {
   const gp_Pnt& aPnt = thePoint->impl<gp_Pnt>();
   BRepBuilderAPI_MakeVertex aMaker(aPnt);
   TopoDS_Vertex aVertex = aMaker.Vertex();
-  boost::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
+  std::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
   aRes->setImpl(new TopoDS_Shape(aVertex));
   return aRes;
 }
index ec6e417e4c349b445456dcdd5f2c1388546be378..78639d7fdd4f7ce273b30fe0e00fc71b6aa1f202 100644 (file)
@@ -6,7 +6,7 @@
 #define GeomAlgoAPI_PointBuilder_H_
 
 #include <GeomAlgoAPI.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Shape;
 class GeomAPI_Pnt;
@@ -20,7 +20,7 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_PointBuilder
 {
  public:
   /// Creates linear edge by two points
-  static boost::shared_ptr<GeomAPI_Shape> point(boost::shared_ptr<GeomAPI_Pnt> thePoint);
+  static std::shared_ptr<GeomAPI_Shape> point(std::shared_ptr<GeomAPI_Pnt> thePoint);
 };
 
 #endif
index ddd6d397712e5bcf3aa29e2ae2b38616ad4a71e3..4e894827d7f63d037da9748132f9784a6107f721 100644 (file)
@@ -80,11 +80,11 @@ static void removeWasteEdges(std::list<TopoDS_Vertex>::iterator& theStartVertex,
 
 
 void GeomAlgoAPI_SketchBuilder::createFaces(
-    const boost::shared_ptr<GeomAPI_Pnt>& theOrigin, const boost::shared_ptr<GeomAPI_Dir>& theDirX,
-    const boost::shared_ptr<GeomAPI_Dir>& theDirY, const boost::shared_ptr<GeomAPI_Dir>& theNorm,
-    const std::list<boost::shared_ptr<GeomAPI_Shape> >& theFeatures,
-    std::list<boost::shared_ptr<GeomAPI_Shape> >& theResultFaces,
-    std::list<boost::shared_ptr<GeomAPI_Shape> >& theResultWires)
+    const std::shared_ptr<GeomAPI_Pnt>& theOrigin, const std::shared_ptr<GeomAPI_Dir>& theDirX,
+    const std::shared_ptr<GeomAPI_Dir>& theDirY, const std::shared_ptr<GeomAPI_Dir>& theNorm,
+    const std::list<std::shared_ptr<GeomAPI_Shape> >& theFeatures,
+    std::list<std::shared_ptr<GeomAPI_Shape> >& theResultFaces,
+    std::list<std::shared_ptr<GeomAPI_Shape> >& theResultWires)
 {
   if (theFeatures.empty())
     return;
@@ -95,10 +95,10 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
   TopoDS_Shape aFeaturesCompound;
 
   // Obtain only edges from the features list
-  std::list<boost::shared_ptr<GeomAPI_Shape> > anEdges;
-  std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator aFeatIt = theFeatures.begin();
+  std::list<std::shared_ptr<GeomAPI_Shape> > anEdges;
+  std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator aFeatIt = theFeatures.begin();
   for (; aFeatIt != theFeatures.end(); aFeatIt++) {
-    boost::shared_ptr<GeomAPI_Shape> aShape(*aFeatIt);
+    std::shared_ptr<GeomAPI_Shape> aShape(*aFeatIt);
     const TopoDS_Edge& anEdge = aShape->impl<TopoDS_Edge>();
     if (anEdge.ShapeType() == TopAbs_EDGE)
       anEdges.push_back(aShape);
@@ -107,9 +107,9 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
   if (anEdges.size() == 1) {  // If there is only one feature, BOPAlgo_Builder will decline to work. Need to process it anyway
     aFeaturesCompound = anEdges.front()->impl<TopoDS_Shape>();
   } else {
-    std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = anEdges.begin();
+    std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = anEdges.begin();
     for (; anIt != anEdges.end(); anIt++) {
-      boost::shared_ptr<GeomAPI_Shape> aPreview(*anIt);
+      std::shared_ptr<GeomAPI_Shape> aPreview(*anIt);
       aBuilder.AddArgument(aPreview->impl<TopoDS_Edge>());
     }
     aPF.SetArguments(aBuilder.Arguments());
@@ -219,7 +219,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
       TopoDS_Face aPatch;
       createFace(*aVertIter, anEdgeIter, aProcEdges.end(), aPlane, aPatch);
       if (!aPatch.IsNull()) {
-        boost::shared_ptr<GeomAPI_Shape> aFace(new GeomAPI_Shape);
+        std::shared_ptr<GeomAPI_Shape> aFace(new GeomAPI_Shape);
         aFace->setImpl(new TopoDS_Face(aPatch));
         theResultFaces.push_back(aFace);
       }
@@ -323,7 +323,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
         std::list<TopoDS_Wire>::const_iterator aTailIter = aTail.begin();
         for (; aTailIter != aTail.end(); aTailIter++)
           if (!aTailIter->IsNull()) {
-            boost::shared_ptr<GeomAPI_Shape> aWire(new GeomAPI_Shape);
+            std::shared_ptr<GeomAPI_Shape> aWire(new GeomAPI_Shape);
             aWire->setImpl(new TopoDS_Shape(*aTailIter));
             theResultWires.push_back(aWire);
           }
@@ -371,30 +371,30 @@ void GeomAlgoAPI_SketchBuilder::createFaces(
     fixIntersections(theResultFaces);
 }
 
-void GeomAlgoAPI_SketchBuilder::createFaces(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
-                                            const boost::shared_ptr<GeomAPI_Dir>& theDirX,
-                                            const boost::shared_ptr<GeomAPI_Dir>& theDirY,
-                                            const boost::shared_ptr<GeomAPI_Dir>& theNorm,
-                                            const boost::shared_ptr<GeomAPI_Shape>& theWire,
-                                            std::list<boost::shared_ptr<GeomAPI_Shape> >& theResultFaces)
+void GeomAlgoAPI_SketchBuilder::createFaces(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+                                            const std::shared_ptr<GeomAPI_Dir>& theDirX,
+                                            const std::shared_ptr<GeomAPI_Dir>& theDirY,
+                                            const std::shared_ptr<GeomAPI_Dir>& theNorm,
+                                            const std::shared_ptr<GeomAPI_Shape>& theWire,
+                                            std::list<std::shared_ptr<GeomAPI_Shape> >& theResultFaces)
 {
-  boost::shared_ptr<GeomAPI_PlanarEdges> aWire = boost::dynamic_pointer_cast<GeomAPI_PlanarEdges>(theWire);
+  std::shared_ptr<GeomAPI_PlanarEdges> aWire = std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(theWire);
   if(!aWire)
     return;
   // Filter wires, return only faces.
-  std::list<boost::shared_ptr<GeomAPI_Shape> > aFilteredWires;
+  std::list<std::shared_ptr<GeomAPI_Shape> > aFilteredWires;
   createFaces(theOrigin, theDirX, theDirY, theNorm,
               aWire->getEdges(), theResultFaces, aFilteredWires);
 }
 
 
 void GeomAlgoAPI_SketchBuilder::fixIntersections(
-    std::list<boost::shared_ptr<GeomAPI_Shape> >& theFaces)
+    std::list<std::shared_ptr<GeomAPI_Shape> >& theFaces)
 {
   BRepClass_FaceClassifier aClassifier;
 
-  std::list<boost::shared_ptr<GeomAPI_Shape> >::iterator anIter1 = theFaces.begin();
-  std::list<boost::shared_ptr<GeomAPI_Shape> >::iterator anIter2;
+  std::list<std::shared_ptr<GeomAPI_Shape> >::iterator anIter1 = theFaces.begin();
+  std::list<std::shared_ptr<GeomAPI_Shape> >::iterator anIter2;
   for (; anIter1 != theFaces.end(); anIter1++) {
     anIter2 = anIter1;
     for (++anIter2; anIter2 != theFaces.end(); anIter2++) {
@@ -430,7 +430,7 @@ void GeomAlgoAPI_SketchBuilder::fixIntersections(
               (*anIter2)->setImpl(new TopoDS_Shape(anExp.Current()));
               isFirstFace = false;
             } else {
-              boost::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape);
+              std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape);
               aShape->setImpl(new TopoDS_Shape(anExp.Current()));
               theFaces.push_back(aShape);
             }
@@ -447,7 +447,7 @@ void GeomAlgoAPI_SketchBuilder::fixIntersections(
             (*anIter1)->setImpl(new TopoDS_Shape(anExp.Current()));
             isFirstFace = false;
           } else {
-            boost::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape);
+            std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape);
             aShape->setImpl(new TopoDS_Shape(anExp.Current()));
             theFaces.push_back(aShape);
           }
index 86505f82dbb8fd94299b51d443113656e7b9278d..a2ed358490d0344a93b7a1b45f58d3b7ac8d6e3a 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <GeomAlgoAPI.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <list>
 
 #include <GeomAPI_Dir.h>
@@ -34,13 +34,13 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_SketchBuilder
    *  It finds the vertex with minimal coordinates along X axis (theDirX) and then 
    *  goes through the edges passing the surrounding area on the left.
    */
-  static void createFaces(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
-                          const boost::shared_ptr<GeomAPI_Dir>& theDirX,
-                          const boost::shared_ptr<GeomAPI_Dir>& theDirY,
-                          const boost::shared_ptr<GeomAPI_Dir>& theNorm,
-                          const std::list<boost::shared_ptr<GeomAPI_Shape> >& theFeatures,
-                          std::list<boost::shared_ptr<GeomAPI_Shape> >& theResultFaces,
-                          std::list<boost::shared_ptr<GeomAPI_Shape> >& theResultWires);
+  static void createFaces(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+                          const std::shared_ptr<GeomAPI_Dir>& theDirX,
+                          const std::shared_ptr<GeomAPI_Dir>& theDirY,
+                          const std::shared_ptr<GeomAPI_Dir>& theNorm,
+                          const std::list<std::shared_ptr<GeomAPI_Shape> >& theFeatures,
+                          std::list<std::shared_ptr<GeomAPI_Shape> >& theResultFaces,
+                          std::list<std::shared_ptr<GeomAPI_Shape> >& theResultWires);
 
   /** \brief Creates list of faces and unclosed wires on basis of the features of the sketch
    *  \param[in]  theOrigin      origin point of the sketch
@@ -54,18 +54,18 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_SketchBuilder
    *  It finds the vertex with minimal coordinates along X axis (theDirX) and then
    *  goes through the edges passing the surrounding area on the left.
    */
-  static void createFaces(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
-                          const boost::shared_ptr<GeomAPI_Dir>& theDirX,
-                          const boost::shared_ptr<GeomAPI_Dir>& theDirY,
-                          const boost::shared_ptr<GeomAPI_Dir>& theNorm,
-                          const boost::shared_ptr<GeomAPI_Shape>& theWire,
-                          std::list<boost::shared_ptr<GeomAPI_Shape> >& theResultFaces);
+  static void createFaces(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+                          const std::shared_ptr<GeomAPI_Dir>& theDirX,
+                          const std::shared_ptr<GeomAPI_Dir>& theDirY,
+                          const std::shared_ptr<GeomAPI_Dir>& theNorm,
+                          const std::shared_ptr<GeomAPI_Shape>& theWire,
+                          std::list<std::shared_ptr<GeomAPI_Shape> >& theResultFaces);
 
   /** \brief Searches intersections between the faces in the list 
    *         and make holes in the faces to avoid intersections
    *  \param[in,out] theFaces list of faces to proccess
    */
-  static void fixIntersections(std::list<boost::shared_ptr<GeomAPI_Shape> >& theFaces);
+  static void fixIntersections(std::list<std::shared_ptr<GeomAPI_Shape> >& theFaces);
 };
 
 #endif
index ddf20ebbd1ae25609a5e1033326e81fab10c2a6e..837c94073dad6d2af33c8b060a7f1461de72ec1e 100644 (file)
@@ -21,7 +21,7 @@ void GeomData_Dir::setValue(const double theX, const double theY, const double t
   }
 }
 
-void GeomData_Dir::setValue(const boost::shared_ptr<GeomAPI_Dir>& theDir)
+void GeomData_Dir::setValue(const std::shared_ptr<GeomAPI_Dir>& theDir)
 {
   setValue(theDir->x(), theDir->y(), theDir->z());
 }
@@ -41,9 +41,9 @@ double GeomData_Dir::z() const
   return myCoords->Value(2);
 }
 
-boost::shared_ptr<GeomAPI_Dir> GeomData_Dir::dir()
+std::shared_ptr<GeomAPI_Dir> GeomData_Dir::dir()
 {
-  return boost::shared_ptr<GeomAPI_Dir>(
+  return std::shared_ptr<GeomAPI_Dir>(
       new GeomAPI_Dir(myCoords->Value(0), myCoords->Value(1), myCoords->Value(2)));
 }
 
index b4dea091ac3574f3c34f8fbd7f9d1ca2143730ea..a11316a4be9a46731e2d99fc5acff7bd026b61c5 100644 (file)
@@ -9,7 +9,7 @@
 #include "GeomDataAPI_Dir.h"
 #include <TDataStd_RealArray.hxx>
 #include <TDF_Label.hxx>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Dir;
 
@@ -24,7 +24,7 @@ class GeomData_Dir : public GeomDataAPI_Dir
   /// Defines the double value
   GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
   /// Defines the direction
-  GEOMDATA_EXPORT virtual void setValue(const boost::shared_ptr<GeomAPI_Dir>& theDir);
+  GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir);
 
   /// Returns the X double value
   GEOMDATA_EXPORT virtual double x() const;
@@ -33,7 +33,7 @@ class GeomData_Dir : public GeomDataAPI_Dir
   /// Returns the Z double value
   GEOMDATA_EXPORT virtual double z() const;
   /// Returns the direction of this attribute
-  GEOMDATA_EXPORT virtual boost::shared_ptr<GeomAPI_Dir> dir();
+  GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Dir> dir();
 
  protected:
   /// Initializes attributes
index 61c92e12bbed4730cae31908d8eb7e781168efd0..ca9f960dfbcf1490514ea1cc78ee9b032c45b3de 100644 (file)
@@ -20,7 +20,7 @@ void GeomData_Point::setValue(const double theX, const double theY, const double
   }
 }
 
-void GeomData_Point::setValue(const boost::shared_ptr<GeomAPI_Pnt>& thePoint)
+void GeomData_Point::setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint)
 {
   setValue(thePoint->x(), thePoint->y(), thePoint->z());
 }
@@ -40,9 +40,9 @@ double GeomData_Point::z() const
   return myCoords->Value(2);
 }
 
-boost::shared_ptr<GeomAPI_Pnt> GeomData_Point::pnt()
+std::shared_ptr<GeomAPI_Pnt> GeomData_Point::pnt()
 {
-  boost::shared_ptr<GeomAPI_Pnt> aResult(
+  std::shared_ptr<GeomAPI_Pnt> aResult(
       new GeomAPI_Pnt(myCoords->Value(0), myCoords->Value(1), myCoords->Value(2)));
   return aResult;
 }
index 3d1ae7cef77700a8eee97ca08f53c0eaae6f8ce2..507227f1b6970da0bdf6f75424d365e2885a8df5 100644 (file)
@@ -22,7 +22,7 @@ class GeomData_Point : public GeomDataAPI_Point
   /// Defines the double value
   GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
   /// Defines the point
-  GEOMDATA_EXPORT virtual void setValue(const boost::shared_ptr<GeomAPI_Pnt>& thePoint);
+  GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint);
 
   /// Returns the X double value
   GEOMDATA_EXPORT virtual double x() const;
@@ -31,7 +31,7 @@ class GeomData_Point : public GeomDataAPI_Point
   /// Returns the Z double value
   GEOMDATA_EXPORT virtual double z() const;
   /// Returns the 3D point
-  GEOMDATA_EXPORT virtual boost::shared_ptr<GeomAPI_Pnt> pnt();
+  GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Pnt> pnt();
 
  protected:
   /// Initializes attributes
index 924f80f8ca32bafd745151d4505d4dfd3033ab91..eee50b4e7a01ab48cdfa3d55834362a03dfbd097 100644 (file)
@@ -18,7 +18,7 @@ void GeomData_Point2D::setValue(const double theX, const double theY)
   }
 }
 
-void GeomData_Point2D::setValue(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+void GeomData_Point2D::setValue(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
   setValue(thePoint->x(), thePoint->y());
 }
@@ -33,9 +33,9 @@ double GeomData_Point2D::y() const
   return myCoords->Value(1);
 }
 
-boost::shared_ptr<GeomAPI_Pnt2d> GeomData_Point2D::pnt()
+std::shared_ptr<GeomAPI_Pnt2d> GeomData_Point2D::pnt()
 {
-  boost::shared_ptr<GeomAPI_Pnt2d> aResult(
+  std::shared_ptr<GeomAPI_Pnt2d> aResult(
       new GeomAPI_Pnt2d(myCoords->Value(0), myCoords->Value(1)));
   return aResult;
 }
index 4990948b8f8ed08483526fbea0aa8bc1e379e614..f5989898e78c5da66e1f77356df0485925f7def2 100644 (file)
@@ -22,14 +22,14 @@ class GeomData_Point2D : public GeomDataAPI_Point2D
   /// Defines the double value
   GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY);
   /// Defines the point
-  GEOMDATA_EXPORT virtual void setValue(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
   /// Returns the X double value
   GEOMDATA_EXPORT virtual double x() const;
   /// Returns the Y double value
   GEOMDATA_EXPORT virtual double y() const;
   /// Returns the 2D point
-  GEOMDATA_EXPORT virtual boost::shared_ptr<GeomAPI_Pnt2d> pnt();
+  GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Pnt2d> pnt();
 
  protected:
   /// Initializes attributes
index 60383198362fa802548a38065d33f5d3219486ef..98496183ef39a34639d9f1315577b49001cd04af 100644 (file)
@@ -1,17 +1,15 @@
 /* GeomDataAPI.i */
 %module GeomDataAPI
 %{
-  #include <boost/shared_ptr.hpp>
-
   #include "ModelAPI_Attribute.h"
   #include "GeomDataAPI.h"
   #include "GeomDataAPI_Point.h"
   #include "GeomDataAPI_Dir.h"
   #include "GeomDataAPI_Point2D.h"
   
-  template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Attribute> theObject) 
+  template<class T> std::shared_ptr<T> castTo(std::shared_ptr<ModelAPI_Attribute> theObject) 
   { 
-    return boost::dynamic_pointer_cast<T>(theObject); 
+    return std::dynamic_pointer_cast<T>(theObject); 
   } 
 %}
 
@@ -23,9 +21,8 @@
 %include "typemaps.i"
 %include "std_string.i"
 %include "std_list.i"
+%include "std_shared_ptr.i"
 
-// boost pointers
-%include <boost_shared_ptr.i>
 %shared_ptr(ModelAPI_Attribute)
 %shared_ptr(GeomDataAPI_Point)
 %shared_ptr(GeomDataAPI_Dir)
@@ -37,7 +34,7 @@
 %include "GeomDataAPI_Dir.h"
 %include "GeomDataAPI_Point2D.h"
 
-template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Attribute> theObject);
+template<class T> std::shared_ptr<T> castTo(std::shared_ptr<ModelAPI_Attribute> theObject);
 %template(geomDataAPI_Point) castTo<GeomDataAPI_Point>;
 %template(geomDataAPI_Dir) castTo<GeomDataAPI_Dir>;
 %template(geomDataAPI_Point2D) castTo<GeomDataAPI_Point2D>;
index e8c86f46a7bd1f0d8b1589a5fed2bd54d923585e..c4bdb19ed0dae9fb2e12c6b2ccd5d9eae62328b2 100644 (file)
@@ -21,7 +21,7 @@ class GeomDataAPI_Dir : public ModelAPI_Attribute
   /// Defines the double value
   virtual void setValue(const double theX, const double theY, const double theZ) = 0;
   /// Defines the direction
-  virtual void setValue(const boost::shared_ptr<GeomAPI_Dir>& theDir) = 0;
+  virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir) = 0;
 
   /// Returns the X double value
   virtual double x() const = 0;
@@ -30,7 +30,7 @@ class GeomDataAPI_Dir : public ModelAPI_Attribute
   /// Returns the Z double value
   virtual double z() const = 0;
   /// Returns the direction of this attribute
-  virtual boost::shared_ptr<GeomAPI_Dir> dir() = 0;
+  virtual std::shared_ptr<GeomAPI_Dir> dir() = 0;
 
   /// Returns the type of this class of attributes
   static inline std::string type()
index 08ee73951847765c0baad42f1d07d06bc54ad379..cc5f4f6f09a4e892fc6175df6c7cbfc24fe3a91d 100644 (file)
@@ -21,7 +21,7 @@ class GeomDataAPI_Point : public ModelAPI_Attribute
   /// Defines the double value
   virtual void setValue(const double theX, const double theY, const double theZ) = 0;
   /// Defines the point
-  virtual void setValue(const boost::shared_ptr<GeomAPI_Pnt>& thePoint) = 0;
+  virtual void setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint) = 0;
 
   /// Returns the X double value
   virtual double x() const = 0;
@@ -30,7 +30,7 @@ class GeomDataAPI_Point : public ModelAPI_Attribute
   /// Returns the Z double value
   virtual double z() const = 0;
   /// Returns the 3D point
-  virtual boost::shared_ptr<GeomAPI_Pnt> pnt() = 0;
+  virtual std::shared_ptr<GeomAPI_Pnt> pnt() = 0;
 
   /// Returns the type of this class of attributes
   static inline std::string type()
index c0eb001cfbbafe1a24dae931ac524364ca01b32e..73df286246a46ea3eae15b38f14ffb3927338984 100644 (file)
@@ -21,14 +21,14 @@ class GeomDataAPI_Point2D : public ModelAPI_Attribute
   /// Defines the double value
   virtual void setValue(const double theX, const double theY) = 0;
   /// Defines the point
-  virtual void setValue(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) = 0;
+  virtual void setValue(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) = 0;
 
   /// Returns the X double value
   virtual double x() const = 0;
   /// Returns the Y double value
   virtual double y() const = 0;
   /// Returns the 2D point
-  virtual boost::shared_ptr<GeomAPI_Pnt2d> pnt() = 0;
+  virtual std::shared_ptr<GeomAPI_Pnt2d> pnt() = 0;
 
   /// Appends the delta values to point
   void move(const double theDeltaX, const double theDeltaY)
index d2261b357c0686c12959376d395498d26fc77579..3362a47d3c33310193fb1301cfba2535d424da12 100644 (file)
@@ -21,7 +21,7 @@ GeomValidators_Positive::GeomValidators_Positive()
 bool GeomValidators_Positive::isValid(
     const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const
 {
-  boost::shared_ptr<ModelAPI_AttributeDouble> aDouble = 
-    boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
+  std::shared_ptr<ModelAPI_AttributeDouble> aDouble = 
+    std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
   return aDouble->isInitialized() && aDouble->value() > 1.e-5;
 }
index d53dc665c679dcd14f69eca5b2881a10655b910b..6f315ee0ebd58b3ade943dba1e30af618981d7c7 100644 (file)
@@ -19,14 +19,14 @@ Handle(Model_Application) Model_Application::getApplication()
 }
 
 //=======================================================================
-const boost::shared_ptr<Model_Document>& Model_Application::getDocument(string theDocID)
+const std::shared_ptr<Model_Document>& Model_Application::getDocument(string theDocID)
 {
   if (myDocs.find(theDocID) != myDocs.end())
     return myDocs[theDocID];
 
   static const std::string thePartSetKind("PartSet");
   static const std::string thePartKind("Part");
-  boost::shared_ptr<Model_Document> aNew(
+  std::shared_ptr<Model_Document> aNew(
     new Model_Document(theDocID, theDocID == "root" ? thePartSetKind : thePartKind));
   myDocs[theDocID] = aNew;
   // load it if it must be loaded by demand
index d9eb4bb200cc3b1ece948bda72524aed6d5707d7..3d905dc41e35994026e0f9def396184112a65f7b 100644 (file)
@@ -31,7 +31,7 @@ class Model_Application : public TDocStd_Application
   //! Retuns the application: one per process    
   MODEL_EXPORT static Handle_Model_Application getApplication();
   //! Returns the main document (on first call creates it) by the string identifier
-  MODEL_EXPORT const boost::shared_ptr<Model_Document>& getDocument(std::string theDocID);
+  MODEL_EXPORT const std::shared_ptr<Model_Document>& getDocument(std::string theDocID);
   //! Returns true if document has been created
   MODEL_EXPORT bool hasDocument(std::string theDocID);
   //! Deletes the document from the application
@@ -60,7 +60,7 @@ class Model_Application : public TDocStd_Application
 
  private:
   /// Map from string identifiers to created documents of an application
-  std::map<std::string, boost::shared_ptr<Model_Document> > myDocs;
+  std::map<std::string, std::shared_ptr<Model_Document> > myDocs;
   /// Path for the loaded by demand documents
   std::string myPath;
   /// Path for the loaded by demand documents
index 67486266c1089c44e8e419e5b97472149cd53b98..566533aaf1f17309ab02bb5b4dd2635a11255451 100644 (file)
@@ -9,7 +9,7 @@
 
 using namespace std;
 
-void Model_AttributeDocRef::setValue(boost::shared_ptr<ModelAPI_Document> theDoc)
+void Model_AttributeDocRef::setValue(std::shared_ptr<ModelAPI_Document> theDoc)
 {
   myDoc = theDoc;
   TCollection_ExtendedString aNewID(theDoc->id().c_str());
@@ -19,7 +19,7 @@ void Model_AttributeDocRef::setValue(boost::shared_ptr<ModelAPI_Document> theDoc
   }
 }
 
-boost::shared_ptr<ModelAPI_Document> Model_AttributeDocRef::value()
+std::shared_ptr<ModelAPI_Document> Model_AttributeDocRef::value()
 {
   return myDoc;
 }
index 6290e05a41c23c25e999de9d0ab45cd94dd2d61f..28fc60fd20e141959f153f01d5aa9cdcc2c9922e 100644 (file)
 class Model_AttributeDocRef : public ModelAPI_AttributeDocRef
 {
   Handle_TDataStd_Comment myComment;  ///< reference to document is identified as string-id
-  boost::shared_ptr<ModelAPI_Document> myDoc; ///< document referenced by this attribute (if already loaded)
+  std::shared_ptr<ModelAPI_Document> myDoc; ///< document referenced by this attribute (if already loaded)
  public:
   /// Defines the document referenced from this attribute
-  MODEL_EXPORT virtual void setValue(boost::shared_ptr<ModelAPI_Document> theDoc);
+  MODEL_EXPORT virtual void setValue(std::shared_ptr<ModelAPI_Document> theDoc);
 
   /// Returns document referenced from this attribute
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> value();
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> value();
 
  protected:
   /// Initializes attibutes
index 4e8a52b0e195119681a8903e3ca0fcb84968d436..0410e657bf6a6d07a5df025b6ba9eb0f2746dc29 100644 (file)
@@ -14,9 +14,9 @@ bool Model_AttributeRefAttr::isObject()
   return myID->Get().Length() == 0;
 }
 
-void Model_AttributeRefAttr::setAttr(boost::shared_ptr<ModelAPI_Attribute> theAttr)
+void Model_AttributeRefAttr::setAttr(std::shared_ptr<ModelAPI_Attribute> theAttr)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(
       theAttr->owner()->data());
   string anID = aData->id(theAttr);
   if (myIsInitialized && object() == theAttr->owner() && myID->Get().IsEqual(anID.c_str()))
@@ -26,21 +26,21 @@ void Model_AttributeRefAttr::setAttr(boost::shared_ptr<ModelAPI_Attribute> theAt
   owner()->data()->sendAttributeUpdated(this);
 }
 
-boost::shared_ptr<ModelAPI_Attribute> Model_AttributeRefAttr::attr()
+std::shared_ptr<ModelAPI_Attribute> Model_AttributeRefAttr::attr()
 {
   ObjectPtr anObj = object();
   if (anObj) {
-    boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(anObj->data());
+    std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(anObj->data());
     return aData->attribute(TCollection_AsciiString(myID->Get()).ToCString());
   }
   // not initialized
-  return boost::shared_ptr<ModelAPI_Attribute>();
+  return std::shared_ptr<ModelAPI_Attribute>();
 }
 
 void Model_AttributeRefAttr::setObject(ObjectPtr theObject)
 {
   if (theObject && (!myIsInitialized || myID->Get().Length() != 0 || object() != theObject)) {
-    boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(
+    std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(
         theObject->data());
     myRef->Set(aData->label().Father());
     myID->Set("");  // feature is identified by the empty ID
@@ -51,7 +51,7 @@ void Model_AttributeRefAttr::setObject(ObjectPtr theObject)
 ObjectPtr Model_AttributeRefAttr::object()
 {
   if (myRef->Get() != myRef->Label()) {  // initialized
-    boost::shared_ptr<Model_Document> aDoc = boost::dynamic_pointer_cast<Model_Document>(
+    std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(
         owner()->document());
     if (aDoc) {
       TDF_Label aRefLab = myRef->Get();
index 83eaf77f2ff4db4cfba9dcb66677748c41a2726e..1833d3eb9f255c165b533f4966a01b1c16b0c298 100644 (file)
@@ -27,10 +27,10 @@ class Model_AttributeRefAttr : public ModelAPI_AttributeRefAttr
   MODEL_EXPORT virtual bool isObject();
 
   /// Defines the reference to the attribute
-  MODEL_EXPORT virtual void setAttr(boost::shared_ptr<ModelAPI_Attribute> theAttr);
+  MODEL_EXPORT virtual void setAttr(std::shared_ptr<ModelAPI_Attribute> theAttr);
 
   /// Returns attribute referenced from this attribute
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Attribute> attr();
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Attribute> attr();
 
   /// Defines the reference to the object
   MODEL_EXPORT virtual void setObject(ObjectPtr theFeature);
index 014592f0d3eebd58a02679f862777e510745c69c..8c304cb3bca6b5cd95799bc3d3afcda5a1acf6c4 100644 (file)
@@ -12,7 +12,7 @@ using namespace std;
 
 void Model_AttributeRefList::append(ObjectPtr theObject)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(theObject->data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(theObject->data());
   myRef->Append(aData->label().Father());  // store label of the object
 
   owner()->data()->sendAttributeUpdated(this);
@@ -20,7 +20,7 @@ void Model_AttributeRefList::append(ObjectPtr theObject)
 
 void Model_AttributeRefList::remove(ObjectPtr theObject)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(theObject->data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(theObject->data());
   myRef->Remove(aData->label().Father());
 
   owner()->data()->sendAttributeUpdated(this);
@@ -34,7 +34,7 @@ int Model_AttributeRefList::size() const
 list<ObjectPtr> Model_AttributeRefList::list()
 {
   std::list<ObjectPtr> aResult;
-  boost::shared_ptr<Model_Document> aDoc = boost::dynamic_pointer_cast<Model_Document>(
+  std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(
       owner()->document());
   if (aDoc) {
     const TDF_LabelList& aList = myRef->List();
@@ -48,7 +48,7 @@ list<ObjectPtr> Model_AttributeRefList::list()
 
 ObjectPtr Model_AttributeRefList::object(const int theIndex) const
 {
-  boost::shared_ptr<Model_Document> aDoc = boost::dynamic_pointer_cast<Model_Document>(
+  std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(
       owner()->document());
   if (aDoc) {
     const TDF_LabelList& aList = myRef->List();
index 3781fb2a2c4157a37b8a9b605b596e85ec4a3179..e209eb0e12ef43ac33786ce9bbf025e7e8cb3554 100644 (file)
@@ -15,11 +15,11 @@ void Model_AttributeReference::setValue(ObjectPtr theObject)
   if(!theObject)
     return;
   if (!myIsInitialized || value() != theObject) {
-    boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(
+    std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(
         theObject->data());
 
-    boost::shared_ptr<Model_Document> aDoc =
-      boost::dynamic_pointer_cast<Model_Document>(owner()->document());
+    std::shared_ptr<Model_Document> aDoc =
+      std::dynamic_pointer_cast<Model_Document>(owner()->document());
     myRef->Set(aData->label().Father());  // references to the feature label
 
     owner()->data()->sendAttributeUpdated(this);
@@ -29,7 +29,7 @@ void Model_AttributeReference::setValue(ObjectPtr theObject)
 ObjectPtr Model_AttributeReference::value()
 {
   if (myIsInitialized) {
-    boost::shared_ptr<Model_Document> aDoc = boost::dynamic_pointer_cast<Model_Document>(
+    std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(
         owner()->document());
     if (aDoc) {
       TDF_Label aRefLab = myRef->Get();
@@ -47,24 +47,24 @@ Model_AttributeReference::Model_AttributeReference(TDF_Label& theLabel)
     myRef = TDF_Reference::Set(theLabel, theLabel);  // not initialized references to itself
   } else {
     if (owner()) {
-      boost::shared_ptr<Model_Document> aDoc =
-        boost::dynamic_pointer_cast<Model_Document>(owner()->document());
+      std::shared_ptr<Model_Document> aDoc =
+        std::dynamic_pointer_cast<Model_Document>(owner()->document());
     }
   }
 }
 
-void Model_AttributeReference::setObject(const boost::shared_ptr<ModelAPI_Object>& theObject)
+void Model_AttributeReference::setObject(const std::shared_ptr<ModelAPI_Object>& theObject)
 {
   if (owner() != theObject) {
     ModelAPI_AttributeReference::setObject(theObject);
-    boost::shared_ptr<Model_Document> aDoc =
-      boost::dynamic_pointer_cast<Model_Document>(owner()->document());
+    std::shared_ptr<Model_Document> aDoc =
+      std::dynamic_pointer_cast<Model_Document>(owner()->document());
   }
 }
 
 Model_AttributeReference::~Model_AttributeReference()
 {
-  boost::shared_ptr<Model_Document> aDoc =
-    boost::dynamic_pointer_cast<Model_Document>(owner()->document());
+  std::shared_ptr<Model_Document> aDoc =
+    std::dynamic_pointer_cast<Model_Document>(owner()->document());
   TDF_Label aLab = myRef->Get();
 }
index b41891bdb9ac7b451c9b30d25167a9e0ac4c4be1..eceb208cb8ca3278e40e3dbddf60efbc2e1b8f95 100644 (file)
@@ -28,7 +28,7 @@ class Model_AttributeReference : public ModelAPI_AttributeReference
 
   MODEL_EXPORT ~Model_AttributeReference();
 
-  MODEL_EXPORT virtual void setObject(const boost::shared_ptr<ModelAPI_Object>& theObject);
+  MODEL_EXPORT virtual void setObject(const std::shared_ptr<ModelAPI_Object>& theObject);
 
 protected:
   /// Objects are created for features automatically
index 05888b5d73f1834fad0dd005dc7e8c65bf9a7e9f..0ae4bf6a844fe2a337497a37b429684e3de6546c 100644 (file)
@@ -45,9 +45,9 @@ static const int kSTART_VERTEX_DELTA = 1000000;
 // TDF_Reference - from ReferenceAttribute, the context
 
 void Model_AttributeSelection::setValue(const ResultPtr& theContext,
-  const boost::shared_ptr<GeomAPI_Shape>& theSubShape)
+  const std::shared_ptr<GeomAPI_Shape>& theSubShape)
 {
-  const boost::shared_ptr<GeomAPI_Shape>& anOldShape = value();
+  const std::shared_ptr<GeomAPI_Shape>& anOldShape = value();
   bool isOldShape = 
     (theSubShape == anOldShape || (theSubShape && anOldShape && theSubShape->isEqual(anOldShape)));
   if (isOldShape) return; // shape is the same, so context is also unchanged
@@ -65,14 +65,14 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext,
   owner()->data()->sendAttributeUpdated(this);
 }
 
-boost::shared_ptr<GeomAPI_Shape> Model_AttributeSelection::value()
+std::shared_ptr<GeomAPI_Shape> Model_AttributeSelection::value()
 {
-  boost::shared_ptr<GeomAPI_Shape> aResult;
+  std::shared_ptr<GeomAPI_Shape> aResult;
   if (myIsInitialized) {
     Handle(TNaming_NamedShape) aSelection;
     if (selectionLabel().FindAttribute(TNaming_NamedShape::GetID(), aSelection)) {
       TopoDS_Shape aSelShape = aSelection->Get();
-      aResult = boost::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape);
+      aResult = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape);
       aResult->setImpl(new TopoDS_Shape(aSelShape));
     }
   }
@@ -86,11 +86,11 @@ Model_AttributeSelection::Model_AttributeSelection(TDF_Label& theLabel)
 }
 
 ResultPtr Model_AttributeSelection::context() {
-  return boost::dynamic_pointer_cast<ModelAPI_Result>(myRef.value());
+  return std::dynamic_pointer_cast<ModelAPI_Result>(myRef.value());
 }
 
 
-void Model_AttributeSelection::setObject(const boost::shared_ptr<ModelAPI_Object>& theObject)
+void Model_AttributeSelection::setObject(const std::shared_ptr<ModelAPI_Object>& theObject)
 {
   ModelAPI_AttributeSelection::setObject(theObject);
   myRef.setObject(theObject);
@@ -110,9 +110,9 @@ bool Model_AttributeSelection::update()
   } else if (aContext->groupName() == ModelAPI_ResultConstruction::group()) {
     // construction: identification by the results indexes, recompute faces and
     // take the face that more close by the indexes
-    boost::shared_ptr<GeomAPI_PlanarEdges> aWirePtr = 
-      boost::dynamic_pointer_cast<GeomAPI_PlanarEdges>(
-      boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext)->shape());
+    std::shared_ptr<GeomAPI_PlanarEdges> aWirePtr = 
+      std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(
+      std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext)->shape());
     if (aWirePtr && aWirePtr->hasPlane()) {
       TDF_Label aLab = myRef.myRef->Label();
       // getting a type of selected shape
@@ -123,26 +123,26 @@ bool Model_AttributeSelection::update()
       TopAbs_ShapeEnum aShapeType = (TopAbs_ShapeEnum)(aTypeAttr->Get());
       // selected indexes will be needed in each "if"
       Handle(TDataStd_IntPackedMap) aSubIds;
-      boost::shared_ptr<GeomAPI_Shape> aNewSelected;
+      std::shared_ptr<GeomAPI_Shape> aNewSelected;
       bool aNoIndexes = 
         !aLab.FindAttribute(TDataStd_IntPackedMap::GetID(), aSubIds) || aSubIds->Extent() == 0;
       // for now working only with composite features
       FeaturePtr aContextFeature = owner()->document()->feature(aContext);
       CompositeFeaturePtr aComposite = 
-        boost::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature);
+        std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature);
       if (!aComposite || aComposite->numberOfSubs() == 0) {
         return false;
       }
 
       if (aShapeType == TopAbs_FACE) {
         // If this is a wire with plane defined thin it is a sketch-like object
-        std::list<boost::shared_ptr<GeomAPI_Shape> > aFaces;
+        std::list<std::shared_ptr<GeomAPI_Shape> > aFaces;
         GeomAlgoAPI_SketchBuilder::createFaces(aWirePtr->origin(), aWirePtr->dirX(),
           aWirePtr->dirY(), aWirePtr->norm(), aWirePtr, aFaces);
         if (aFaces.empty()) // no faces, update can not work correctly
           return false;
         // if there is no edges indexes, any face can be used: take the first
-        boost::shared_ptr<GeomAPI_Shape> aNewSelected;
+        std::shared_ptr<GeomAPI_Shape> aNewSelected;
         if (aNoIndexes) {
           aNewSelected = *(aFaces.begin());
         } else { // searching for most looks-like initial face by the indexes
@@ -152,11 +152,11 @@ bool Model_AttributeSelection::update()
           for(int a = 0; a < aSubNum; a++) {
             if (aSubIds->Contains(aComposite->subFeatureId(a))) {
               FeaturePtr aSub = aComposite->subFeature(a);
-              const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aSub->results();
-              std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRes;
+              const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aSub->results();
+              std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes;
               for(aRes = aResults.cbegin(); aRes != aResults.cend(); aRes++) {
                 ResultConstructionPtr aConstr = 
-                  boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
+                  std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
                 if (aConstr->shape() && aConstr->shape()->isEdge()) {
                   const TopoDS_Shape& aResShape = aConstr->shape()->impl<TopoDS_Shape>();
                   TopoDS_Edge anEdge = TopoDS::Edge(aResShape);
@@ -170,7 +170,7 @@ bool Model_AttributeSelection::update()
             }
           }
           // iterate new result faces and searching for these edges
-          std::list<boost::shared_ptr<GeomAPI_Shape> >::iterator aFacesIter = aFaces.begin();
+          std::list<std::shared_ptr<GeomAPI_Shape> >::iterator aFacesIter = aFaces.begin();
           double aBestFound = 0; // best percentage of found edges
           for(; aFacesIter != aFaces.end(); aFacesIter++) {
             int aFound = 0, aNotFound = 0;
@@ -209,11 +209,11 @@ bool Model_AttributeSelection::update()
           if (aSubIds->IsEmpty() || aSubIds->Contains(aComposite->subFeatureId(a))) {
             // found the appropriate feature
             FeaturePtr aFeature = aComposite->subFeature(a);
-            std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aResIter =
+            std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aResIter =
               aFeature->results().cbegin();
             for(;aResIter != aFeature->results().cend(); aResIter++) {
               ResultConstructionPtr aRes = 
-                boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aResIter);
+                std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aResIter);
               if (aRes && aRes->shape() && aRes->shape()->isEdge()) { // found!
                 selectConstruction(aContext, aRes->shape());
                 owner()->data()->sendAttributeUpdated(this);
@@ -235,11 +235,11 @@ bool Model_AttributeSelection::update()
             else if (aSubIds->Contains(aFeatureID + kSTART_VERTEX_DELTA)) aVertexNum = 2;
             // found the feature with appropriate edge
             FeaturePtr aFeature = aComposite->subFeature(a);
-            std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aResIter =
+            std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aResIter =
               aFeature->results().cbegin();
             for(;aResIter != aFeature->results().cend(); aResIter++) {
               ResultConstructionPtr aRes = 
-                boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aResIter);
+                std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aResIter);
               if (aRes && aRes->shape()) {
                 if (aRes->shape()->isVertex() && aVertexNum == 0) { // found!
                   selectConstruction(aContext, aRes->shape());
@@ -250,7 +250,7 @@ bool Model_AttributeSelection::update()
                   int aVIndex = 1;
                   for(TopExp_Explorer aVExp(anEdge, TopAbs_VERTEX); aVExp.More(); aVExp.Next()) {
                     if (aVIndex == aVertexNum) { // found!
-                      boost::shared_ptr<GeomAPI_Shape> aVertex(new GeomAPI_Shape);
+                      std::shared_ptr<GeomAPI_Shape> aVertex(new GeomAPI_Shape);
                       aVertex->setImpl(new TopoDS_Shape(aVExp.Current()));
                       selectConstruction(aContext, aVertex);
                       owner()->data()->sendAttributeUpdated(this);
@@ -271,18 +271,18 @@ bool Model_AttributeSelection::update()
 
 
 void Model_AttributeSelection::selectBody(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape)
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape)
 {
   // perform the selection
   TNaming_Selector aSel(selectionLabel());
   TopoDS_Shape aNewShape = theSubShape ? theSubShape->impl<TopoDS_Shape>() : TopoDS_Shape();
   TopoDS_Shape aContext;
 
-  ResultBodyPtr aBody = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(myRef.value());
+  ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(myRef.value());
   if (aBody)
     aContext = aBody->shape()->impl<TopoDS_Shape>();
   else {
-    ResultConstructionPtr aConstr = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(myRef.value());
+    ResultConstructionPtr aConstr = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(myRef.value());
     if (aConstr) {
       aContext = aConstr->shape()->impl<TopoDS_Shape>();
     } else {
@@ -294,15 +294,15 @@ void Model_AttributeSelection::selectBody(
 }
 
 void Model_AttributeSelection::selectConstruction(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape)
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape)
 {
   FeaturePtr aContextFeature = owner()->document()->feature(theContext);
   CompositeFeaturePtr aComposite = 
-    boost::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature);
+    std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature);
   if (!aComposite || aComposite->numberOfSubs() == 0) {
     return; // saving of context is enough: result construction contains exactly the needed shape
   }
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(owner()->data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(owner()->data());
   TDF_Label aLab = myRef.myRef->Label();
   // identify the reuslts of sub-object of the composite by edges
   const TopoDS_Shape& aSubShape = theSubShape->impl<TopoDS_Shape>();
@@ -327,12 +327,12 @@ void Model_AttributeSelection::selectConstruction(
   const int aSubNum = aComposite->numberOfSubs();
   for(int a = 0; a < aSubNum; a++) {
     FeaturePtr aSub = aComposite->subFeature(a);
-    const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aSub->results();
-    std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRes = aResults.cbegin();
+    const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aSub->results();
+    std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes = aResults.cbegin();
     // there may be many shapes (circle and center): register if at least one is in selection
     for(; aRes != aResults.cend(); aRes++) {
       ResultConstructionPtr aConstr = 
-        boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
+        std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
       if (!aConstr->shape()) {
         continue;
       }
index 1508476794ba5bd7f6ebd46d9d4c4a8e45a47b06..f2d8106eae9862eadc26154814fa5c5ba99015f8 100644 (file)
@@ -20,16 +20,16 @@ class Model_AttributeSelection : public ModelAPI_AttributeSelection
 public:
   /// Defines the result and its selected sub-shape
   MODEL_EXPORT virtual void setValue(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape);
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape);
 
   /// Returns the selected subshape
-  MODEL_EXPORT virtual boost::shared_ptr<GeomAPI_Shape> value();
+  MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> value();
 
   /// Returns the context of the selection (the whole shape owner)
   MODEL_EXPORT virtual ResultPtr context();
 
   /// Sets the feature object
-  MODEL_EXPORT virtual void setObject(const boost::shared_ptr<ModelAPI_Object>& theObject);
+  MODEL_EXPORT virtual void setObject(const std::shared_ptr<ModelAPI_Object>& theObject);
 
   /// Updates the underlied selection due to the changes in the referenced objects
   /// \returns false if update is failed
@@ -42,10 +42,10 @@ protected:
 
   /// Performs the selection for the body result (TNaming selection)
   virtual void selectBody(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape);
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape);
   /// Performs the selection for the construction result (selection by index)
   virtual void selectConstruction(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape);
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape);
 
   /// Returns the label where TNaming_Selection results are stored
   /// Note: there must be no attributes stored at the same label because Selector clears this lab
index 4a2012a3323ec367dcbdb404f54d706023ce442a..96a2ccb32c1f70ed4c1a266e8f2b60bc4e4b445c 100644 (file)
 using namespace std;
 
 void Model_AttributeSelectionList::append(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape)
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape)
 {
   int aNewTag = mySize->Get() + 1;
   TDF_Label aNewLab = mySize->Label().FindChild(aNewTag);
 
-  boost::shared_ptr<Model_AttributeSelection> aNewAttr = 
-    boost::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aNewLab));
+  std::shared_ptr<Model_AttributeSelection> aNewAttr = 
+    std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aNewLab));
   if (owner()) {
     aNewAttr->setObject(owner());
   }
@@ -43,15 +43,15 @@ void Model_AttributeSelectionList::setSelectionType(int theType)
   mySelectionType->Set((double) theType);
 }
 
-boost::shared_ptr<ModelAPI_AttributeSelection> 
+std::shared_ptr<ModelAPI_AttributeSelection> 
   Model_AttributeSelectionList::value(const int theIndex)
 {
   TDF_Label aLabel = mySize->Label().FindChild(theIndex + 1);
   // create a new attribute each time, by demand
   // supporting of old attributes is too slow (synch each time) and buggy on redo
   // (if attribute is deleted and created, the abort updates attriute and makes the Attr invalid)
-  boost::shared_ptr<Model_AttributeSelection> aNewAttr = 
-    boost::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLabel));
+  std::shared_ptr<Model_AttributeSelection> aNewAttr = 
+    std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLabel));
   if (owner()) {
     aNewAttr->setObject(owner());
   }
index e52937e72e37dfc8af9fcdf031cba833f04e5a28..602e5b2382f53f4153e00209f8b371048a133b21 100644 (file)
@@ -25,7 +25,7 @@ class Model_AttributeSelectionList : public ModelAPI_AttributeSelectionList
 public:
   /// Adds the new reference to the end of the list
   MODEL_EXPORT virtual void append(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape);
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape);
 
   /// Returns the number ofselection attributes in the list
   MODEL_EXPORT virtual int size();
@@ -35,7 +35,7 @@ public:
   MODEL_EXPORT virtual void setSelectionType(int);
 
   /// Returns the attribute selection by the index (zero based)
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeSelection> value(const int theIndex);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeSelection> value(const int theIndex);
 
   /// Returns all attributes
   MODEL_EXPORT virtual void clear();
index 90bb20e2e2fa3a5d6983673d621249c616e7334c..77b834ada84f458a48bf33d6259c9659d57b1a19 100644 (file)
@@ -93,22 +93,22 @@ void Model_Data::addAttribute(const std::string& theID, const std::string theAtt
     anAttr = new GeomData_Point2D(anAttrLab);
   }
   if (anAttr) {
-    myAttrs[theID] = boost::shared_ptr<ModelAPI_Attribute>(anAttr);
+    myAttrs[theID] = std::shared_ptr<ModelAPI_Attribute>(anAttr);
     anAttr->setObject(myObject);
   } else {
     Events_Error::send("Can not create unknown type of attribute " + theAttrType);
   }
 }
 
-boost::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::document(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::document(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeDocRef>();
+    return std::shared_ptr<ModelAPI_AttributeDocRef>();
   }
-  boost::shared_ptr<ModelAPI_AttributeDocRef> aRes = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeDocRef> aRes = std::dynamic_pointer_cast<
       ModelAPI_AttributeDocRef>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
@@ -116,15 +116,15 @@ boost::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::document(const std::stri
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeDouble> Model_Data::real(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeDouble> Model_Data::real(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeDouble>();
+    return std::shared_ptr<ModelAPI_AttributeDouble>();
   }
-  boost::shared_ptr<ModelAPI_AttributeDouble> aRes = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeDouble> aRes = std::dynamic_pointer_cast<
       ModelAPI_AttributeDouble>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
@@ -132,15 +132,15 @@ boost::shared_ptr<ModelAPI_AttributeDouble> Model_Data::real(const std::string&
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeInteger> Model_Data::integer(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeInteger> Model_Data::integer(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeInteger>();
+    return std::shared_ptr<ModelAPI_AttributeInteger>();
   }
-  boost::shared_ptr<ModelAPI_AttributeInteger> aRes = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeInteger> aRes = std::dynamic_pointer_cast<
       ModelAPI_AttributeInteger>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
@@ -148,15 +148,15 @@ boost::shared_ptr<ModelAPI_AttributeInteger> Model_Data::integer(const std::stri
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeBoolean> Model_Data::boolean(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeBoolean> Model_Data::boolean(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeBoolean>();
+    return std::shared_ptr<ModelAPI_AttributeBoolean>();
   }
-  boost::shared_ptr<ModelAPI_AttributeBoolean> aRes = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeBoolean> aRes = std::dynamic_pointer_cast<
       ModelAPI_AttributeBoolean>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
@@ -164,16 +164,16 @@ boost::shared_ptr<ModelAPI_AttributeBoolean> Model_Data::boolean(const std::stri
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeString> Model_Data::string(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeString> Model_Data::string(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeString>();
+    return std::shared_ptr<ModelAPI_AttributeString>();
   }
-  boost::shared_ptr<ModelAPI_AttributeString> aRes =
-      boost::dynamic_pointer_cast<ModelAPI_AttributeString>(aFound->second);
+  std::shared_ptr<ModelAPI_AttributeString> aRes =
+      std::dynamic_pointer_cast<ModelAPI_AttributeString>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
   }
@@ -181,15 +181,15 @@ boost::shared_ptr<ModelAPI_AttributeString> Model_Data::string(const std::string
 
 }
 
-boost::shared_ptr<ModelAPI_AttributeReference> Model_Data::reference(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeReference> Model_Data::reference(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeReference>();
+    return std::shared_ptr<ModelAPI_AttributeReference>();
   }
-  boost::shared_ptr<ModelAPI_AttributeReference> aRes = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeReference> aRes = std::dynamic_pointer_cast<
       ModelAPI_AttributeReference>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
@@ -197,48 +197,48 @@ boost::shared_ptr<ModelAPI_AttributeReference> Model_Data::reference(const std::
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeSelection> Model_Data::selection(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeSelection> Model_Data::selection(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeSelection>();
+    return std::shared_ptr<ModelAPI_AttributeSelection>();
   }
-  boost::shared_ptr<ModelAPI_AttributeSelection> aRes = 
-    boost::dynamic_pointer_cast<ModelAPI_AttributeSelection>(aFound->second);
+  std::shared_ptr<ModelAPI_AttributeSelection> aRes = 
+    std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
   }
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeSelectionList> 
+std::shared_ptr<ModelAPI_AttributeSelectionList> 
   Model_Data::selectionList(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeSelectionList>();
+    return std::shared_ptr<ModelAPI_AttributeSelectionList>();
   }
-  boost::shared_ptr<ModelAPI_AttributeSelectionList> aRes = 
-    boost::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aFound->second);
+  std::shared_ptr<ModelAPI_AttributeSelectionList> aRes = 
+    std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
   }
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeRefAttr> Model_Data::refattr(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeRefAttr> Model_Data::refattr(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeRefAttr>();
+    return std::shared_ptr<ModelAPI_AttributeRefAttr>();
   }
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRes = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRes = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
@@ -246,15 +246,15 @@ boost::shared_ptr<ModelAPI_AttributeRefAttr> Model_Data::refattr(const std::stri
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_AttributeRefList> Model_Data::reflist(const std::string& theID)
+std::shared_ptr<ModelAPI_AttributeRefList> Model_Data::reflist(const std::string& theID)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aFound = 
     myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return boost::shared_ptr<ModelAPI_AttributeRefList>();
+    return std::shared_ptr<ModelAPI_AttributeRefList>();
   }
-  boost::shared_ptr<ModelAPI_AttributeRefList> aRes = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefList> aRes = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefList>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
@@ -262,17 +262,17 @@ boost::shared_ptr<ModelAPI_AttributeRefList> Model_Data::reflist(const std::stri
   return aRes;
 }
 
-boost::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string& theID)
+std::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string& theID)
 {
-  boost::shared_ptr<ModelAPI_Attribute> aResult;
+  std::shared_ptr<ModelAPI_Attribute> aResult;
   if (myAttrs.find(theID) == myAttrs.end())  // no such attribute
     return aResult;
   return myAttrs[theID];
 }
 
-const std::string& Model_Data::id(const boost::shared_ptr<ModelAPI_Attribute>& theAttr)
+const std::string& Model_Data::id(const std::shared_ptr<ModelAPI_Attribute>& theAttr)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = 
     myAttrs.begin();
   for (; anAttr != myAttrs.end(); anAttr++) {
     if (anAttr->second == theAttr)
@@ -283,9 +283,9 @@ const std::string& Model_Data::id(const boost::shared_ptr<ModelAPI_Attribute>& t
   return anEmpty;
 }
 
-bool Model_Data::isEqual(const boost::shared_ptr<ModelAPI_Data>& theData)
+bool Model_Data::isEqual(const std::shared_ptr<ModelAPI_Data>& theData)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(theData);
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(theData);
   if (aData)
     return myLab.IsEqual(aData->myLab) == Standard_True ;
   return false;
@@ -296,10 +296,10 @@ bool Model_Data::isValid()
   return !myLab.IsNull() && myLab.HasAttribute();
 }
 
-std::list<boost::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const std::string& theType)
+std::list<std::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const std::string& theType)
 {
-  std::list<boost::shared_ptr<ModelAPI_Attribute> > aResult;
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter = 
+  std::list<std::shared_ptr<ModelAPI_Attribute> > aResult;
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter = 
     myAttrs.begin();
   for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
     if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
@@ -312,7 +312,7 @@ std::list<boost::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const s
 std::list<std::string> Model_Data::attributesIDs(const std::string& theType) 
 {
   std::list<std::string> aResult;
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter = 
     myAttrs.begin();
   for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
     if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
@@ -364,8 +364,8 @@ int Model_Data::featureId() const
 void Model_Data::eraseBackReferences()
 {
   myRefsToMe.clear();
-  boost::shared_ptr<ModelAPI_Result> aRes = 
-    boost::dynamic_pointer_cast<ModelAPI_Result>(myObject);
+  std::shared_ptr<ModelAPI_Result> aRes = 
+    std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
   if (aRes)
     aRes->setIsConcealed(false);
 }
@@ -374,8 +374,8 @@ void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID)
 {
   myRefsToMe.insert(theFeature->data()->attribute(theAttrID));
   if (ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) {
-    boost::shared_ptr<ModelAPI_Result> aRes = 
-      boost::dynamic_pointer_cast<ModelAPI_Result>(myObject);
+    std::shared_ptr<ModelAPI_Result> aRes = 
+      std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
     if (aRes) {
       aRes->setIsConcealed(true);
     }
@@ -385,27 +385,27 @@ void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID)
 void Model_Data::referencesToObjects(
   std::list<std::pair<std::string, std::list<ObjectPtr> > >& theRefs)
 {
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = myAttrs.begin();
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = myAttrs.begin();
   std::list<ObjectPtr> aReferenced; // not inside of cycle to avoid excess memory menagement
   for(; anAttr != myAttrs.end(); anAttr++) {
     std::string aType = anAttr->second->attributeType();
     if (aType == ModelAPI_AttributeReference::type()) { // reference to object
-      boost::shared_ptr<ModelAPI_AttributeReference> aRef = boost::dynamic_pointer_cast<
+      std::shared_ptr<ModelAPI_AttributeReference> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeReference>(anAttr->second);
       aReferenced.push_back(aRef->value());
       theRefs.push_back(std::pair<std::string, std::list<ObjectPtr> >(anAttr->first, aReferenced));
     } else if (aType == ModelAPI_AttributeRefAttr::type()) { // reference to attribute or object
-      boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+      std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeRefAttr>(anAttr->second);
       aReferenced.push_back(aRef->isObject() ? aRef->object() : aRef->attr()->owner());
     } else if (aType == ModelAPI_AttributeRefList::type()) { // list of references
-      aReferenced = boost::dynamic_pointer_cast<ModelAPI_AttributeRefList>(anAttr->second)->list();
+      aReferenced = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(anAttr->second)->list();
     } else if (aType == ModelAPI_AttributeSelection::type()) { // selection attribute
-      boost::shared_ptr<ModelAPI_AttributeSelection> aRef = boost::dynamic_pointer_cast<
+      std::shared_ptr<ModelAPI_AttributeSelection> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeSelection>(anAttr->second);
       aReferenced.push_back(aRef->context());
     } else if (aType == ModelAPI_AttributeSelectionList::type()) { // list of selection attributes
-      boost::shared_ptr<ModelAPI_AttributeSelectionList> aRef = boost::dynamic_pointer_cast<
+      std::shared_ptr<ModelAPI_AttributeSelectionList> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeSelectionList>(anAttr->second);
       for(int a = aRef->size() - 1; a >= 0; a--) {
         aReferenced.push_back(aRef->value(a)->context());
index f23e684ca782ebc904478691fb9b383ab4eb1b95..1d82ad14be9a89ccb4619adf152f3f955142b01e 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <TDF_Label.hxx>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 
 #include <map>
 #include <list>
@@ -40,7 +40,7 @@ class Model_Data : public ModelAPI_Data
 {
   TDF_Label myLab;  ///< label of the feature in the document
   /// All attributes of the object identified by the attribute ID
-  std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> > myAttrs;
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> > myAttrs;
 
   /// needed here to emit signal that object changed on change of the attribute
   ObjectPtr myObject;
@@ -69,39 +69,39 @@ class Model_Data : public ModelAPI_Data
   /// Defines the name of the feature visible by the user in the object browser
   MODEL_EXPORT virtual void setName(const std::string& theName);
   /// Returns the attribute that references to another document
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID);
   /// Returns the attribute that contains real value with double precision
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID);
   /// Returns the attribute that contains integer value
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeInteger>
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeInteger>
     integer(const std::string& theID);
   /// Returns the attribute that contains reference to a feature
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeReference>
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeReference>
     reference(const std::string& theID);
   /// Returns the attribute that contains selection to a shape
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeSelection>
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeSelection>
     selection(const std::string& theID);
   /// Returns the attribute that contains selection to a shape
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeSelectionList> 
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeSelectionList> 
     selectionList(const std::string& theID);
   /// Returns the attribute that contains reference to an attribute of a feature
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeRefAttr>
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeRefAttr>
     refattr(const std::string& theID);
   /// Returns the attribute that contains list of references to features
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeRefList>
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeRefList>
     reflist(const std::string& theID);
   /// Returns the attribute that contains boolean value
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeBoolean>
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeBoolean>
     boolean(const std::string& theID);
   /// Returns the attribute that contains real value with double precision
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeString>
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeString>
     string(const std::string& theID);
   /// Returns the generic attribute by identifier
   /// \param theID identifier of the attribute
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID);
   /// Returns all attributes of the feature of the given type
   /// or all attributes if "theType" is empty
-  MODEL_EXPORT virtual std::list<boost::shared_ptr<ModelAPI_Attribute> >
+  MODEL_EXPORT virtual std::list<std::shared_ptr<ModelAPI_Attribute> >
     attributes(const std::string& theType);
   /// Returns all attributes ids of the feature of the given type
   /// or all attributes if "theType" is empty
@@ -109,9 +109,9 @@ class Model_Data : public ModelAPI_Data
 
   /// Identifier by the id (not fast, iteration by map)
   /// \param theAttr attribute already created in this data
-  MODEL_EXPORT virtual const std::string& id(const boost::shared_ptr<ModelAPI_Attribute>& theAttr);
+  MODEL_EXPORT virtual const std::string& id(const std::shared_ptr<ModelAPI_Attribute>& theAttr);
   /// Returns true if data belongs to same features
-  MODEL_EXPORT virtual bool isEqual(const boost::shared_ptr<ModelAPI_Data>& theData);
+  MODEL_EXPORT virtual bool isEqual(const std::shared_ptr<ModelAPI_Data>& theData);
   /// Returns true if it is correctly connected t othe data model
   MODEL_EXPORT virtual bool isValid();
 
index 1c902856732f4aa9100a62885cc807cb1870db9d..0fa26c8d45537daeeb879d4594a6207b18942ea6 100644 (file)
@@ -204,7 +204,7 @@ bool Model_Document::save(const char* theFileName, std::list<std::string>& theRe
 
 void Model_Document::close(const bool theForever)
 {
-  boost::shared_ptr<ModelAPI_Session> aPM = Model_Session::get();
+  std::shared_ptr<ModelAPI_Session> aPM = Model_Session::get();
   if (this != aPM->moduleDocument().get() && this == aPM->activeDocument().get()) {
     aPM->setActiveDocument(aPM->moduleDocument());
   }
@@ -215,10 +215,10 @@ void Model_Document::close(const bool theForever)
   mySubs.clear();
 
   // close for thid document needs no transaction in this document
-  boost::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(false);
+  std::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(false);
 
   // delete all features of this document
-  boost::shared_ptr<ModelAPI_Document> aThis = 
+  std::shared_ptr<ModelAPI_Document> aThis = 
     Model_Application::getApplication()->getDocument(myID);
   Events_Loop* aLoop = Events_Loop::loop();
   NCollection_DataMap<TDF_Label, FeaturePtr>::Iterator aFeaturesIter(myObjs);
@@ -240,7 +240,7 @@ void Model_Document::close(const bool theForever)
       myDoc->Close();
   }
 
-  boost::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(true);
+  std::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(true);
 }
 
 void Model_Document::startOperation()
@@ -289,7 +289,7 @@ void Model_Document::finishOperation()
 {
   // just to be sure that everybody knows that changes were performed
   if (!myDoc->HasOpenCommand() && myNestedNum != -1)
-    boost::static_pointer_cast<Model_Session>(Model_Session::get())
+    std::static_pointer_cast<Model_Session>(Model_Session::get())
         ->setCheckTransactions(false);  // for nested transaction commit
   synchronizeBackRefs();
   Events_Loop* aLoop = Events_Loop::loop();
@@ -303,7 +303,7 @@ void Model_Document::finishOperation()
   // and to rebuild everything after all updates and creates
   if (Model_Session::get()->moduleDocument().get() == this) { // once for root document
     Events_Loop::loop()->autoFlush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
-    static boost::shared_ptr<Events_Message> aFinishMsg
+    static std::shared_ptr<Events_Message> aFinishMsg
       (new Events_Message(Events_Loop::eventByName("FinishOperation")));
     Events_Loop::loop()->send(aFinishMsg);
     Events_Loop::loop()->autoFlush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED), false);
@@ -312,7 +312,7 @@ void Model_Document::finishOperation()
   //aLoop->clear(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
 
   if (!myDoc->HasOpenCommand() && myNestedNum != -1)
-    boost::static_pointer_cast<Model_Session>(Model_Session::get())
+    std::static_pointer_cast<Model_Session>(Model_Session::get())
         ->setCheckTransactions(true);  // for nested transaction commit
 
   // finish for all subs first: to avoid nested finishing and "isOperation" calls problems inside
@@ -445,7 +445,7 @@ FeaturePtr Model_Document::addFeature(std::string theID)
   FeaturePtr aFeature = ModelAPI_Session::get()->createFeature(theID);
   if (!aFeature)
     return aFeature;
-  boost::shared_ptr<Model_Document> aDocToAdd = boost::dynamic_pointer_cast<Model_Document>(
+  std::shared_ptr<Model_Document> aDocToAdd = std::dynamic_pointer_cast<Model_Document>(
       aFeature->documentToAdd());
   if (aFeature) {
     TDF_Label aFeatureLab;
@@ -511,8 +511,8 @@ void Model_Document::removeFeature(FeaturePtr theFeature, const bool theCheck)
     // check the feature: it must have no depended objects on it
     std::list<ResultPtr>::const_iterator aResIter = theFeature->results().cbegin();
     for(; aResIter != theFeature->results().cend(); aResIter++) {
-      boost::shared_ptr<Model_Data> aData = 
-        boost::dynamic_pointer_cast<Model_Data>((*aResIter)->data());
+      std::shared_ptr<Model_Data> aData = 
+        std::dynamic_pointer_cast<Model_Data>((*aResIter)->data());
       if (aData && !aData->refsToMe().empty()) {
         Events_Error::send(
           "Feature '" + theFeature->data()->name() + "' is used and can not be deleted");
@@ -521,7 +521,7 @@ void Model_Document::removeFeature(FeaturePtr theFeature, const bool theCheck)
     }
   }
 
-  boost::shared_ptr<Model_Data> aData = boost::static_pointer_cast<Model_Data>(theFeature->data());
+  std::shared_ptr<Model_Data> aData = std::static_pointer_cast<Model_Data>(theFeature->data());
   if (aData) {
     TDF_Label aFeatureLabel = aData->label().Father();
     if (myObjs.IsBound(aFeatureLabel))
@@ -557,10 +557,10 @@ ObjectPtr Model_Document::object(TDF_Label theLabel)
   TDF_Label aFeatureLabel = theLabel.Father().Father();  // let's suppose it is result
   aFeature = feature(aFeatureLabel);
   if (aFeature) {
-    const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
-    std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.cbegin();
+    const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
+    std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.cbegin();
     for (; aRIter != aResults.cend(); aRIter++) {
-      boost::shared_ptr<Model_Data> aResData = boost::dynamic_pointer_cast<Model_Data>(
+      std::shared_ptr<Model_Data> aResData = std::dynamic_pointer_cast<Model_Data>(
           (*aRIter)->data());
       if (aResData->label().Father().IsEqual(theLabel))
         return *aRIter;
@@ -569,7 +569,7 @@ ObjectPtr Model_Document::object(TDF_Label theLabel)
   return FeaturePtr();  // not found
 }
 
-boost::shared_ptr<ModelAPI_Document> Model_Document::subDocument(std::string theDocID)
+std::shared_ptr<ModelAPI_Document> Model_Document::subDocument(std::string theDocID)
 {
   // just store sub-document identifier here to manage it later
   if (mySubs.find(theDocID) == mySubs.end())
@@ -577,12 +577,12 @@ boost::shared_ptr<ModelAPI_Document> Model_Document::subDocument(std::string the
   return Model_Application::getApplication()->getDocument(theDocID);
 }
 
-boost::shared_ptr<Model_Document> Model_Document::subDoc(std::string theDocID)
+std::shared_ptr<Model_Document> Model_Document::subDoc(std::string theDocID)
 {
   // just store sub-document identifier here to manage it later
   if (mySubs.find(theDocID) == mySubs.end())
     mySubs.insert(theDocID);
-  return boost::dynamic_pointer_cast<Model_Document>(
+  return std::dynamic_pointer_cast<Model_Document>(
     Model_Application::getApplication()->getDocument(theDocID));
 }
 
@@ -616,8 +616,8 @@ ObjectPtr Model_Document::object(const std::string& theGroupID, const int theInd
     for (; aLabIter.More(); aLabIter.Next()) {
       TDF_Label aFLabel = aLabIter.Value()->Label();
       FeaturePtr aFeature = feature(aFLabel);
-      const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
-      std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+      const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
       for (; aRIter != aResults.cend(); aRIter++) {
         if ((*aRIter)->groupName() != theGroupID) continue;
         bool isIn = theHidden && (*aRIter)->isInHistory();
@@ -655,8 +655,8 @@ int Model_Document::size(const std::string& theGroupID, const bool theHidden)
       FeaturePtr aFeature = feature(aFLabel);
       if (!aFeature) // may be on close
         continue;
-      const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
-      std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+      const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
       for (; aRIter != aResults.cend(); aRIter++) {
         if ((*aRIter)->groupName() != theGroupID) continue;
         bool isIn = theHidden;
@@ -698,8 +698,8 @@ void Model_Document::setUniqueName(FeaturePtr theFeature)
     FeaturePtr aFeature = aFIter.Value();
     bool isSameName = aFeature->data()->name() == aName;
     if (!isSameName) {  // check also results to avoid same results names (actual for Parts)
-      const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
-      std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+      const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
       for (; aRIter != aResults.cend(); aRIter++) {
         isSameName = (*aRIter)->data()->name() == aName;
       }
@@ -719,14 +719,14 @@ void Model_Document::setUniqueName(FeaturePtr theFeature)
 
 void Model_Document::initData(ObjectPtr theObj, TDF_Label theLab, const int theTag)
 {
-  boost::shared_ptr<ModelAPI_Document> aThis = Model_Application::getApplication()->getDocument(
+  std::shared_ptr<ModelAPI_Document> aThis = Model_Application::getApplication()->getDocument(
       myID);
-  boost::shared_ptr<Model_Data> aData(new Model_Data);
+  std::shared_ptr<Model_Data> aData(new Model_Data);
   aData->setLabel(theLab.FindChild(theTag));
   aData->setObject(theObj);
   theObj->setDoc(aThis);
   theObj->setData(aData);
-  FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObj);
+  FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObj);
   if (aFeature) {
     setUniqueName(aFeature);  // must be before "initAttributes" because duplicate part uses name
     aFeature->initAttributes();
@@ -735,10 +735,10 @@ void Model_Document::initData(ObjectPtr theObj, TDF_Label theLab, const int theT
 
 void Model_Document::synchronizeFeatures(const bool theMarkUpdated, const bool theUpdateReferences)
 {
-  boost::shared_ptr<ModelAPI_Document> aThis = 
+  std::shared_ptr<ModelAPI_Document> aThis = 
     Model_Application::getApplication()->getDocument(myID);
   // after all updates, sends a message that groups of features were created or updated
-  boost::static_pointer_cast<Model_Session>(Model_Session::get())
+  std::static_pointer_cast<Model_Session>(Model_Session::get())
     ->setCheckTransactions(false);
   Events_Loop* aLoop = Events_Loop::loop();
   aLoop->activateFlushes(false);
@@ -798,8 +798,8 @@ void Model_Document::synchronizeFeatures(const bool theMarkUpdated, const bool t
       //}
       // results of this feature must be redisplayed (hided)
       static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
-      const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
-      std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+      const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
       // redisplay also removed feature (used for sketch and AISObject)
       ModelAPI_EventCreator::get()->sendUpdated(aFeature, EVENT_DISP);
       aFeature->erase();
@@ -823,14 +823,14 @@ void Model_Document::synchronizeFeatures(const bool theMarkUpdated, const bool t
   aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
   aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
   aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_TOHIDE));
-  boost::static_pointer_cast<Model_Session>(Model_Session::get())
+  std::static_pointer_cast<Model_Session>(Model_Session::get())
     ->setCheckTransactions(true);
   myExecuteFeatures = true;
 }
 
 void Model_Document::synchronizeBackRefs()
 {
-  boost::shared_ptr<ModelAPI_Document> aThis = 
+  std::shared_ptr<ModelAPI_Document> aThis = 
     Model_Application::getApplication()->getDocument(myID);
   // keeps the concealed flags of result to catch the change and create created/deleted events
   std::list<std::pair<ResultPtr, bool> > aConcealed;
@@ -838,16 +838,16 @@ void Model_Document::synchronizeBackRefs()
   NCollection_DataMap<TDF_Label, FeaturePtr>::Iterator aFeatures(myObjs);
   for(; aFeatures.More(); aFeatures.Next()) {
     FeaturePtr aFeature = aFeatures.Value();
-    boost::shared_ptr<Model_Data> aFData = 
-      boost::dynamic_pointer_cast<Model_Data>(aFeature->data());
+    std::shared_ptr<Model_Data> aFData = 
+      std::dynamic_pointer_cast<Model_Data>(aFeature->data());
     if (aFData) {
       aFData->eraseBackReferences();
     }
-    const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
-    std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+    const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
+    std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
     for (; aRIter != aResults.cend(); aRIter++) {
-      boost::shared_ptr<Model_Data> aResData = 
-        boost::dynamic_pointer_cast<Model_Data>((*aRIter)->data());
+      std::shared_ptr<Model_Data> aResData = 
+        std::dynamic_pointer_cast<Model_Data>((*aRIter)->data());
       if (aResData) {
         aConcealed.push_back(std::pair<ResultPtr, bool>(*aRIter, (*aRIter)->isConcealed()));
         aResData->eraseBackReferences();
@@ -859,8 +859,8 @@ void Model_Document::synchronizeBackRefs()
   ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators();
   for(aFeatures.Initialize(myObjs); aFeatures.More(); aFeatures.Next()) {
     FeaturePtr aFeature = aFeatures.Value();
-    boost::shared_ptr<Model_Data> aFData = 
-      boost::dynamic_pointer_cast<Model_Data>(aFeature->data());
+    std::shared_ptr<Model_Data> aFData = 
+      std::dynamic_pointer_cast<Model_Data>(aFeature->data());
     if (aFData) {
       std::list<std::pair<std::string, std::list<ObjectPtr> > > aRefs;
       aFData->referencesToObjects(aRefs);
@@ -869,8 +869,8 @@ void Model_Document::synchronizeBackRefs()
         std::list<ObjectPtr>::iterator aRefTo = aRefsIter->second.begin();
         for(; aRefTo != aRefsIter->second.end(); aRefTo++) {
           if (*aRefTo) {
-            boost::shared_ptr<Model_Data> aRefData = 
-              boost::dynamic_pointer_cast<Model_Data>((*aRefTo)->data());
+            std::shared_ptr<Model_Data> aRefData = 
+              std::dynamic_pointer_cast<Model_Data>((*aRefTo)->data());
             aRefData->addBackReference(aFeature, aRefsIter->first); // here the Concealed flag is updated
           }
         }
@@ -891,18 +891,18 @@ void Model_Document::synchronizeBackRefs()
 }
 
 TDF_Label Model_Document::resultLabel(
-  const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex) 
+  const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex) 
 {
-  const boost::shared_ptr<Model_Data>& aData = 
-    boost::dynamic_pointer_cast<Model_Data>(theFeatureData);
+  const std::shared_ptr<Model_Data>& aData = 
+    std::dynamic_pointer_cast<Model_Data>(theFeatureData);
   return aData->label().Father().FindChild(TAG_FEATURE_RESULTS).FindChild(theResultIndex + 1);
 }
 
-void Model_Document::storeResult(boost::shared_ptr<ModelAPI_Data> theFeatureData,
-                                 boost::shared_ptr<ModelAPI_Result> theResult,
+void Model_Document::storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
+                                 std::shared_ptr<ModelAPI_Result> theResult,
                                  const int theResultIndex)
 {
-  boost::shared_ptr<ModelAPI_Document> aThis = 
+  std::shared_ptr<ModelAPI_Document> aThis = 
     Model_Application::getApplication()->getDocument(myID);
   theResult->setDoc(aThis);
   initData(theResult, resultLabel(theFeatureData, theResultIndex), TAG_FEATURE_ARGUMENTS);
@@ -911,78 +911,78 @@ void Model_Document::storeResult(boost::shared_ptr<ModelAPI_Data> theFeatureData
   }
 }
 
-boost::shared_ptr<ModelAPI_ResultConstruction> Model_Document::createConstruction(
-    const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
+std::shared_ptr<ModelAPI_ResultConstruction> Model_Document::createConstruction(
+    const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
 {
   TDF_Label aLab = resultLabel(theFeatureData, theIndex);
   TDataStd_Comment::Set(aLab, ModelAPI_ResultConstruction::group().c_str());
   ObjectPtr anOldObject = object(aLab);
-  boost::shared_ptr<ModelAPI_ResultConstruction> aResult;
+  std::shared_ptr<ModelAPI_ResultConstruction> aResult;
   if (anOldObject) {
-    aResult = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(anOldObject);
+    aResult = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(anOldObject);
   }
   if (!aResult) {
-    aResult = boost::shared_ptr<ModelAPI_ResultConstruction>(new Model_ResultConstruction);
+    aResult = std::shared_ptr<ModelAPI_ResultConstruction>(new Model_ResultConstruction);
     storeResult(theFeatureData, aResult, theIndex);
   }
   return aResult;
 }
 
-boost::shared_ptr<ModelAPI_ResultBody> Model_Document::createBody(
-    const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
+std::shared_ptr<ModelAPI_ResultBody> Model_Document::createBody(
+    const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
 {
   TDF_Label aLab = resultLabel(theFeatureData, theIndex);
   TDataStd_Comment::Set(aLab, ModelAPI_ResultBody::group().c_str());
   ObjectPtr anOldObject = object(aLab);
-  boost::shared_ptr<ModelAPI_ResultBody> aResult;
+  std::shared_ptr<ModelAPI_ResultBody> aResult;
   if (anOldObject) {
-    aResult = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(anOldObject);
+    aResult = std::dynamic_pointer_cast<ModelAPI_ResultBody>(anOldObject);
   }
   if (!aResult) {
-    aResult = boost::shared_ptr<ModelAPI_ResultBody>(new Model_ResultBody);
+    aResult = std::shared_ptr<ModelAPI_ResultBody>(new Model_ResultBody);
     storeResult(theFeatureData, aResult, theIndex);
   }
   return aResult;
 }
 
-boost::shared_ptr<ModelAPI_ResultPart> Model_Document::createPart(
-    const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
+std::shared_ptr<ModelAPI_ResultPart> Model_Document::createPart(
+    const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
 {
   TDF_Label aLab = resultLabel(theFeatureData, theIndex);
   TDataStd_Comment::Set(aLab, ModelAPI_ResultPart::group().c_str());
   ObjectPtr anOldObject = object(aLab);
-  boost::shared_ptr<ModelAPI_ResultPart> aResult;
+  std::shared_ptr<ModelAPI_ResultPart> aResult;
   if (anOldObject) {
-    aResult = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(anOldObject);
+    aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(anOldObject);
   }
   if (!aResult) {
-    aResult = boost::shared_ptr<ModelAPI_ResultPart>(new Model_ResultPart);
+    aResult = std::shared_ptr<ModelAPI_ResultPart>(new Model_ResultPart);
     storeResult(theFeatureData, aResult, theIndex);
   }
   return aResult;
 }
 
-boost::shared_ptr<ModelAPI_ResultGroup> Model_Document::createGroup(
-    const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
+std::shared_ptr<ModelAPI_ResultGroup> Model_Document::createGroup(
+    const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
 {
   TDF_Label aLab = resultLabel(theFeatureData, theIndex);
   TDataStd_Comment::Set(aLab, ModelAPI_ResultGroup::group().c_str());
   ObjectPtr anOldObject = object(aLab);
-  boost::shared_ptr<ModelAPI_ResultGroup> aResult;
+  std::shared_ptr<ModelAPI_ResultGroup> aResult;
   if (anOldObject) {
-    aResult = boost::dynamic_pointer_cast<ModelAPI_ResultGroup>(anOldObject);
+    aResult = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(anOldObject);
   }
   if (!aResult) {
-    aResult = boost::shared_ptr<ModelAPI_ResultGroup>(new Model_ResultGroup(theFeatureData));
+    aResult = std::shared_ptr<ModelAPI_ResultGroup>(new Model_ResultGroup(theFeatureData));
     storeResult(theFeatureData, aResult, theIndex);
   }
   return aResult;
 }
 
-boost::shared_ptr<ModelAPI_Feature> Model_Document::feature(
-    const boost::shared_ptr<ModelAPI_Result>& theResult)
+std::shared_ptr<ModelAPI_Feature> Model_Document::feature(
+    const std::shared_ptr<ModelAPI_Result>& theResult)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(theResult->data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(theResult->data());
   if (aData) {
     TDF_Label aFeatureLab = aData->label().Father().Father().Father();
     return feature(aFeatureLab);
@@ -997,7 +997,7 @@ void Model_Document::updateResults(FeaturePtr theFeature)
   // check the existing results and remove them if there is nothing on the label
   std::list<ResultPtr>::const_iterator aResIter = theFeature->results().cbegin();
   while(aResIter != theFeature->results().cend()) {
-    ResultPtr aBody = boost::dynamic_pointer_cast<ModelAPI_Result>(*aResIter);
+    ResultPtr aBody = std::dynamic_pointer_cast<ModelAPI_Result>(*aResIter);
     if (aBody) {
       if (!aBody->data()->isValid()) { 
         // found a disappeared result => remove it
index 05d7d76eb39afc65b01e095272fa50258e97e9fb..519c57a19cb09a159de9f942672a7038e85b0307 100644 (file)
@@ -90,10 +90,10 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual ObjectPtr object(TDF_Label theLabel);
 
   //! Adds a new sub-document by the identifier, or returns existing one if it is already exist
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> subDocument(std::string theDocID);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> subDocument(std::string theDocID);
 
   //! Internal sub-document by ID
-  MODEL_EXPORT virtual boost::shared_ptr<Model_Document> subDoc(std::string theDocID);
+  MODEL_EXPORT virtual std::shared_ptr<Model_Document> subDoc(std::string theDocID);
 
   ///! Returns the id of hte document
   MODEL_EXPORT virtual const std::string& id() const
@@ -114,21 +114,21 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual int size(const std::string& theGroupID, const bool theHidden = false);
 
   /// Creates a construction cresults
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
   /// Creates a body results
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_ResultBody> createBody(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultBody> createBody(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
   /// Creates a part results
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_ResultPart> createPart(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultPart> createPart(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
   /// Creates a group results
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_ResultGroup> createGroup(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultGroup> createGroup(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
 
   //! Returns a feature by result (owner of result)
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Feature>
-    feature(const boost::shared_ptr<ModelAPI_Result>& theResult);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature>
+    feature(const std::shared_ptr<ModelAPI_Result>& theResult);
 
   ///! Returns true if parametric updater need to execute feature on recomputartion
   ///! On abort, undo or redo it is not necessary: results in document are updated automatically
@@ -166,12 +166,12 @@ class Model_Document : public ModelAPI_Document
   void initData(ObjectPtr theObj, TDF_Label theLab, const int theTag);
 
   //! Allows to store the result in the data tree of the document (attaches 'data' of result to tree)
-  MODEL_EXPORT virtual void storeResult(boost::shared_ptr<ModelAPI_Data> theFeatureData,
-                                        boost::shared_ptr<ModelAPI_Result> theResult,
+  MODEL_EXPORT virtual void storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
+                                        std::shared_ptr<ModelAPI_Result> theResult,
                                         const int theResultIndex = 0);
 
   //! returns the label of result by index; creates this label if it was not created before
-  TDF_Label resultLabel(const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex);
+  TDF_Label resultLabel(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex);
 
   //! Updates the results list of the feature basing on the current data tree
   void updateResults(FeaturePtr theFeature);
index 850b68d5daa12d2ae45bb23879a4cce0c6580340..a87fc9fb8a320d05b9569d0953b20fd624a22997 100644 (file)
@@ -12,15 +12,15 @@ Model_EventCreator MY_CREATOR;
 void Model_EventCreator::sendUpdated(const ObjectPtr& theObject, const Events_ID& theEvent,
                                      const bool isGroupped) const
 {
-  boost::shared_ptr<Model_ObjectUpdatedMessage> aMsg(
+  std::shared_ptr<Model_ObjectUpdatedMessage> aMsg(
     new Model_ObjectUpdatedMessage(theObject, theEvent));
   Events_Loop::loop()->send(aMsg, isGroupped);
 }
 
-void Model_EventCreator::sendDeleted(const boost::shared_ptr<ModelAPI_Document>& theDoc,
+void Model_EventCreator::sendDeleted(const std::shared_ptr<ModelAPI_Document>& theDoc,
                                      const std::string& theGroup) const
 {
-  boost::shared_ptr<Model_ObjectDeletedMessage> aMsg(
+  std::shared_ptr<Model_ObjectDeletedMessage> aMsg(
     new Model_ObjectDeletedMessage(theDoc, theGroup));
   Events_Loop::loop()->send(aMsg, true);
 }
@@ -45,17 +45,17 @@ const std::set<ObjectPtr>& Model_ObjectUpdatedMessage::objects() const
   return myObjects;
 }
 
-boost::shared_ptr<Events_MessageGroup> Model_ObjectUpdatedMessage::newEmpty()
+std::shared_ptr<Events_MessageGroup> Model_ObjectUpdatedMessage::newEmpty()
 {
   ObjectPtr anEmptyObject;
-  return boost::shared_ptr<Model_ObjectUpdatedMessage>(
+  return std::shared_ptr<Model_ObjectUpdatedMessage>(
     new Model_ObjectUpdatedMessage(anEmptyObject, eventID()));
 }
 
-void Model_ObjectUpdatedMessage::Join(const boost::shared_ptr<Events_MessageGroup>& theJoined)
+void Model_ObjectUpdatedMessage::Join(const std::shared_ptr<Events_MessageGroup>& theJoined)
 {
-  boost::shared_ptr<Model_ObjectUpdatedMessage> aJoined = 
-    boost::dynamic_pointer_cast<Model_ObjectUpdatedMessage>(theJoined);
+  std::shared_ptr<Model_ObjectUpdatedMessage> aJoined = 
+    std::dynamic_pointer_cast<Model_ObjectUpdatedMessage>(theJoined);
   std::set<ObjectPtr>::iterator aFIter = aJoined->myObjects.begin();
   for (; aFIter != aJoined->myObjects.end(); aFIter++) {
     myObjects.insert(*aFIter);
@@ -64,7 +64,7 @@ void Model_ObjectUpdatedMessage::Join(const boost::shared_ptr<Events_MessageGrou
 
 /////////////////////// DELETED MESSAGE /////////////////////////////
 Model_ObjectDeletedMessage::Model_ObjectDeletedMessage(
-    const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup)
+    const std::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup)
     : ModelAPI_ObjectDeletedMessage(messageId(), 0),
       myDoc(theDoc)
 {
@@ -72,9 +72,9 @@ Model_ObjectDeletedMessage::Model_ObjectDeletedMessage(
     myGroups.insert(theGroup);
 }
 
-boost::shared_ptr<Events_MessageGroup> Model_ObjectDeletedMessage::newEmpty()
+std::shared_ptr<Events_MessageGroup> Model_ObjectDeletedMessage::newEmpty()
 {
-  return boost::shared_ptr<Model_ObjectDeletedMessage>(new Model_ObjectDeletedMessage(myDoc, ""));
+  return std::shared_ptr<Model_ObjectDeletedMessage>(new Model_ObjectDeletedMessage(myDoc, ""));
 }
 
 const Events_ID Model_ObjectDeletedMessage::messageId()
@@ -83,10 +83,10 @@ const Events_ID Model_ObjectDeletedMessage::messageId()
   return MY_ID;
 }
 
-void Model_ObjectDeletedMessage::Join(const boost::shared_ptr<Events_MessageGroup>& theJoined)
+void Model_ObjectDeletedMessage::Join(const std::shared_ptr<Events_MessageGroup>& theJoined)
 {
-  boost::shared_ptr<Model_ObjectDeletedMessage> aJoined = 
-    boost::dynamic_pointer_cast<Model_ObjectDeletedMessage>(theJoined);
+  std::shared_ptr<Model_ObjectDeletedMessage> aJoined = 
+    std::dynamic_pointer_cast<Model_ObjectDeletedMessage>(theJoined);
   std::set<std::string>::iterator aGIter = aJoined->myGroups.begin();
   for (; aGIter != aJoined->myGroups.end(); aGIter++) {
     myGroups.insert(*aGIter);
index f30c447904ecd73694bb3796e5fda090b6297861..163c84581f7234059987c424dbb26be4968c0b7e 100644 (file)
@@ -16,7 +16,7 @@ class Model_EventCreator : public ModelAPI_EventCreator
   virtual void sendUpdated(const ObjectPtr& theObject, const Events_ID& theEvent,
                            const bool isGroupped = true) const;
   /// creates deleted message and sends to the loop
-  virtual void sendDeleted(const boost::shared_ptr<ModelAPI_Document>& theDoc,
+  virtual void sendDeleted(const std::shared_ptr<ModelAPI_Document>& theDoc,
                            const std::string& theGroup) const;
 
   /// must be one per application, the constructor for internal usage only
@@ -39,26 +39,26 @@ class Model_ObjectUpdatedMessage : public ModelAPI_ObjectUpdatedMessage
   virtual const std::set<ObjectPtr>& objects() const;
 
   //! Creates a new empty group (to store it in the loop before flush)
-  virtual boost::shared_ptr<Events_MessageGroup> newEmpty();
+  virtual std::shared_ptr<Events_MessageGroup> newEmpty();
 
   //! Allows to join the given message with the current one
-  virtual void Join(const boost::shared_ptr<Events_MessageGroup>& theJoined);
+  virtual void Join(const std::shared_ptr<Events_MessageGroup>& theJoined);
 };
 
 /// Message that feature was deleted (used for Object Browser update)
 class Model_ObjectDeletedMessage : public ModelAPI_ObjectDeletedMessage
 {
-  boost::shared_ptr<ModelAPI_Document> myDoc;  ///< document owner of the feature
+  std::shared_ptr<ModelAPI_Document> myDoc;  ///< document owner of the feature
   std::set<std::string> myGroups;  ///< group identifiers that contained the deleted feature
 
   /// Use ModelAPI for creation of this event.
-  Model_ObjectDeletedMessage(const boost::shared_ptr<ModelAPI_Document>& theDoc,
+  Model_ObjectDeletedMessage(const std::shared_ptr<ModelAPI_Document>& theDoc,
                              const std::string& theGroup);
 
   friend class Model_EventCreator;
  public:
   /// Returns the feature that has been updated
-  virtual boost::shared_ptr<ModelAPI_Document> document() const
+  virtual std::shared_ptr<ModelAPI_Document> document() const
   {
     return myDoc;
   }
@@ -69,11 +69,11 @@ class Model_ObjectDeletedMessage : public ModelAPI_ObjectDeletedMessage
     return myGroups;
   }
 
-  virtual boost::shared_ptr<Events_MessageGroup> newEmpty();
+  virtual std::shared_ptr<Events_MessageGroup> newEmpty();
 
   virtual const Events_ID messageId();
 
-  virtual void Join(const boost::shared_ptr<Events_MessageGroup>& theJoined);
+  virtual void Join(const std::shared_ptr<Events_MessageGroup>& theJoined);
 };
 
 #endif
index bcc09d11e13002fbef87b969afac32f1fba66894..6e609dd5d706cfcb0a6c76729b8a9126f646ae76 100644 (file)
@@ -9,12 +9,12 @@
 #include <ModelAPI_Object.h>
 
 #include <list>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
-bool Model_FeatureValidator::isValid(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
+bool Model_FeatureValidator::isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
   const std::list<std::string>& theArguments) const
 {
-  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+  std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
   if (!aData)
     return false;
   if (!aData->isValid())
index 95a4ce1c5672e973f535ba4c7ffa2a8f6c54cd8f..b262ff0ea552b0fee6cbb9d1ba2fc063fdbf4af5 100644 (file)
@@ -9,7 +9,7 @@
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_FeatureValidator.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <set>
 #include <map>
 
@@ -20,7 +20,7 @@ class Model_FeatureValidator : public ModelAPI_FeatureValidator
  public:
   /// Returns true if feature and/or attributes are valid
   /// \param theFeature the validated feature
-  MODEL_EXPORT virtual bool isValid(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
+  MODEL_EXPORT virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
     const std::list<std::string>& theArguments) const;
 
   // sets not obligatory attributes, not checked for initialization
index 3b9fb24abef3004bff582b8146d8ed0e51b87249..59c65ac9e470b92a2f184ee0258e8921952c62da 100644 (file)
@@ -33,9 +33,9 @@ Model_ResultBody::Model_ResultBody()
   setIsConcealed(false);
 }
 
-void Model_ResultBody::store(const boost::shared_ptr<GeomAPI_Shape>& theShape)
+void Model_ResultBody::store(const std::shared_ptr<GeomAPI_Shape>& theShape)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
     TDF_Label& aShapeLab = aData->shapeLab();
     // clean builders
@@ -52,10 +52,10 @@ void Model_ResultBody::store(const boost::shared_ptr<GeomAPI_Shape>& theShape)
   }
 }
 
-void Model_ResultBody::storeGenerated(const boost::shared_ptr<GeomAPI_Shape>& theFromShape,
-  const boost::shared_ptr<GeomAPI_Shape>& theToShape)
+void Model_ResultBody::storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+  const std::shared_ptr<GeomAPI_Shape>& theToShape)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
     TDF_Label& aShapeLab = aData->shapeLab();
     // clean builders
@@ -74,10 +74,10 @@ void Model_ResultBody::storeGenerated(const boost::shared_ptr<GeomAPI_Shape>& th
   }
 }
 
-void Model_ResultBody::storeModified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-  const boost::shared_ptr<GeomAPI_Shape>& theNewShape)
+void Model_ResultBody::storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+  const std::shared_ptr<GeomAPI_Shape>& theNewShape)
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
     TDF_Label& aShapeLab = aData->shapeLab();
     // clean builders
@@ -96,22 +96,22 @@ void Model_ResultBody::storeModified(const boost::shared_ptr<GeomAPI_Shape>& the
   }
 }
 
-boost::shared_ptr<GeomAPI_Shape> Model_ResultBody::shape()
+std::shared_ptr<GeomAPI_Shape> Model_ResultBody::shape()
 {
-  boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(data());
+  std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
     TDF_Label& aShapeLab = aData->shapeLab();
     Handle(TNaming_NamedShape) aName;
     if (aShapeLab.FindAttribute(TNaming_NamedShape::GetID(), aName)) {
       TopoDS_Shape aShape = aName->Get();
       if (!aShape.IsNull()) {
-        boost::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
+        std::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
         aRes->setImpl(new TopoDS_Shape(aShape));
         return aRes;
       }
     }
   }
-  return boost::shared_ptr<GeomAPI_Shape>();
+  return std::shared_ptr<GeomAPI_Shape>();
 }
 
 void Model_ResultBody::clean()
@@ -133,7 +133,7 @@ TNaming_Builder* Model_ResultBody::builder(const int theTag)
     myBuilders.insert(myBuilders.end(), theTag - myBuilders.size() + 1, NULL);
   }
   if (!myBuilders[theTag]) {
-    boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(data());
+    std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
     myBuilders[theTag] = new TNaming_Builder(aData->shapeLab().FindChild(theTag));
     //TCollection_AsciiString entry;//
     //TDF_Tool::Entry(aData->shapeLab().FindChild(theTag), entry);
@@ -143,14 +143,14 @@ TNaming_Builder* Model_ResultBody::builder(const int theTag)
 }
 
 void Model_ResultBody::generated(
-  const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag)
+  const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag)
 {
   TopoDS_Shape aShape = theNewShape->impl<TopoDS_Shape>();
   builder(theTag)->Generated(aShape);
 }
 
-void Model_ResultBody::generated(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-  const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag)
+void Model_ResultBody::generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+  const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag)
 {
   TopoDS_Shape anOldShape = theOldShape->impl<TopoDS_Shape>();
   TopoDS_Shape aNewShape = theNewShape->impl<TopoDS_Shape>();
@@ -158,15 +158,15 @@ void Model_ResultBody::generated(const boost::shared_ptr<GeomAPI_Shape>& theOldS
 }
 
 
-void Model_ResultBody::modified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-  const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag)
+void Model_ResultBody::modified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+  const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag)
 {
   TopoDS_Shape anOldShape = theOldShape->impl<TopoDS_Shape>();
   TopoDS_Shape aNewShape = theNewShape->impl<TopoDS_Shape>();
   builder(theTag)->Modify(anOldShape, aNewShape);
 }
 
-void Model_ResultBody::deleted(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
+void Model_ResultBody::deleted(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
   const int theTag)
 {
   TopoDS_Shape aShape = theOldShape->impl<TopoDS_Shape>();
@@ -174,7 +174,7 @@ void Model_ResultBody::deleted(const boost::shared_ptr<GeomAPI_Shape>& theOldSha
 }
 
 void Model_ResultBody::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
-  boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+  std::shared_ptr<GeomAPI_Shape>  theShapeIn,
   const int  theKindOfShape,
   const int  theTag)
 {
@@ -184,7 +184,7 @@ void Model_ResultBody::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& aRoot = ShapeExplorer.Current ();
     if (!aView.Add(aRoot)) continue;
-    boost::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
+    std::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
     aRShape->setImpl((new TopoDS_Shape(aRoot)));
     if (theMS->isDeleted (aRShape)) {
       builder(theTag)->Delete(aRoot);
@@ -194,7 +194,7 @@ void Model_ResultBody::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
 
 void Model_ResultBody::loadAndOrientModifiedShapes (
   GeomAlgoAPI_MakeShape* theMS,
-  boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+  std::shared_ptr<GeomAPI_Shape>  theShapeIn,
   const int  theKindOfShape,
   const int  theTag,
   GeomAPI_DataMapOfShapeShape& theSubShapes)
@@ -206,14 +206,14 @@ void Model_ResultBody::loadAndOrientModifiedShapes (
     const TopoDS_Shape& aRoot = aShapeExplorer.Current ();
     if (!aView.Add(aRoot)) continue;
     ListOfShape aList;
-    boost::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
+    std::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
     aRShape->setImpl((new TopoDS_Shape(aRoot)));
        theMS->modified(aRShape, aList);
-    std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = aList.begin(), aLast = aList.end();
+    std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = aList.begin(), aLast = aList.end();
     for (; anIt != aLast; anIt++) {
       TopoDS_Shape aNewShape = (*anIt)->impl<TopoDS_Shape>();    
       if (theSubShapes.isBound(*anIt)) {
-        boost::shared_ptr<GeomAPI_Shape> aMapShape(theSubShapes.find(*anIt));
+        std::shared_ptr<GeomAPI_Shape> aMapShape(theSubShapes.find(*anIt));
         aNewShape.Orientation(aMapShape->impl<TopoDS_Shape>().Orientation());
       }
       if (!aRoot.IsSame (aNewShape)) 
@@ -224,7 +224,7 @@ void Model_ResultBody::loadAndOrientModifiedShapes (
 
 void Model_ResultBody::loadAndOrientGeneratedShapes (
   GeomAlgoAPI_MakeShape* theMS,
-  boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+  std::shared_ptr<GeomAPI_Shape>  theShapeIn,
   const int  theKindOfShape,
   const int  theTag,
   GeomAPI_DataMapOfShapeShape& theSubShapes)
@@ -236,14 +236,14 @@ void Model_ResultBody::loadAndOrientGeneratedShapes (
     const TopoDS_Shape& aRoot = aShapeExplorer.Current ();
     if (!aView.Add(aRoot)) continue;
     ListOfShape aList;
-    boost::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
+    std::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
     aRShape->setImpl((new TopoDS_Shape(aRoot)));
     theMS->generated(aRShape, aList);
-    std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = aList.begin(), aLast = aList.end();
+    std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = aList.begin(), aLast = aList.end();
     for (; anIt != aLast; anIt++) {
       TopoDS_Shape aNewShape = (*anIt)->impl<TopoDS_Shape>();    
       if (theSubShapes.isBound(*anIt)) {
-        boost::shared_ptr<GeomAPI_Shape> aMapShape(theSubShapes.find(*anIt));
+        std::shared_ptr<GeomAPI_Shape> aMapShape(theSubShapes.find(*anIt));
         aNewShape.Orientation(aMapShape->impl<TopoDS_Shape>().Orientation());
       }
       if (!aRoot.IsSame (aNewShape)) 
@@ -286,7 +286,7 @@ void loadGeneratedDangleShapes(
 }
 
 //=======================================================================
-void Model_ResultBody::loadNextLevels(boost::shared_ptr<GeomAPI_Shape> theShape, 
+void Model_ResultBody::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape, 
                                          int&  theTag)
 {
   if(theShape->isNull()) return;
@@ -352,7 +352,7 @@ void Model_ResultBody::loadNextLevels(boost::shared_ptr<GeomAPI_Shape> theShape,
 }
 //=======================================================================
 void Model_ResultBody::loadFirstLevel(
-                    boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag)
+                    std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag)
 {
  if(theShape->isNull()) return;
  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();    
@@ -363,17 +363,17 @@ void Model_ResultBody::loadFirstLevel(
       if (itr.Value().ShapeType() == TopAbs_COMPOUND || 
                  itr.Value().ShapeType() == TopAbs_COMPSOLID) 
          {
-               boost::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
+               std::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
         itrShape->setImpl(new TopoDS_Shape(itr.Value()));
            loadFirstLevel(itrShape, theTag);
       } else {
-               boost::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
+               std::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
         itrShape->setImpl(new TopoDS_Shape(itr.Value()));
                loadNextLevels(itrShape, theTag);
          }
     }
   } else {
-    boost::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
+    std::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
     itrShape->setImpl(new TopoDS_Shape(aShape));
        loadNextLevels(itrShape, theTag); 
   }
@@ -381,7 +381,7 @@ void Model_ResultBody::loadFirstLevel(
 
 //=======================================================================
 void Model_ResultBody::loadDisconnectedEdges(
-                    boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag)
+                    std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag)
 {
   if(theShape->isNull()) return;
   TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();  
@@ -444,7 +444,7 @@ void Model_ResultBody::loadDisconnectedEdges(
   }
 }
 
-void Model_ResultBody::loadDisconnectedVertexes(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag)
+void Model_ResultBody::loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag)
 {
   if(theShape->isNull()) return;
   TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();  
index 45330a31e7bfff1198c6587c07e15483c87e6c3a..28f268d83d1204d0da7f4d90d9b0e206cf91822a 100644 (file)
@@ -28,69 +28,69 @@ class Model_ResultBody : public ModelAPI_ResultBody
   std::vector<TNaming_Builder*> myBuilders;
 public:
   /// Stores the shape (called by the execution method).
-  MODEL_EXPORT virtual void store(const boost::shared_ptr<GeomAPI_Shape>& theShape);
+  MODEL_EXPORT virtual void store(const std::shared_ptr<GeomAPI_Shape>& theShape);
 
   /// Stores the generated shape (called by the execution method).
-  MODEL_EXPORT virtual void storeGenerated(const boost::shared_ptr<GeomAPI_Shape>& theFromShape,
-                                              const boost::shared_ptr<GeomAPI_Shape>& theToShape);
+  MODEL_EXPORT virtual void storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+                                              const std::shared_ptr<GeomAPI_Shape>& theToShape);
 
   /// Stores the modified shape (called by the execution method).
-  MODEL_EXPORT virtual void storeModified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-                                              const boost::shared_ptr<GeomAPI_Shape>& theNewShape);
+  MODEL_EXPORT virtual void storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+                                              const std::shared_ptr<GeomAPI_Shape>& theNewShape);
 
   /// Returns the shape-result produced by this feature
-  MODEL_EXPORT virtual boost::shared_ptr<GeomAPI_Shape> shape();
+  MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
 
   /// Records the subshape newShape which was generated during a topological construction.
   /// As an example, consider the case of a face generated in construction of a box.
-  MODEL_EXPORT virtual void generated(const boost::shared_ptr<GeomAPI_Shape>& theNewShape, 
+  MODEL_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theNewShape, 
     const int theTag = 1);
 
   /// Records the shape newShape which was generated from the shape oldShape during a topological 
   /// construction. As an example, consider the case of a face generated from an edge in 
   /// construction of a prism.
-  MODEL_EXPORT virtual void generated(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1);
+  MODEL_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1);
 
 
   /// Records the shape newShape which is a modification of the shape oldShape.
   /// As an example, consider the case of a face split or merged in a Boolean operation.
-  MODEL_EXPORT virtual void modified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1);
+  MODEL_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1);
 
   /// Records the shape oldShape which was deleted from the current label.
   /// As an example, consider the case of a face removed by a Boolean operation.
-  MODEL_EXPORT virtual void deleted(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
+  MODEL_EXPORT virtual void deleted(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
     const int theTag = 1);
 
   /// load deleted shapes
   MODEL_EXPORT virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
-                                               boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+                                               std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
                                                const int  theTag);
   /// load and orient modified shapes
   MODEL_EXPORT virtual void loadAndOrientModifiedShapes (
                                                   GeomAlgoAPI_MakeShape* theMS,
-                                               boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+                                               std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
                                                const int  theTag,
                                                GeomAPI_DataMapOfShapeShape& theSubShapes);
    /// load and orient generated shapes
   MODEL_EXPORT virtual void loadAndOrientGeneratedShapes (
                                                   GeomAlgoAPI_MakeShape* theMS,
-                                               boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+                                               std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
                                                const int  theTag,
                                                GeomAPI_DataMapOfShapeShape& theSubShapes);
   
   /// Loads shapes of the first level (to be used during shape import)
-  MODEL_EXPORT virtual void loadFirstLevel(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
+  MODEL_EXPORT virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
   
   /// Loads disconnected edges
-  MODEL_EXPORT virtual void loadDisconnectedEdges(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
+  MODEL_EXPORT virtual void loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
 
   /// Loads disconnected vetexes
-  MODEL_EXPORT virtual void loadDisconnectedVertexes(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
+  MODEL_EXPORT virtual void loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
 
   /// Removes the stored builders
   MODEL_EXPORT virtual ~Model_ResultBody();
@@ -107,7 +107,7 @@ protected:
 
 private:
   /// Loads shapes of the next level (to be used during shape import)
-  void loadNextLevels(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
+  void loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag);
 
   friend class Model_Document;
 };
index 8af38252d8805c917b64bb5b34ace6b63ed55860..30a1cd467c063854bc8381c20c64e830eb2a8243 100644 (file)
@@ -4,12 +4,12 @@
 
 #include <Model_ResultConstruction.h>
 
-void Model_ResultConstruction::setShape(boost::shared_ptr<GeomAPI_Shape> theShape)
+void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> theShape)
 {
   myShape = theShape;
 }
 
-boost::shared_ptr<GeomAPI_Shape>& Model_ResultConstruction::shape()
+std::shared_ptr<GeomAPI_Shape>& Model_ResultConstruction::shape()
 {
   return myShape;
 }
index 5b6e9b472f9008069d0e7c274144c83014406de3..f2581f3df275326ecbf6d2ce2c7fcce9386a7079 100644 (file)
@@ -17,8 +17,8 @@
  */
 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"
+  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.
@@ -28,9 +28,9 @@ class Model_ResultConstruction : public ModelAPI_ResultConstruction
   }
 
   /// 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();
+  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);
index 3e467395d827eded82e71d7e8ceb128c715bc4df..fbfe1d923d5b6ecfd34ffd794da6e36e82bfd131 100644 (file)
@@ -6,21 +6,21 @@
 #include <ModelAPI_AttributeSelectionList.h>
 #include <GeomAlgoAPI_CompoundBuilder.h>
 
-Model_ResultGroup::Model_ResultGroup(boost::shared_ptr<ModelAPI_Data> theOwnerData)
+Model_ResultGroup::Model_ResultGroup(std::shared_ptr<ModelAPI_Data> theOwnerData)
 {
   setIsConcealed(false);
   myOwnerData = theOwnerData;
 }
 
-boost::shared_ptr<GeomAPI_Shape> Model_ResultGroup::shape() const
+std::shared_ptr<GeomAPI_Shape> Model_ResultGroup::shape() const
 {
-  boost::shared_ptr<GeomAPI_Shape> aResult;
+  std::shared_ptr<GeomAPI_Shape> aResult;
   if (myOwnerData) {
     AttributeSelectionListPtr aList = myOwnerData->selectionList("group_list");
     if (aList) {
-      std::list<boost::shared_ptr<GeomAPI_Shape> > aSubs;
+      std::list<std::shared_ptr<GeomAPI_Shape> > aSubs;
       for(int a = aList->size() - 1; a >= 0; a--) {
-        boost::shared_ptr<GeomAPI_Shape> aSelection = aList->value(a)->value();
+        std::shared_ptr<GeomAPI_Shape> aSelection = aList->value(a)->value();
         if (aSelection && !aSelection->isNull()) {
           aSubs.push_back(aSelection);
         }
index 30e3588985df75aa18e674e1e648f2748410846b..17d7b9da9a3d0a6681a45b8250aad5cb613856de 100644 (file)
  */
 class Model_ResultGroup : public ModelAPI_ResultGroup
 {
-  boost::shared_ptr<ModelAPI_Data> myOwnerData;  ///< data of owner of this result
+  std::shared_ptr<ModelAPI_Data> myOwnerData;  ///< data of owner of this result
 public:
   /// Returns the compound of selected entities
-  MODEL_EXPORT virtual boost::shared_ptr<GeomAPI_Shape> shape() const;
+  MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape() const;
 
   /// Removes the stored builders
   MODEL_EXPORT virtual ~Model_ResultGroup() {}
 
 protected:
   /// Makes a body on the given feature data
-  Model_ResultGroup(boost::shared_ptr<ModelAPI_Data> theOwnerData);
+  Model_ResultGroup(std::shared_ptr<ModelAPI_Data> theOwnerData);
 
   friend class Model_Document;
 };
index a1fb09b010ff87b8cbbc935e96201ebcbb7d1dfe..3032d6f9de0ae1d7aabcfc39046d8636ebcfc545 100644 (file)
@@ -7,14 +7,14 @@
 #include <ModelAPI_AttributeDocRef.h>
 #include <ModelAPI_Session.h>
 
-boost::shared_ptr<ModelAPI_Document> Model_ResultPart::partDoc()
+std::shared_ptr<ModelAPI_Document> Model_ResultPart::partDoc()
 {
   return data()->document("PartDocument")->value();
 }
 
-boost::shared_ptr<ModelAPI_Feature> Model_ResultPart::owner()
+std::shared_ptr<ModelAPI_Feature> Model_ResultPart::owner()
 {
-  return boost::shared_ptr<ModelAPI_Feature>();  // return empty pointer
+  return std::shared_ptr<ModelAPI_Feature>();  // return empty pointer
 }
 
 Model_ResultPart::Model_ResultPart()
@@ -22,7 +22,7 @@ Model_ResultPart::Model_ResultPart()
   setIsConcealed(false);
 }
 
-void Model_ResultPart::setData(boost::shared_ptr<ModelAPI_Data> theData)
+void Model_ResultPart::setData(std::shared_ptr<ModelAPI_Data> theData)
 {
   ModelAPI_Result::setData(theData);
   if (theData) {
@@ -32,10 +32,10 @@ void Model_ResultPart::setData(boost::shared_ptr<ModelAPI_Data> theData)
 
 void Model_ResultPart::activate()
 {
-  boost::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
+  std::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
   
   if (!aDocRef->value()) {  // create (or open) a document if it is not yet created
-    boost::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
+    std::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
     if (aDoc) {
       aDocRef->setValue(aDoc);
     }
index e26413c3fb13d0b69c59395070c7bee3cd0b3212..2df33884e46b12f74e898415f8ff648c5fbf3b19 100644 (file)
@@ -19,9 +19,9 @@ class Model_ResultPart : public ModelAPI_ResultPart
 {
  public:
   /// Returns the part-document of this result
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> partDoc();
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> partDoc();
   /// Part has no stored feature: this method returns NULL
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Feature> owner();
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> owner();
 
   /// Sets this document as current and if it is not loaded yet, loads it
   MODEL_EXPORT virtual void activate();
@@ -31,7 +31,7 @@ protected:
   Model_ResultPart();
 
   /// Sets the data manager of an object (document does), here also attributes are initialized
-  virtual void setData(boost::shared_ptr<ModelAPI_Data> theData);
+  virtual void setData(std::shared_ptr<ModelAPI_Data> theData);
 
   friend class Model_Document;
 };
index 2c624b8aabadf5fb7da45380d381b79283ba325a..d8e5166986f5a7cfb9329ccf7747ba2e0993dfde 100644 (file)
@@ -27,7 +27,7 @@ using namespace std;
 static Model_Session* myImpl = new Model_Session();
 
 // t oredirect all calls to the root document
-#define ROOT_DOC boost::dynamic_pointer_cast<Model_Document>(moduleDocument())
+#define ROOT_DOC std::dynamic_pointer_cast<Model_Document>(moduleDocument())
 
 bool Model_Session::load(const char* theFileName)
 {
@@ -48,7 +48,7 @@ void Model_Session::closeAll()
 void Model_Session::startOperation()
 {
   ROOT_DOC->startOperation();
-  static boost::shared_ptr<Events_Message> aStartedMsg
+  static std::shared_ptr<Events_Message> aStartedMsg
     (new Events_Message(Events_Loop::eventByName("StartOperation")));
   Events_Loop::loop()->send(aStartedMsg);
 }
@@ -61,7 +61,7 @@ void Model_Session::finishOperation()
 void Model_Session::abortOperation()
 {
   ROOT_DOC->abortOperation();
-  static boost::shared_ptr<Events_Message> anAbortMsg
+  static std::shared_ptr<Events_Message> anAbortMsg
     (new Events_Message(Events_Loop::eventByName("AbortOperation")));
   Events_Loop::loop()->send(anAbortMsg);
 }
@@ -135,9 +135,9 @@ FeaturePtr Model_Session::createFeature(string theFeatureID)
   return FeaturePtr();  // return nothing
 }
 
-boost::shared_ptr<ModelAPI_Document> Model_Session::moduleDocument()
+std::shared_ptr<ModelAPI_Document> Model_Session::moduleDocument()
 {
-  return boost::shared_ptr<ModelAPI_Document>(
+  return std::shared_ptr<ModelAPI_Document>(
       Model_Application::getApplication()->getDocument("root"));
 }
 
@@ -146,7 +146,7 @@ bool Model_Session::hasModuleDocument()
   return Model_Application::getApplication()->hasDocument("root");
 }
 
-boost::shared_ptr<ModelAPI_Document> Model_Session::activeDocument()
+std::shared_ptr<ModelAPI_Document> Model_Session::activeDocument()
 {
   if (!myCurrentDoc || !Model_Application::getApplication()->hasDocument(myCurrentDoc->id()))
     myCurrentDoc = moduleDocument();
@@ -154,26 +154,26 @@ boost::shared_ptr<ModelAPI_Document> Model_Session::activeDocument()
 }
 
 void Model_Session::setActiveDocument(
-  boost::shared_ptr<ModelAPI_Document> theDoc, bool theSendSignal)
+  std::shared_ptr<ModelAPI_Document> theDoc, bool theSendSignal)
 {
   if (myCurrentDoc != theDoc) {
     myCurrentDoc = theDoc;
     if (theSendSignal) {
-      static boost::shared_ptr<Events_Message> aMsg(new Events_Message(Events_Loop::eventByName("CurrentDocumentChanged")));
+      static std::shared_ptr<Events_Message> aMsg(new Events_Message(Events_Loop::eventByName("CurrentDocumentChanged")));
       Events_Loop::loop()->send(aMsg);
     }
   }
 }
 
-std::list<boost::shared_ptr<ModelAPI_Document> > Model_Session::allOpenedDocuments()
+std::list<std::shared_ptr<ModelAPI_Document> > Model_Session::allOpenedDocuments()
 {
-  list<boost::shared_ptr<ModelAPI_Document> > aResult;
+  list<std::shared_ptr<ModelAPI_Document> > aResult;
   aResult.push_back(moduleDocument());
   // add subs recursively
-  list<boost::shared_ptr<ModelAPI_Document> >::iterator aDoc = aResult.begin();
+  list<std::shared_ptr<ModelAPI_Document> >::iterator aDoc = aResult.begin();
   for(; aDoc != aResult.end(); aDoc++) {
     DocumentPtr anAPIDoc = *aDoc;
-    boost::shared_ptr<Model_Document> aDoc = boost::dynamic_pointer_cast<Model_Document>(anAPIDoc);
+    std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(anAPIDoc);
     if (aDoc) {
       std::set<std::string>::const_iterator aSubIter = aDoc->subDocuments().cbegin();
       for(; aSubIter != aDoc->subDocuments().cend(); aSubIter++) {
@@ -186,14 +186,14 @@ std::list<boost::shared_ptr<ModelAPI_Document> > Model_Session::allOpenedDocumen
   return aResult;
 }
 
-boost::shared_ptr<ModelAPI_Document> Model_Session::copy(
-    boost::shared_ptr<ModelAPI_Document> theSource, std::string theID)
+std::shared_ptr<ModelAPI_Document> Model_Session::copy(
+    std::shared_ptr<ModelAPI_Document> theSource, std::string theID)
 {
   // create a new document
-  boost::shared_ptr<Model_Document> aNew = boost::dynamic_pointer_cast<Model_Document>(
+  std::shared_ptr<Model_Document> aNew = std::dynamic_pointer_cast<Model_Document>(
       Model_Application::getApplication()->getDocument(theID));
   // make a copy of all labels
-  TDF_Label aSourceRoot = boost::dynamic_pointer_cast<Model_Document>(theSource)->document()->Main()
+  TDF_Label aSourceRoot = std::dynamic_pointer_cast<Model_Document>(theSource)->document()->Main()
       .Father();
   TDF_Label aTargetRoot = aNew->document()->Main().Father();
   Handle(TDF_DataSet) aDS = new TDF_DataSet;
@@ -211,7 +211,7 @@ Model_Session::Model_Session()
 {
   myPluginsInfoLoaded = false;
   myCheckTransactions = true;
-  ModelAPI_Session::setSession(boost::shared_ptr<ModelAPI_Session>(this));
+  ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session>(this));
   // register the configuration reading listener
   Events_Loop* aLoop = Events_Loop::loop();
   static const Events_ID kFeatureEvent = Events_Loop::eventByName(Config_FeatureMessage::MODEL_EVENT());
@@ -222,13 +222,13 @@ Model_Session::Model_Session()
   aLoop->registerListener(this, Events_Loop::eventByName(EVENT_VALIDATOR_LOADED));
 }
 
-void Model_Session::processEvent(const boost::shared_ptr<Events_Message>& theMessage)
+void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
   static const Events_ID kFeatureEvent = Events_Loop::eventByName(Config_FeatureMessage::MODEL_EVENT());
   static const Events_ID kValidatorEvent = Events_Loop::eventByName(EVENT_VALIDATOR_LOADED);
   if (theMessage->eventID() == kFeatureEvent) {
-    const boost::shared_ptr<Config_FeatureMessage> aMsg = 
-      boost::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
+    const std::shared_ptr<Config_FeatureMessage> aMsg = 
+      std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
     if (aMsg) {
       // proccess the plugin info, load plugin
       if (myPlugins.find(aMsg->id()) == myPlugins.end()) {
@@ -236,8 +236,8 @@ void Model_Session::processEvent(const boost::shared_ptr<Events_Message>& theMes
           aMsg->pluginLibrary(), aMsg->documentKind());
       }
     } else {
-      const boost::shared_ptr<Config_AttributeMessage> aMsgAttr = 
-        boost::dynamic_pointer_cast<Config_AttributeMessage>(theMessage);
+      const std::shared_ptr<Config_AttributeMessage> aMsgAttr = 
+        std::dynamic_pointer_cast<Config_AttributeMessage>(theMessage);
       if (aMsgAttr) {
         if (!aMsgAttr->isObligatory()) {
           validators()->registerNotObligatory(aMsgAttr->featureId(), aMsgAttr->attributeId());
@@ -251,8 +251,8 @@ void Model_Session::processEvent(const boost::shared_ptr<Events_Message>& theMes
     // plugins information was started to load, so, it will be loaded
     myPluginsInfoLoaded = true;
   } else if (theMessage->eventID() == kValidatorEvent) {
-    boost::shared_ptr<Config_ValidatorMessage> aMsg = 
-      boost::dynamic_pointer_cast<Config_ValidatorMessage>(theMessage);
+    std::shared_ptr<Config_ValidatorMessage> aMsg = 
+      std::dynamic_pointer_cast<Config_ValidatorMessage>(theMessage);
     if (aMsg) {
       if (aMsg->attributeId().empty()) {  // feature validator
         validators()->assignValidator(aMsg->validatorId(), aMsg->featureId(), aMsg->parameters());
index 5186a2497f7da6ad3ccc9da9ea1b707089db7f44..72977752ad95671df6004834cc35e92f1007b8ea 100644 (file)
@@ -27,7 +27,7 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
   std::map<std::string, std::pair<std::string, std::string> > myPlugins; 
   std::map<std::string, ModelAPI_Plugin*> myPluginObjs;  ///< instances of the already plugins
   std::string myCurrentPluginName;  ///< name of the plugin that must be loaded currently
-  boost::shared_ptr<ModelAPI_Document> myCurrentDoc;  ///< current working document
+  std::shared_ptr<ModelAPI_Document> myCurrentDoc;  ///< current working document
   bool myCheckTransactions;  ///< if true, generates error if document is updated outside of transaction
  public:
 
@@ -67,20 +67,20 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
   MODEL_EXPORT virtual void redo();
 
   /// Returns the root document of the application (that may contains sub-documents)
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> moduleDocument();
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> moduleDocument();
 
   /// Return true if root document has been already created
   MODEL_EXPORT virtual bool hasModuleDocument();
 
   /// Returns the current document that used for current work in the application
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> activeDocument();
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> activeDocument();
 
   /// Defines the current document that used for current work in the application
   MODEL_EXPORT virtual void setActiveDocument(
-    boost::shared_ptr<ModelAPI_Document> theDoc, bool theSendSignal = true);
+    std::shared_ptr<ModelAPI_Document> theDoc, bool theSendSignal = true);
 
   /// Returns all the opened documents of the session (without postponed)
-  MODEL_EXPORT virtual std::list<boost::shared_ptr<ModelAPI_Document> > allOpenedDocuments();
+  MODEL_EXPORT virtual std::list<std::shared_ptr<ModelAPI_Document> > allOpenedDocuments();
 
   /// Registers the plugin that creates features.
   /// It is obligatory for each plugin to call this function on loading to be found by 
@@ -88,11 +88,11 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
   MODEL_EXPORT virtual void registerPlugin(ModelAPI_Plugin* thePlugin);
 
   /// Processes the configuration file reading
-  MODEL_EXPORT virtual void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+  MODEL_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
   /// Copies the document to the new one wit hthe given id
-  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> copy(
-      boost::shared_ptr<ModelAPI_Document> theSource, std::string theID);
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> copy(
+      std::shared_ptr<ModelAPI_Document> theSource, std::string theID);
 
   /// Returns the validators factory: the only one instance per application
   MODEL_EXPORT virtual ModelAPI_ValidatorsFactory* validators();
index 910527bb2702fdc4d93185b0fb557870d5c76b17..8aa00217e8bbc546b2784ef0999a17a69285842d 100644 (file)
@@ -52,7 +52,7 @@ Model_Update::Model_Update()
   isAutomatic = Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true";
 }
 
-void Model_Update::processEvent(const boost::shared_ptr<Events_Message>& theMessage)
+void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
   static Events_Loop* aLoop = Events_Loop::loop();
   static const Events_ID kChangedEvent = aLoop->eventByName("PreferenceChanged");
@@ -74,8 +74,8 @@ void Model_Update::processEvent(const boost::shared_ptr<Events_Message>& theMess
     }
   } else if (theMessage->eventID() == kCreatedEvent || theMessage->eventID() == kUpdatedEvent ||
     theMessage->eventID() == kMovedEvent) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     const std::set<ObjectPtr>& anObjs = aMsg->objects();
     std::set<ObjectPtr>::const_iterator anObjIter = anObjs.cbegin();
     for(; anObjIter != anObjs.cend(); anObjIter++) {
@@ -93,10 +93,10 @@ void Model_Update::processEvent(const boost::shared_ptr<Events_Message>& theMess
     }
     // the hardcode (DBC asked): hide the sketch referenced by extrusion on apply
     if (theMessage->eventID() == kOpFinishEvent) {
-      std::set<boost::shared_ptr<ModelAPI_Object> >::iterator aFIter;
+      std::set<std::shared_ptr<ModelAPI_Object> >::iterator aFIter;
       for(aFIter = myJustCreatedOrUpdated.begin(); aFIter != myJustCreatedOrUpdated.end(); aFIter++)
       {
-        FeaturePtr aF = boost::dynamic_pointer_cast<ModelAPI_Feature>(*aFIter);
+        FeaturePtr aF = std::dynamic_pointer_cast<ModelAPI_Feature>(*aFIter);
         if (aF && aF->getKind() == "Extrusion") {
           if (aF->selection("extrusion_face")) {
             ResultPtr aSketchRes = aF->selection("extrusion_face")->context();
@@ -115,9 +115,9 @@ void Model_Update::processEvent(const boost::shared_ptr<Events_Message>& theMess
 
   //Events_LongOp::start(this);
   isExecuted = true;
-  std::list<boost::shared_ptr<ModelAPI_Document> > aDocs;
-  boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aMsg =
-      boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+  std::list<std::shared_ptr<ModelAPI_Document> > aDocs;
+  std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aMsg =
+      std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
   if (aMsg) myInitial = aMsg->objects();
   else {
     myInitial.clear();
@@ -127,20 +127,20 @@ void Model_Update::processEvent(const boost::shared_ptr<Events_Message>& theMess
     }
   }
   // collect all documents involved into the update process
-  set<boost::shared_ptr<ModelAPI_Object> >::iterator aFIter = myInitial.begin();
+  set<std::shared_ptr<ModelAPI_Object> >::iterator aFIter = myInitial.begin();
   for (; aFIter != myInitial.end(); aFIter++) {
     aDocs.push_back((*aFIter)->document());
   }
   // iterate all features of features-documents to update them (including hidden)
-  std::set<boost::shared_ptr<ModelAPI_Document> > alreadyUsed;
-  list<boost::shared_ptr<ModelAPI_Document> >::iterator aDIter = aDocs.begin();
+  std::set<std::shared_ptr<ModelAPI_Document> > alreadyUsed;
+  list<std::shared_ptr<ModelAPI_Document> >::iterator aDIter = aDocs.begin();
   for (; aDIter != aDocs.end(); aDIter++) {
     if (alreadyUsed.find(*aDIter) != alreadyUsed.end())
       continue;
     alreadyUsed.insert(*aDIter);
     int aNbFeatures = (*aDIter)->size(ModelAPI_Feature::group(), true);
     for (int aFIndex = 0; aFIndex < aNbFeatures; aFIndex++) {
-      FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(
+      FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(
           (*aDIter)->object(ModelAPI_Feature::group(), aFIndex, true));
       if (aFeature)
         updateFeature(aFeature);
@@ -163,10 +163,10 @@ void Model_Update::processEvent(const boost::shared_ptr<Events_Message>& theMess
 void Model_Update::redisplayWithResults(FeaturePtr theFeature) {
   // maske updated and redisplay all results
   static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
-  const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
-  std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+  const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
+  std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
   for (; aRIter != aResults.cend(); aRIter++) {
-    boost::shared_ptr<ModelAPI_Result> aRes = *aRIter;
+    std::shared_ptr<ModelAPI_Result> aRes = *aRIter;
     aRes->data()->mustBeUpdated(false);
     myUpdated[aRes] = true;
     ModelAPI_EventCreator::get()->sendUpdated(aRes, EVENT_DISP);
@@ -189,7 +189,7 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
 
     // composite feature must be executed after sub-features execution
     CompositeFeaturePtr aComposite = 
-      boost::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theFeature);
+      std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theFeature);
     if (aComposite) {
       int aSubsNum = aComposite->numberOfSubs();
       for(int a = 0; a < aSubsNum; a++) {
@@ -199,8 +199,8 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
     }
     // check all references: if referenced objects are updated, this object also must be updated
     std::list<std::pair<std::string, std::list<ObjectPtr> > > aRefs;
-    boost::shared_ptr<Model_Data> aData = 
-      boost::dynamic_pointer_cast<Model_Data>(theFeature->data());
+    std::shared_ptr<Model_Data> aData = 
+      std::dynamic_pointer_cast<Model_Data>(theFeature->data());
     aData->referencesToObjects(aRefs);
     std::list<std::pair<std::string, std::list<ObjectPtr> > >::iterator aRef = aRefs.begin();
     for(; aRef != aRefs.end(); aRef++) {
@@ -215,7 +215,7 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
     //std::cout<<"Update feature "<<theFeature->getKind()<<" must be updated = "<<aMustbeUpdated<<std::endl;
     // execute feature if it must be updated
     if (aMustbeUpdated) {
-      if (boost::dynamic_pointer_cast<Model_Document>(theFeature->document())->executeFeatures() ||
+      if (std::dynamic_pointer_cast<Model_Document>(theFeature->document())->executeFeatures() ||
           !theFeature->isPersistentResult()) {
         if (aFactory->validate(theFeature)) {
           if (isAutomatic || (myJustCreatedOrUpdated.find(theFeature) != myJustCreatedOrUpdated.end()) ||
@@ -227,14 +227,14 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
               theFeature->data()->attributes(ModelAPI_AttributeSelection::type());
             list<AttributePtr>::iterator aRefsIter = aRefs.begin();
             for (; aRefsIter != aRefs.end(); aRefsIter++) {
-              boost::shared_ptr<ModelAPI_AttributeSelection> aSel =
-                boost::dynamic_pointer_cast<ModelAPI_AttributeSelection>(*aRefsIter);
+              std::shared_ptr<ModelAPI_AttributeSelection> aSel =
+                std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(*aRefsIter);
               aSel->update(); // this must be done on execution since it may be long operation
             }
             aRefs = theFeature->data()->attributes(ModelAPI_AttributeSelectionList::type());
             for (aRefsIter = aRefs.begin(); aRefsIter != aRefs.end(); aRefsIter++) {
-              boost::shared_ptr<ModelAPI_AttributeSelectionList> aSel =
-                boost::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(*aRefsIter);
+              std::shared_ptr<ModelAPI_AttributeSelectionList> aSel =
+                std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(*aRefsIter);
               for(int a = aSel->size() - 1; a >= 0; a--) {
                   aSel->value(a)->update();
               }
@@ -270,10 +270,10 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
             redisplayWithResults(theFeature);
           } else { // must be updatet, but not updated yet
             theFeature->data()->mustBeUpdated(true);
-            const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
-            std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+            const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
+            std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
             for (; aRIter != aResults.cend(); aRIter++) {
-              boost::shared_ptr<ModelAPI_Result> aRes = *aRIter;
+              std::shared_ptr<ModelAPI_Result> aRes = *aRIter;
               aRes->data()->mustBeUpdated(true);
             }
           }
@@ -285,8 +285,8 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
         redisplayWithResults(theFeature);
       }
     } else {  // returns also true is results were updated: for sketch that refers to sub-features but results of sub-features were changed
-      const std::list<boost::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
-      std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+      const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
       for (; aRIter != aResults.cend(); aRIter++) {
         if (myInitial.find(*aRIter) != myInitial.end()) {
           aMustbeUpdated = true;
@@ -299,7 +299,7 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
   return aMustbeUpdated;
 }
 
-bool Model_Update::updateObject(boost::shared_ptr<ModelAPI_Object> theObject, const bool theCyclic)
+bool Model_Update::updateObject(std::shared_ptr<ModelAPI_Object> theObject, const bool theCyclic)
 {
   if (myUpdated.find(theObject) != myUpdated.end())
     return myUpdated[theObject];  // already processed
@@ -308,7 +308,7 @@ bool Model_Update::updateObject(boost::shared_ptr<ModelAPI_Object> theObject, co
   if (theCyclic) { // algorithm for update of all features by dependencies tree
     if (!theObject)
       return false;
-    FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
+    FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
     if (aFeature) {  // for feature just call update Feature
       return updateFeature(aFeature);
     }
@@ -316,7 +316,7 @@ bool Model_Update::updateObject(boost::shared_ptr<ModelAPI_Object> theObject, co
     if (myUpdated.find(theObject) != myUpdated.end())
       return myUpdated[theObject];  // already processed
     // check the feature of this object must be executed
-    ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+    ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
     if (aResult) {
       FeaturePtr aResFeature = aResult->document()->feature(aResult);
       if (aResFeature) {
index ab4e4c8ff1cfeb9a4956d08b37e7f30e20329838..31d532da516fe38bd0ece5048025097635ed8b4b 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "Model.h"
 #include "Events_Listener.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <set>
 #include <map>
 
@@ -21,34 +21,34 @@ class ModelAPI_Feature;
 class Model_Update : public Events_Listener
 {
   /// initial set of updated features that must be processed
-  std::set<boost::shared_ptr<ModelAPI_Object> > myInitial;
+  std::set<std::shared_ptr<ModelAPI_Object> > myInitial;
   /// already updated and processed features and modificated feature flag
-  std::map<boost::shared_ptr<ModelAPI_Object>, bool> myUpdated;
+  std::map<std::shared_ptr<ModelAPI_Object>, bool> myUpdated;
   /// to know that all next updates are caused by this execution
   bool isExecuted;
   /// to know execute or not automatically all update
   bool isAutomatic;
   /// just created features: they must be updated immideately even in not-automatic mode for 
   /// preview; cleared on commit operations
-  std::set<boost::shared_ptr<ModelAPI_Object> > myJustCreatedOrUpdated;
+  std::set<std::shared_ptr<ModelAPI_Object> > myJustCreatedOrUpdated;
 
  public:
   /// Is called only once, on startup of the application
   Model_Update();
 
   /// Processes the feature argument update: executes the results
-  MODEL_EXPORT virtual void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+  MODEL_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
  protected:
   /// Recoursively checks and updates the feature if needed (calls the execute method)
   /// Returns true if feature was updated.
-  bool updateFeature(boost::shared_ptr<ModelAPI_Feature> theFeature);
+  bool updateFeature(std::shared_ptr<ModelAPI_Feature> theFeature);
 
   /// Recoursively checks and updates the object (result or feature) if needed (calls updateFeature)
   /// Returns true if object was updated.
-  bool updateObject(boost::shared_ptr<ModelAPI_Object> theObject, const bool theCyclic = true);
+  bool updateObject(std::shared_ptr<ModelAPI_Object> theObject, const bool theCyclic = true);
   /// Sends the redisplay events for feature and results, updates the updated status
-  void redisplayWithResults(boost::shared_ptr<ModelAPI_Feature> theFeature);
+  void redisplayWithResults(std::shared_ptr<ModelAPI_Feature> theFeature);
 };
 
 #endif
index e7750131efbb85114cf02d19b6663c2fb963ee4e..cc3a612a50d19752eae437181a03df9d3122bf75 100644 (file)
@@ -141,7 +141,7 @@ void Model_ValidatorsFactory::addDefaultValidators(std::list<ModelAPI_Validator*
   theValidators.push_back(it->second);
 }
 
-bool Model_ValidatorsFactory::validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature) const
+bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>& theFeature) const
 {
   const static std::string kDefaultId = "Model_FeatureValidator";
   // check feature validators first
@@ -176,7 +176,7 @@ bool Model_ValidatorsFactory::validate(const boost::shared_ptr<ModelAPI_Feature>
     }
   }
   // check all attributes for validity
-  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+  std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
   if (!aData || !aData->isValid())
     return false;
   static const std::string kAllTypes = "";
index 5fa3a8a9004441d4e0000a4f9eff83f25de94df5..a6d36996360610ee46f5b983752d6eda01ce79f2 100644 (file)
@@ -70,7 +70,7 @@ class Model_ValidatorsFactory : public ModelAPI_ValidatorsFactory
   MODEL_EXPORT virtual const ModelAPI_Validator* validator(const std::string& theID) const;
 
   /// Returns true if feature and all its attributes are valid.
-  MODEL_EXPORT virtual bool validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature) const;
+  MODEL_EXPORT virtual bool validate(const std::shared_ptr<ModelAPI_Feature>& theFeature) const;
 
   /// register that this attribute in feature is not obligatory for the feature execution
   /// so, it is not needed for the standard validation mechanism
index ba16e8f1c1a2ffbe453e7956f5d3b59105f8092a..c1ade993d4bb7a8ceb41cbdcb10a117fce090882 100644 (file)
@@ -28,9 +28,9 @@
   #include "ModelAPI_ResultPart.h"
   
   template<class T1, class T2> 
-  boost::shared_ptr<T1> boost_cast(boost::shared_ptr<T2> theObject)
+  std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr<T2> theObject)
   { 
-    return boost::dynamic_pointer_cast<T1>(theObject); 
+    return std::dynamic_pointer_cast<T1>(theObject); 
   }
   
 %}
@@ -43,9 +43,9 @@
 %include "typemaps.i"
 %include "std_string.i"
 %include "std_list.i"
+%include "std_shared_ptr.i"
 
-// boost pointers
-%include <boost_shared_ptr.i>
+// shared pointers
 // For ModelAPI_ResultConstruction.shape()
 %shared_ptr(GeomAPI_Interface)
 %shared_ptr(GeomAPI_Shape)
 %include "ModelAPI_ResultBody.h"
 %include "ModelAPI_ResultPart.h"
 
-%template(ObjectList) std::list<boost::shared_ptr<ModelAPI_Object> >;
-%template(ResultList) std::list<boost::shared_ptr<ModelAPI_Result> >;
+%template(ObjectList) std::list<std::shared_ptr<ModelAPI_Object> >;
+%template(ResultList) std::list<std::shared_ptr<ModelAPI_Result> >;
 
-template<class T1, class T2> boost::shared_ptr<T1> boost_cast(boost::shared_ptr<T2> theObject);
-%template(modelAPI_CompositeFeature) boost_cast<ModelAPI_CompositeFeature, ModelAPI_Feature>;
-%template(modelAPI_ResultConstruction) boost_cast<ModelAPI_ResultConstruction, ModelAPI_Result>;
-%template(modelAPI_ResultBody) boost_cast<ModelAPI_ResultBody, ModelAPI_Result>;
-%template(modelAPI_ResultPart) boost_cast<ModelAPI_ResultPart, ModelAPI_Result>;
+template<class T1, class T2> std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr<T2> theObject);
+%template(modelAPI_CompositeFeature) shared_ptr_cast<ModelAPI_CompositeFeature, ModelAPI_Feature>;
+%template(modelAPI_ResultConstruction) shared_ptr_cast<ModelAPI_ResultConstruction, ModelAPI_Result>;
+%template(modelAPI_ResultBody) shared_ptr_cast<ModelAPI_ResultBody, ModelAPI_Result>;
+%template(modelAPI_ResultPart) shared_ptr_cast<ModelAPI_ResultPart, ModelAPI_Result>;
 
 
index cfef5172421791a08ebd6958ca018a3000be1378..27d65eb9b69eb8bc96b6ac5da4b680a5fb55acad 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "ModelAPI.h"
 #include <string>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class ModelAPI_Object;
 
@@ -18,7 +18,7 @@ class ModelAPI_Object;
 class ModelAPI_Attribute
 {
   ///< needed here to emit signal that feature changed on change of the attribute
-  boost::shared_ptr<ModelAPI_Object> myObject;
+  std::shared_ptr<ModelAPI_Object> myObject;
  protected:
   // accessible from the attributes
   bool myIsInitialized;
@@ -36,13 +36,13 @@ class ModelAPI_Attribute
   }
 
   /// Sets the owner of this attribute
-  MODELAPI_EXPORT virtual void setObject(const boost::shared_ptr<ModelAPI_Object>& theObject)
+  MODELAPI_EXPORT virtual void setObject(const std::shared_ptr<ModelAPI_Object>& theObject)
   {
     myObject = theObject;
   }
 
   /// Returns the owner of this attribute
-  MODELAPI_EXPORT const boost::shared_ptr<ModelAPI_Object>& owner() const
+  MODELAPI_EXPORT const std::shared_ptr<ModelAPI_Object>& owner() const
   {
     return myObject;
   }
@@ -100,6 +100,6 @@ class ModelAPI_Attribute
 };
 
 //! Pointer on attribute object
-typedef boost::shared_ptr<ModelAPI_Attribute> AttributePtr;
+typedef std::shared_ptr<ModelAPI_Attribute> AttributePtr;
 
 #endif
index cf431322bf298de5b87f8aea74aa707746ad4c43..23c8f2403aab2cbd87330e40b42f99f6824842c9 100644 (file)
@@ -45,6 +45,6 @@ class ModelAPI_AttributeBoolean : public ModelAPI_Attribute
   }
 };
 
-typedef boost::shared_ptr<ModelAPI_AttributeBoolean> AttributeBooleanPtr;
+typedef std::shared_ptr<ModelAPI_AttributeBoolean> AttributeBooleanPtr;
 
 #endif
index cf7cc84f379c0f8cab8cb209312d4034fd8a3c06..b7c4bbcdfc42a20d0875000532a232912bfb50a5 100644 (file)
@@ -17,10 +17,10 @@ class ModelAPI_AttributeDocRef : public ModelAPI_Attribute
 {
  public:
   /// Defines the document referenced from this attribute
-  MODELAPI_EXPORT virtual void setValue(boost::shared_ptr<ModelAPI_Document> theDoc) = 0;
+  MODELAPI_EXPORT virtual void setValue(std::shared_ptr<ModelAPI_Document> theDoc) = 0;
 
   /// Returns document referenced from this attribute
-  MODELAPI_EXPORT virtual boost::shared_ptr<ModelAPI_Document> value() = 0;
+  MODELAPI_EXPORT virtual std::shared_ptr<ModelAPI_Document> value() = 0;
 
   /// Returns the type of this class of attributes
   MODELAPI_EXPORT static std::string type()
@@ -46,6 +46,6 @@ class ModelAPI_AttributeDocRef : public ModelAPI_Attribute
   }
 };
 
-typedef boost::shared_ptr<ModelAPI_AttributeDocRef> AttributeDocRefPtr;
+typedef std::shared_ptr<ModelAPI_AttributeDocRef> AttributeDocRefPtr;
 
 #endif
index e61dfa060292bcbb680f32e0d799e0cfc6c83b25..670c7f0892d24b756409625c4f09d9eebb7d2d70 100644 (file)
@@ -46,6 +46,6 @@ class ModelAPI_AttributeDouble : public ModelAPI_Attribute
 };
 
 //! Pointer on double attribute
-typedef boost::shared_ptr<ModelAPI_AttributeDouble> AttributeDoublePtr;
+typedef std::shared_ptr<ModelAPI_AttributeDouble> AttributeDoublePtr;
 
 #endif
index 6e63cafe71d980334396716ed948ae4f4fce0a95..16e70ee663d4647cb51646501b15dacebe8fbd93 100644 (file)
@@ -50,6 +50,6 @@ class ModelAPI_AttributeInteger : public ModelAPI_Attribute
 };
 
 //! Pointer on double attribute
-typedef boost::shared_ptr<ModelAPI_AttributeInteger> AttributeIntegerPtr;
+typedef std::shared_ptr<ModelAPI_AttributeInteger> AttributeIntegerPtr;
 
 #endif
index a3bf80601bbac2ade06f79d8de8f621b32b2276b..5644cc47f8a8381cccae40c87a5c0086ac037f68 100644 (file)
@@ -21,10 +21,10 @@ class ModelAPI_AttributeRefAttr : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual bool isObject() = 0;
 
   /// Defines the reference to the attribute
-  MODELAPI_EXPORT virtual void setAttr(boost::shared_ptr<ModelAPI_Attribute> theAttr) = 0;
+  MODELAPI_EXPORT virtual void setAttr(std::shared_ptr<ModelAPI_Attribute> theAttr) = 0;
 
   /// Returns attribute referenced from this attribute
-  MODELAPI_EXPORT virtual boost::shared_ptr<ModelAPI_Attribute> attr() = 0;
+  MODELAPI_EXPORT virtual std::shared_ptr<ModelAPI_Attribute> attr() = 0;
 
   /// Defines the reference to the object
   MODELAPI_EXPORT virtual void setObject(ObjectPtr theFeature) = 0;
@@ -56,6 +56,6 @@ class ModelAPI_AttributeRefAttr : public ModelAPI_Attribute
   }
 };
 
-typedef boost::shared_ptr<ModelAPI_AttributeRefAttr> AttributeRefAttrPtr;
+typedef std::shared_ptr<ModelAPI_AttributeRefAttr> AttributeRefAttrPtr;
 
 #endif
index d8edfe8d0bfdb1a4d8411512cc6b1823e3fdabda..3036cc9704b629c4202960f34c963c16981e65d8 100644 (file)
@@ -51,6 +51,6 @@ class ModelAPI_AttributeRefList : public ModelAPI_Attribute
   }
 };
 
-typedef boost::shared_ptr<ModelAPI_AttributeRefList> AttributeRefListPtr;
+typedef std::shared_ptr<ModelAPI_AttributeRefList> AttributeRefListPtr;
 
 #endif
index 5354e8af54a15214a9d8ee3d76873107b4a65286..25508af859c37eef477b1d7b243baef8a4b9a595 100644 (file)
@@ -46,6 +46,6 @@ class ModelAPI_AttributeReference : public ModelAPI_Attribute
   }
 };
 
-typedef boost::shared_ptr<ModelAPI_AttributeReference> AttributeReferencePtr;
+typedef std::shared_ptr<ModelAPI_AttributeReference> AttributeReferencePtr;
 
 #endif
index 40882dde44a8871b1ee8ec21e7afc328db6c53b7..80335f2179da458b55c2d71ccc0e915641991187 100644 (file)
@@ -18,10 +18,10 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
  public:
   /// Defines the result and its selected sub-shape
   virtual void setValue(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape) = 0;
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape) = 0;
 
   /// Returns the selected subshape
-  virtual boost::shared_ptr<GeomAPI_Shape> value() = 0;
+  virtual std::shared_ptr<GeomAPI_Shape> value() = 0;
 
   /// Returns the context of the selection (the whole shape owner)
   virtual ResultPtr context() = 0;
@@ -55,6 +55,6 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
 };
 
 //! Pointer on double attribute
-typedef boost::shared_ptr<ModelAPI_AttributeSelection> AttributeSelectionPtr;
+typedef std::shared_ptr<ModelAPI_AttributeSelection> AttributeSelectionPtr;
 
 #endif
index aef9046aef1966e13a198fcfc859f248c08d0df2..37647df68f790e22247b873a49d8dbd6f6b43872 100644 (file)
@@ -19,7 +19,7 @@ class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute
  public:
   /// Adds the new reference to the end of the list
   virtual void append(
-    const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape) = 0;
+    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape) = 0;
 
   /// Returns the number ofselection attributes in the list
   virtual int size() = 0;
@@ -29,7 +29,7 @@ class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute
   virtual void setSelectionType(int) = 0;
 
   /// Returns the attribute selection by the index (zero based)
-  virtual boost::shared_ptr<ModelAPI_AttributeSelection> value(const int theIndex) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeSelection> value(const int theIndex) = 0;
 
   /// Returns all attributes
   virtual void clear() = 0;
@@ -59,6 +59,6 @@ class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute
 };
 
 //! Pointer on double attribute
-typedef boost::shared_ptr<ModelAPI_AttributeSelectionList> AttributeSelectionListPtr;
+typedef std::shared_ptr<ModelAPI_AttributeSelectionList> AttributeSelectionListPtr;
 
 #endif
index 5b037f1c0d6fc9885f12597e09ef58aecc887f8a..a111ba388fd1cb2de419e2cbdde796fd6008e17e 100644 (file)
@@ -48,6 +48,6 @@ class ModelAPI_AttributeString : public ModelAPI_Attribute
 };
 
 //! Pointer on double attribute
-typedef boost::shared_ptr<ModelAPI_AttributeString> AttributeStringPtr;
+typedef std::shared_ptr<ModelAPI_AttributeString> AttributeStringPtr;
 
 #endif
index 878ca849fb5d0fe0cfe9900eeb17840ccd9b522e..e21a6aa090c128042a492607b5af0691e769111d 100644 (file)
@@ -17,13 +17,13 @@ class ModelAPI_CompositeFeature : public ModelAPI_Feature
 {
 public:
   /// Adds feature to the sketch and to its document
-  virtual boost::shared_ptr<ModelAPI_Feature> addFeature(std::string theID) = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> addFeature(std::string theID) = 0;
 
   /// Returns the number of sub-elements
   virtual int numberOfSubs() const = 0;
 
   /// Returns the sub-feature by zero-base index
-  virtual boost::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex) const = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex) const = 0;
 
   /// Returns the sub-feature unique identifier in this composite feature by zero-base index
   virtual int subFeatureId(const int theIndex) const = 0;
@@ -33,6 +33,6 @@ public:
 };
 
 //! Pointer on the composite feature object
-typedef boost::shared_ptr<ModelAPI_CompositeFeature> CompositeFeaturePtr;
+typedef std::shared_ptr<ModelAPI_CompositeFeature> CompositeFeaturePtr;
 
 #endif
index 191345f1a7313c9359c7f17b4907d852a2dbff43..8cc137477029665743eee48b877600859cb118bc 100644 (file)
@@ -9,7 +9,7 @@
 #include <string>
 #include <list>
 #include <set>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class ModelAPI_AttributeDocRef;
 class ModelAPI_AttributeInteger;
@@ -43,42 +43,42 @@ class MODELAPI_EXPORT ModelAPI_Data
   virtual void setName(const std::string& theName) = 0;
 
   /// Returns the attribute that references to another document
-  virtual boost::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID) = 0;
   /// Returns the attribute that contains real value with double precision
-  virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID) = 0;
   /// Returns the attribute that contains integer value
-  virtual boost::shared_ptr<ModelAPI_AttributeInteger> integer(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeInteger> integer(const std::string& theID) = 0;
   /// Returns the attribute that contains reference to a feature
-  virtual boost::shared_ptr<ModelAPI_AttributeReference> reference(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeReference> reference(const std::string& theID) = 0;
   /// Returns the attribute that contains selection to a shape
-  virtual boost::shared_ptr<ModelAPI_AttributeSelection> selection(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeSelection> selection(const std::string& theID) = 0;
   /// Returns the attribute that contains selection to a shape
-  virtual boost::shared_ptr<ModelAPI_AttributeSelectionList> 
+  virtual std::shared_ptr<ModelAPI_AttributeSelectionList> 
     selectionList(const std::string& theID) = 0;
   /// Returns the attribute that contains reference to an attribute of a feature
-  virtual boost::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string& theID) = 0;
   /// Returns the attribute that contains list of references to features
-  virtual boost::shared_ptr<ModelAPI_AttributeRefList> reflist(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeRefList> reflist(const std::string& theID) = 0;
   /// Returns the attribute that contains boolean value
-  virtual boost::shared_ptr<ModelAPI_AttributeBoolean> boolean(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeBoolean> boolean(const std::string& theID) = 0;
   /// Returns the attribute that contains boolean value
-  virtual boost::shared_ptr<ModelAPI_AttributeString> string(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_AttributeString> string(const std::string& theID) = 0;
 
   /// Returns the generic attribute by identifier
   /// \param theID identifier of the attribute
-  virtual boost::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID) = 0;
+  virtual std::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID) = 0;
   /// Returns all attributes of the feature of the given type
   /// or all attributes if "theType" is empty
-  virtual std::list<boost::shared_ptr<ModelAPI_Attribute> >
+  virtual std::list<std::shared_ptr<ModelAPI_Attribute> >
   attributes(const std::string& theType) = 0;
   /// Returns all attributes ids of the feature of the given type
   /// or all attributes if "theType" is empty
   virtual std::list<std::string> attributesIDs(const std::string& theType) = 0;
   /// Identifier by the id (not fast, iteration by map)
   /// \param theAttr attribute already created in this data
-  virtual const std::string& id(const boost::shared_ptr<ModelAPI_Attribute>& theAttr) = 0;
+  virtual const std::string& id(const std::shared_ptr<ModelAPI_Attribute>& theAttr) = 0;
   /// Returns true if data belongs to same features
-  virtual bool isEqual(const boost::shared_ptr<ModelAPI_Data>& theData) = 0;
+  virtual bool isEqual(const std::shared_ptr<ModelAPI_Data>& theData) = 0;
   /// Returns true if it is correctly connected to the data model
   virtual bool isValid() = 0;
 
@@ -111,7 +111,7 @@ class MODELAPI_EXPORT ModelAPI_Data
   virtual int featureId() const = 0;
 
  // returns all objects referenced to this
-  virtual const std::set<boost::shared_ptr<ModelAPI_Attribute> >& refsToMe() = 0;
+  virtual const std::set<std::shared_ptr<ModelAPI_Attribute> >& refsToMe() = 0;
 
  protected:
   /// Objects are created for features automatically
@@ -120,6 +120,6 @@ class MODELAPI_EXPORT ModelAPI_Data
   }
 };
 
-typedef boost::shared_ptr<ModelAPI_Data> DataPtr;
+typedef std::shared_ptr<ModelAPI_Data> DataPtr;
 
 #endif
index 0b67c44f1b7e526ac6297b1c62850362cdbdf3a1..84439e6863d466b7b27a6ba3e816c43b031e3c66 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <ModelAPI.h>
 #include <string>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <vector>
 #include <list>
 
@@ -40,14 +40,14 @@ public:
 
   //! Adds to the document the new feature of the given feature id
   //! \param creates feature and puts it in the document (if it is not action)
-  virtual boost::shared_ptr<ModelAPI_Feature> addFeature(std::string theID) = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> addFeature(std::string theID) = 0;
 
   //! Removes the feature from the document
-  virtual void removeFeature(boost::shared_ptr<ModelAPI_Feature> theFeature,
+  virtual void removeFeature(std::shared_ptr<ModelAPI_Feature> theFeature,
                              const bool theCheck = true) = 0;
 
   ///! Adds a new sub-document by the identifier, or returns existing one if it is already exist
-  virtual boost::shared_ptr<ModelAPI_Document> subDocument(std::string theDocID) = 0;
+  virtual std::shared_ptr<ModelAPI_Document> subDocument(std::string theDocID) = 0;
 
   ///! Returns the id of the document
   virtual const std::string& id() const = 0;
@@ -56,7 +56,7 @@ public:
   //! \param theGroupID group that contains an object
   //! \param theIndex zero-based index of feature in the group
   //! \param theHidden if it is true, it counts also the features that are not in tree
-  virtual boost::shared_ptr<ModelAPI_Object> object(const std::string& theGroupID,
+  virtual std::shared_ptr<ModelAPI_Object> object(const std::string& theGroupID,
                                                     const int theIndex,
                                                     const bool theHidden = false) = 0;
 
@@ -70,21 +70,21 @@ public:
   }
 
   /// Creates a construction cresults
-  virtual boost::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
+  virtual std::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
   /// Creates a body results
-  virtual boost::shared_ptr<ModelAPI_ResultBody> createBody(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
+  virtual std::shared_ptr<ModelAPI_ResultBody> createBody(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
   /// Creates a part results
-  virtual boost::shared_ptr<ModelAPI_ResultPart> createPart(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
+  virtual std::shared_ptr<ModelAPI_ResultPart> createPart(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
   /// Creates a group results
-  virtual boost::shared_ptr<ModelAPI_ResultGroup> createGroup(
-      const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
+  virtual std::shared_ptr<ModelAPI_ResultGroup> createGroup(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
 
   //! Returns a feature by result (owner of result)
-  virtual boost::shared_ptr<ModelAPI_Feature> feature(
-      const boost::shared_ptr<ModelAPI_Result>& theResult) = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> feature(
+      const std::shared_ptr<ModelAPI_Result>& theResult) = 0;
 
 protected:
   /// Only for SWIG wrapping it is here
@@ -94,6 +94,6 @@ protected:
 };
 
 //! Pointer on document object
-typedef boost::shared_ptr<ModelAPI_Document> DocumentPtr;
+typedef std::shared_ptr<ModelAPI_Document> DocumentPtr;
 
 #endif
index 380a6658292c59c79934abdd2847292e30345cfa..9141c146c77797186cedd851dbacfeed9095a83f 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <ModelAPI.h>
 #include <Events_MessageGroup.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <string>
 #include <set>
 
@@ -48,10 +48,10 @@ class ModelAPI_ObjectUpdatedMessage : public Events_MessageGroup
   virtual const std::set<ObjectPtr>& objects() const = 0;
 
   //! Creates a new empty group (to store it in the loop before flush)
-  virtual boost::shared_ptr<Events_MessageGroup> newEmpty() = 0;
+  virtual std::shared_ptr<Events_MessageGroup> newEmpty() = 0;
 
   //! Allows to join the given message with the current one
-  virtual void Join(const boost::shared_ptr<Events_MessageGroup>& theJoined) = 0;
+  virtual void Join(const std::shared_ptr<Events_MessageGroup>& theJoined) = 0;
 };
 
 /// Message that feature was deleted (used for Object Browser update)
@@ -65,16 +65,16 @@ class ModelAPI_ObjectDeletedMessage : public Events_MessageGroup
 
  public:
   /// Returns the feature that has been updated
-  virtual boost::shared_ptr<ModelAPI_Document> document() const = 0;
+  virtual std::shared_ptr<ModelAPI_Document> document() const = 0;
 
   /// Returns the group where the feature was deleted
   virtual const std::set<std::string>& groups() const = 0;
 
-  virtual boost::shared_ptr<Events_MessageGroup> newEmpty() = 0;
+  virtual std::shared_ptr<Events_MessageGroup> newEmpty() = 0;
 
   virtual const Events_ID messageId() = 0;
 
-  virtual void Join(const boost::shared_ptr<Events_MessageGroup>& theJoined) = 0;
+  virtual void Join(const std::shared_ptr<Events_MessageGroup>& theJoined) = 0;
 };
 
 /// Allows to create ModelAPI messages
@@ -85,7 +85,7 @@ class MODELAPI_EXPORT ModelAPI_EventCreator
   virtual void sendUpdated(const ObjectPtr& theObject, const Events_ID& theEvent,
                            const bool isGroupped = true) const = 0;
   /// creates deleted message and sends to the loop
-  virtual void sendDeleted(const boost::shared_ptr<ModelAPI_Document>& theDoc,
+  virtual void sendDeleted(const std::shared_ptr<ModelAPI_Document>& theDoc,
                            const std::string& theGroup) const = 0;
 
   /// returns the creator instance
index 94b1a64e8fb1f79fe1512faf8c6a7641aa085041..5be82475ee0c95045f61916a32f3d25bdf32dc45 100644 (file)
 #include <ModelAPI_Session.h>
 #include <Events_Loop.h>
 
-const std::list<boost::shared_ptr<ModelAPI_Result> >& ModelAPI_Feature::results()
+const std::list<std::shared_ptr<ModelAPI_Result> >& ModelAPI_Feature::results()
 {
   return myResults;
 }
 
-boost::shared_ptr<ModelAPI_Result> ModelAPI_Feature::firstResult()
+std::shared_ptr<ModelAPI_Result> ModelAPI_Feature::firstResult()
 {
-  return myResults.empty() ? boost::shared_ptr<ModelAPI_Result>() : *(myResults.begin());
+  return myResults.empty() ? std::shared_ptr<ModelAPI_Result>() : *(myResults.begin());
 }
 
-boost::shared_ptr<ModelAPI_Result> ModelAPI_Feature::lastResult()
+std::shared_ptr<ModelAPI_Result> ModelAPI_Feature::lastResult()
 {
-  return myResults.empty() ? boost::shared_ptr<ModelAPI_Result>() : *(myResults.rbegin());
+  return myResults.empty() ? std::shared_ptr<ModelAPI_Result>() : *(myResults.rbegin());
 }
 
-void ModelAPI_Feature::setResult(const boost::shared_ptr<ModelAPI_Result>& theResult)
+void ModelAPI_Feature::setResult(const std::shared_ptr<ModelAPI_Result>& theResult)
 {
   if (firstResult() == theResult) {  // just updated
     static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
@@ -34,7 +34,7 @@ void ModelAPI_Feature::setResult(const boost::shared_ptr<ModelAPI_Result>& theRe
   }
   // created
   while (!myResults.empty()) {  // remove one by one with messages
-    boost::shared_ptr<ModelAPI_Result> aRes = *(myResults.begin());
+    std::shared_ptr<ModelAPI_Result> aRes = *(myResults.begin());
     myResults.erase(myResults.begin());
     ModelAPI_EventCreator::get()->sendDeleted(aRes->document(), aRes->groupName());
   }
@@ -45,10 +45,10 @@ void ModelAPI_Feature::setResult(const boost::shared_ptr<ModelAPI_Result>& theRe
   Events_Loop::loop()->flush(anEvent);
 }
 
-void ModelAPI_Feature::setResult(const boost::shared_ptr<ModelAPI_Result>& theResult,
+void ModelAPI_Feature::setResult(const std::shared_ptr<ModelAPI_Result>& theResult,
                                  const int theIndex)
 {
-  std::list<boost::shared_ptr<ModelAPI_Result> >::iterator aResIter = myResults.begin();
+  std::list<std::shared_ptr<ModelAPI_Result> >::iterator aResIter = myResults.begin();
   for (int anIndex = 0; anIndex < theIndex; anIndex++) {
     aResIter++;
   }
@@ -66,9 +66,9 @@ void ModelAPI_Feature::setResult(const boost::shared_ptr<ModelAPI_Result>& theRe
   }
 }
 
-void ModelAPI_Feature::removeResult(const boost::shared_ptr<ModelAPI_Result>& theResult)
+void ModelAPI_Feature::removeResult(const std::shared_ptr<ModelAPI_Result>& theResult)
 {
-  std::list<boost::shared_ptr<ModelAPI_Result> >::iterator aResIter = myResults.begin();
+  std::list<std::shared_ptr<ModelAPI_Result> >::iterator aResIter = myResults.begin();
   for(; aResIter != myResults.end(); aResIter++) {
     ResultPtr aRes = *aResIter;
     if (aRes == theResult) {
@@ -94,7 +94,7 @@ void ModelAPI_Feature::eraseResults()
     static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
     static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
 
-    std::list<boost::shared_ptr<ModelAPI_Result> >::iterator aResIter = myResults.begin();
+    std::list<std::shared_ptr<ModelAPI_Result> >::iterator aResIter = myResults.begin();
     for(; aResIter != myResults.end(); aResIter++) {
       (*aResIter)->data()->erase();
       ModelAPI_EventCreator::get()->sendDeleted(document(), (*aResIter)->groupName());
@@ -107,7 +107,7 @@ void ModelAPI_Feature::eraseResults()
   }
 }
 
-boost::shared_ptr<ModelAPI_Document> ModelAPI_Feature::documentToAdd()
+std::shared_ptr<ModelAPI_Document> ModelAPI_Feature::documentToAdd()
 {
   return ModelAPI_Session::get()->activeDocument();
 }
@@ -119,7 +119,7 @@ void ModelAPI_Feature::erase()
   static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
 
   while (!myResults.empty()) {  // remove one by one with messages
-    boost::shared_ptr<ModelAPI_Result> aRes = *(myResults.begin());
+    std::shared_ptr<ModelAPI_Result> aRes = *(myResults.begin());
     myResults.erase(myResults.begin());
     aECreator->sendDeleted(aRes->document(), aRes->groupName());
     aECreator->sendUpdated(aRes, EVENT_DISP);
@@ -134,9 +134,9 @@ ModelAPI_Feature::~ModelAPI_Feature()
 
 FeaturePtr ModelAPI_Feature::feature(ObjectPtr theObject)
 {
-  FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
+  FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
   if (!aFeature) {
-    ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+    ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
     if (aResult) {
       DocumentPtr aDoc = aResult->document();
       return aDoc->feature(aResult);
index c266b505ea1a194910a7ab7a020a72b448717532..a01adf4b13834cf56bf12265d6f885c9f0ca45ff 100644 (file)
@@ -21,7 +21,7 @@
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Result.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <list>
 #include <string>
@@ -38,7 +38,7 @@ class ModelAPI_Result;
 class ModelAPI_Feature : public ModelAPI_Object
 {
   ///< list of current results of this feature
-  std::list<boost::shared_ptr<ModelAPI_Result> > myResults;
+  std::list<std::shared_ptr<ModelAPI_Result> > myResults;
  public:
   /// Returns the unique kind of a feature (like "Point")
   virtual const std::string& getKind() = 0;
@@ -51,7 +51,7 @@ class ModelAPI_Feature : public ModelAPI_Object
   }
 
   /// Returns document this feature belongs to
-  virtual boost::shared_ptr<ModelAPI_Document> document() const
+  virtual std::shared_ptr<ModelAPI_Document> document() const
   {
     return ModelAPI_Object::document();
   }
@@ -69,18 +69,18 @@ class ModelAPI_Feature : public ModelAPI_Object
   virtual void execute() = 0;
 
   /// returns the current results of the feature
-  MODELAPI_EXPORT const std::list<boost::shared_ptr<ModelAPI_Result> >& results();
+  MODELAPI_EXPORT const std::list<std::shared_ptr<ModelAPI_Result> >& results();
   /// returns the first result in the list or NULL reference
-  MODELAPI_EXPORT boost::shared_ptr<ModelAPI_Result> firstResult();
+  MODELAPI_EXPORT std::shared_ptr<ModelAPI_Result> firstResult();
   /// returns the last result in the list or NULL reference
-  MODELAPI_EXPORT boost::shared_ptr<ModelAPI_Result> lastResult();
+  MODELAPI_EXPORT std::shared_ptr<ModelAPI_Result> lastResult();
   /// sets the alone result
-  MODELAPI_EXPORT void setResult(const boost::shared_ptr<ModelAPI_Result>& theResult);
+  MODELAPI_EXPORT void setResult(const std::shared_ptr<ModelAPI_Result>& theResult);
   /// sets the result by index (zero based), results before this must be set before
-  MODELAPI_EXPORT void setResult(const boost::shared_ptr<ModelAPI_Result>& theResult,
+  MODELAPI_EXPORT void setResult(const std::shared_ptr<ModelAPI_Result>& theResult,
                                  const int theIndex);
   /// removes the result from the feature
-  MODELAPI_EXPORT void removeResult(const boost::shared_ptr<ModelAPI_Result>& theResult);
+  MODELAPI_EXPORT void removeResult(const std::shared_ptr<ModelAPI_Result>& theResult);
   /// removes all results from the feature
   MODELAPI_EXPORT void eraseResults();
   /// removes all fields from this feature: results, data, etc
@@ -99,12 +99,12 @@ class ModelAPI_Feature : public ModelAPI_Object
 
   /// Must return document where the new feature must be added to
   /// By default it is current document
-  MODELAPI_EXPORT virtual boost::shared_ptr<ModelAPI_Document> documentToAdd();
+  MODELAPI_EXPORT virtual std::shared_ptr<ModelAPI_Document> documentToAdd();
 
   /// To virtually destroy the fields of successors
   MODELAPI_EXPORT virtual ~ModelAPI_Feature();
 
-  MODELAPI_EXPORT static boost::shared_ptr<ModelAPI_Feature> feature(ObjectPtr theObject);
+  MODELAPI_EXPORT static std::shared_ptr<ModelAPI_Feature> feature(ObjectPtr theObject);
 
  //
  // Helper methods, aliases for data()->method()
@@ -114,57 +114,57 @@ class ModelAPI_Feature : public ModelAPI_Object
     return data()->name();
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeBoolean> boolean(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeBoolean> boolean(const std::string& theID)
   {
     return data()->boolean(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID)
   {
     return data()->document(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID)
   {
     return data()->real(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeInteger> integer(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeInteger> integer(const std::string& theID)
   {
     return data()->integer(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string& theID)
   {
     return data()->refattr(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeReference> reference(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeReference> reference(const std::string& theID)
   {
     return data()->reference(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeRefList> reflist(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeRefList> reflist(const std::string& theID)
   {
     return data()->reflist(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeSelection> selection(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeSelection> selection(const std::string& theID)
   {
     return data()->selection(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeSelectionList> selectionList(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeSelectionList> selectionList(const std::string& theID)
   {
     return data()->selectionList(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_AttributeString> string(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_AttributeString> string(const std::string& theID)
   {
     return data()->string(theID);
   }
 
-  inline boost::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID)
+  inline std::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID)
   {
     return data()->attribute(theID);
   }
@@ -172,7 +172,7 @@ class ModelAPI_Feature : public ModelAPI_Object
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_Feature> FeaturePtr;
+typedef std::shared_ptr<ModelAPI_Feature> FeaturePtr;
 
 #endif
 
index 3dafdf813bd47fabf465166060727511c27581b1..6d44a735a14f1dceb09c2223c76079a1f642322c 100644 (file)
@@ -15,7 +15,7 @@ class ModelAPI_FeatureValidator : public ModelAPI_Validator
   /// \param theFeature the validated feature
   /// \param theAttr the validated attribute ID, empty string of feature is validated
   /// \param theArguments list of string, feature attribute names: dependent attributes
-  virtual bool isValid(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
+  virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
     const std::list<std::string>& theArguments) const = 0;
 };
 
index aba6567eb3a0d643409a36dc40644d2811650511..be488054077184cc2dc006ff80bd358387f635ce 100644 (file)
@@ -8,7 +8,7 @@
 #include "ModelAPI.h"
 #include "ModelAPI_Data.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class ModelAPI_Data;
 class ModelAPI_Document;
@@ -24,8 +24,8 @@ class ModelAPI_Document;
  */
 class ModelAPI_Object
 {
-  boost::shared_ptr<ModelAPI_Data> myData;  ///< manager of the data model of a feature
-  boost::shared_ptr<ModelAPI_Document> myDoc;  ///< document this object belongs to
+  std::shared_ptr<ModelAPI_Data> myData;  ///< manager of the data model of a feature
+  std::shared_ptr<ModelAPI_Document> myDoc;  ///< document this object belongs to
  public:
   /// By default object is displayed in the object browser.
   virtual bool isInHistory()
@@ -34,19 +34,19 @@ class ModelAPI_Object
   }
 
   /// Returns the data manager of this object: attributes
-  virtual boost::shared_ptr<ModelAPI_Data> data() const
+  virtual std::shared_ptr<ModelAPI_Data> data() const
   {
     return myData;
   }
 
   /// Returns true if object refers to the same data model instance
-  virtual bool isSame(const boost::shared_ptr<ModelAPI_Object>& theObject)
+  virtual bool isSame(const std::shared_ptr<ModelAPI_Object>& theObject)
   {
     return theObject.get() == this;
   }
 
   /// Returns document this feature belongs to
-  virtual boost::shared_ptr<ModelAPI_Document> document() const
+  virtual std::shared_ptr<ModelAPI_Document> document() const
   {
     return myDoc;
   }
@@ -63,13 +63,13 @@ class ModelAPI_Object
 
  protected:
   /// Sets the data manager of an object (document does)
-  virtual void setData(boost::shared_ptr<ModelAPI_Data> theData)
+  virtual void setData(std::shared_ptr<ModelAPI_Data> theData)
   {
     myData = theData;
   }
 
   /// Sets the data manager of an object (document does)
-  virtual void setDoc(boost::shared_ptr<ModelAPI_Document> theDoc)
+  virtual void setDoc(std::shared_ptr<ModelAPI_Document> theDoc)
   {
     myDoc = theDoc;
   }
@@ -84,6 +84,6 @@ class ModelAPI_Object
 
 };
 
-typedef boost::shared_ptr<ModelAPI_Object> ObjectPtr;
+typedef std::shared_ptr<ModelAPI_Object> ObjectPtr;
 
 #endif
index 5222b4c7b5edcd23582cdffbd6933428784cb4a7..0e910ae1f4cc9d2f829a9867d5bb67b51e98b738 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "ModelAPI.h"
 #include <string>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class ModelAPI_Feature;
 
@@ -20,7 +20,7 @@ class MODELAPI_EXPORT ModelAPI_Plugin
 {
  public:
   /// Creates the feature object of this plugin by the feature string ID
-  virtual boost::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID) = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID) = 0;
 
   /// To virtually destroy the fields of successors
   virtual ~ModelAPI_Plugin()
index eb664ec221c92ccb1a0befd1b1a9a5ab3d035c76..fe674e308403e2de4ff9163ebbf5d340a867d932 100644 (file)
@@ -33,6 +33,6 @@ class ModelAPI_Result : public ModelAPI_Object
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_Result> ResultPtr;
+typedef std::shared_ptr<ModelAPI_Result> ResultPtr;
 
 #endif
index cce169833c42946840385e7b82ff2af581471aa4..2a213f25b2e50afc478d4a2ae90e6c088fc4c648 100644 (file)
@@ -9,7 +9,7 @@
 #include <GeomAPI_Shape.h>
 #include <GeomAlgoAPI_MakeShape.h>
 #include <GeomAPI_DataMapOfShapeShape.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <string>
 
 /**\class ModelAPI_ResultBody
@@ -37,73 +37,73 @@ public:
   }
 
   /// Stores the shape (called by the execution method).
-  virtual void store(const boost::shared_ptr<GeomAPI_Shape>& theShape) = 0;
+  virtual void store(const std::shared_ptr<GeomAPI_Shape>& theShape) = 0;
 
   /// Stores the generated shape (called by the execution method).
-  virtual void storeGenerated(const boost::shared_ptr<GeomAPI_Shape>& theFromShape,
-                                 const boost::shared_ptr<GeomAPI_Shape>& theToShape) = 0;
+  virtual void storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+                                 const std::shared_ptr<GeomAPI_Shape>& theToShape) = 0;
 
   /// Stores the modified shape (called by the execution method).
-  virtual void storeModified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-                                 const boost::shared_ptr<GeomAPI_Shape>& theNewShape) = 0;
+  virtual void storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+                                 const std::shared_ptr<GeomAPI_Shape>& theNewShape) = 0;
 
   /// Returns the shape-result produced by this feature
-  virtual boost::shared_ptr<GeomAPI_Shape> shape() = 0;
+  virtual std::shared_ptr<GeomAPI_Shape> shape() = 0;
 
   /// Records the subshape newShape which was generated during a topological construction.
   /// As an example, consider the case of a face generated in construction of a box.
   virtual void generated(
-    const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
 
   /// Records the shape newShape which was generated from the shape oldShape during a topological 
   /// construction. As an example, consider the case of a face generated from an edge in 
   /// construction of a prism.
-  virtual void generated(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
+  virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
 
   /// Records the shape newShape which is a modification of the shape oldShape.
   /// As an example, consider the case of a face split or merged in a Boolean operation.
-  virtual void modified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
+  virtual void modified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
 
   /// Records the shape oldShape which was deleted from the current label.
   /// As an example, consider the case of a face removed by a Boolean operation.
   virtual void deleted(
-    const boost::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag = 1) = 0;
+    const std::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag = 1) = 0;
   
   /// load deleted shapes
   virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
-                                               boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+                                               std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
                                                const int  theTag) = 0;
   /// load and orient modified shapes
   virtual void loadAndOrientModifiedShapes (
                                                   GeomAlgoAPI_MakeShape* theMS,
-                                               boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+                                               std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
                                                const int  theTag,
                                                GeomAPI_DataMapOfShapeShape& theSubShapes) = 0;
   /// load and orient generated shapes
   virtual void loadAndOrientGeneratedShapes (
                                                   GeomAlgoAPI_MakeShape* theMS,
-                                               boost::shared_ptr<GeomAPI_Shape>  theShapeIn,
+                                               std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
                                                const int  theTag,
                                                GeomAPI_DataMapOfShapeShape& theSubShapes) = 0;
 
   /// load shapes of the first level (to be used during shape import)
-  virtual void loadFirstLevel(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag) = 0;
+  virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag) = 0;
   
   /// load disconnected edges
-  virtual void loadDisconnectedEdges(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag) = 0;
+  virtual void loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag) = 0;
 
   /// load disconnected vetexes
-  virtual void loadDisconnectedVertexes(boost::shared_ptr<GeomAPI_Shape> theShape, int&  theTag) = 0;
+  virtual void loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape, int&  theTag) = 0;
 
 protected:
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_ResultBody> ResultBodyPtr;
+typedef std::shared_ptr<ModelAPI_ResultBody> ResultBodyPtr;
 
 #endif
index 972b3a96512a53c358fbafbf5c9e1d42c207a7a4..4ff1a01891dede1434255710081dea20bb8fc9bd 100644 (file)
@@ -34,16 +34,16 @@ class ModelAPI_ResultConstruction : public ModelAPI_Result
   }
 
   /// Returns the shape-result produced by this feature
-  virtual boost::shared_ptr<GeomAPI_Shape>& shape() = 0;
+  virtual std::shared_ptr<GeomAPI_Shape>& shape() = 0;
 
   /// Sets the result
-  virtual void setShape(boost::shared_ptr<GeomAPI_Shape> theShape) = 0;
+  virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape) = 0;
 
   /// Sets the flag that it must be displayed in history (default is true)
   virtual void setIsInHistory(const bool isInHistory) = 0;
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_ResultConstruction> ResultConstructionPtr;
+typedef std::shared_ptr<ModelAPI_ResultConstruction> ResultConstructionPtr;
 
 #endif
index a8b183c12c62f4b10643f3a92650a7256a1572f3..465218d3b8b251bf49147fd2674fffc2414ef5e9 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "ModelAPI_Result.h"
 #include <GeomAPI_Shape.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <string>
 
 /**\class ModelAPI_ResultGroup
@@ -33,10 +33,10 @@ public:
   }
 
   /// Returns the compound of selected entities
-  virtual boost::shared_ptr<GeomAPI_Shape> shape() const = 0;
+  virtual std::shared_ptr<GeomAPI_Shape> shape() const = 0;
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_ResultGroup> ResultGroupPtr;
+typedef std::shared_ptr<ModelAPI_ResultGroup> ResultGroupPtr;
 
 #endif
index 5c67cbcc05e220663e25fd2c121cc95bb24f8229..2023a7da207649626164a656856abe32219bed2f 100644 (file)
@@ -32,6 +32,6 @@ class ModelAPI_ResultParameters : public ModelAPI_Result
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_ResultParameters> ResultParametersPtr;
+typedef std::shared_ptr<ModelAPI_ResultParameters> ResultParametersPtr;
 
 #endif
index bd7a7deeab05c1e9ae8f50d67010e80c513137dc..f0db94ee31b44cc9a6fd52207d1c5016020e68a2 100644 (file)
@@ -40,13 +40,13 @@ class ModelAPI_ResultPart : public ModelAPI_Result
   }
 
   /// Returns the part-document of this result
-  virtual boost::shared_ptr<ModelAPI_Document> partDoc() = 0;
+  virtual std::shared_ptr<ModelAPI_Document> partDoc() = 0;
 
   /// Sets this document as current and if it is not loaded yet, loads it
   virtual void activate() = 0;
 };
 
 //! Pointer on feature object
-typedef boost::shared_ptr<ModelAPI_ResultPart> ResultPartPtr;
+typedef std::shared_ptr<ModelAPI_ResultPart> ResultPartPtr;
 
 #endif
index db8a54ca2c32b820601dcd261c42429dd40f8633..c7b784d3ac7f51fc2e63277450b4aad6cc7fc071 100644 (file)
@@ -42,18 +42,18 @@ using namespace std;
 #endif
 
 /// Manager that will be initialized from Model package, one per application
-boost::shared_ptr<ModelAPI_Session> MY_MANAGER;
+std::shared_ptr<ModelAPI_Session> MY_MANAGER;
 
 ModelAPI_Session::ModelAPI_Session()
 {
 }
 
-void ModelAPI_Session::setSession(boost::shared_ptr<ModelAPI_Session> theManager)
+void ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session> theManager)
 {
   MY_MANAGER = theManager;
 }
 
-boost::shared_ptr<ModelAPI_Session> ModelAPI_Session::get()
+std::shared_ptr<ModelAPI_Session> ModelAPI_Session::get()
 {
   if (!MY_MANAGER) {  // import Model library that implements this interface of ModelAPI
     Config_ModuleReader::loadLibrary("Model");
index 95199bbabb42494f2921d08e7c342d8a08e989d9..811174e7c235b4614f323824b07cacaba0a7c116 100644 (file)
@@ -8,7 +8,7 @@
 #include "ModelAPI.h"
 #include <string>
 #include <list>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class ModelAPI_Feature;
 class ModelAPI_Plugin;
@@ -26,7 +26,7 @@ class MODELAPI_EXPORT ModelAPI_Session
 {
  public:
   /// Returns the real implementation (the alone instance per application) of the plugin manager
-  static boost::shared_ptr<ModelAPI_Session> get();
+  static std::shared_ptr<ModelAPI_Session> get();
 
   //! Loads the OCAF document from the file.
   //! \param theFileName full name of the file to load
@@ -69,23 +69,23 @@ class MODELAPI_EXPORT ModelAPI_Session
   virtual void registerPlugin(ModelAPI_Plugin* thePlugin) = 0;
 
   /// Returns the root document of the application (that may contains sub-documents)
-  virtual boost::shared_ptr<ModelAPI_Document> moduleDocument() = 0;
+  virtual std::shared_ptr<ModelAPI_Document> moduleDocument() = 0;
 
   /// Return true if root document has been already created
   virtual bool hasModuleDocument() = 0;
 
   /// Returns the current document that used for current work in the application
-  virtual boost::shared_ptr<ModelAPI_Document> activeDocument() = 0;
+  virtual std::shared_ptr<ModelAPI_Document> activeDocument() = 0;
 
   /// Defines the current document that used for current work in the application
   virtual void setActiveDocument(
-    boost::shared_ptr<ModelAPI_Document> theDoc, bool theSendSignal = true) = 0;
+    std::shared_ptr<ModelAPI_Document> theDoc, bool theSendSignal = true) = 0;
 
   /// Returns all the opened documents of the session (without postponed)
-  virtual std::list<boost::shared_ptr<ModelAPI_Document> > allOpenedDocuments() = 0;
+  virtual std::list<std::shared_ptr<ModelAPI_Document> > allOpenedDocuments() = 0;
 
   /// Copies the document to the new one with the given id
-  virtual boost::shared_ptr<ModelAPI_Document> copy(boost::shared_ptr<ModelAPI_Document> theSource,
+  virtual std::shared_ptr<ModelAPI_Document> copy(std::shared_ptr<ModelAPI_Document> theSource,
                                                     std::string theID) = 0;
 
   /// Returns the validators factory: the only one instance per application
@@ -101,13 +101,13 @@ class MODELAPI_EXPORT ModelAPI_Session
 
  protected:
   /// Creates the feature object using plugins functionality
-  virtual boost::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID) = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID) = 0;
 
-  static void setSession(boost::shared_ptr<ModelAPI_Session> theManager);
+  static void setSession(std::shared_ptr<ModelAPI_Session> theManager);
 
   friend class Model_Document;
 };
 
-typedef boost::shared_ptr<ModelAPI_Session> SessionPtr;
+typedef std::shared_ptr<ModelAPI_Session> SessionPtr;
 
 #endif
index 8656f2fd7545adda30c425bc11eeeee263e04519..bc086953b28a56926ceb5172e9c138f84331a8cc 100644 (file)
@@ -9,21 +9,21 @@
 
 namespace ModelAPI_Tools {
 
-  boost::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
+  std::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
   {
 
-    ResultBodyPtr aBody = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
+    ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
     if (aBody)
       return aBody->shape();
 
-    ResultConstructionPtr aConstruct = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
+    ResultConstructionPtr aConstruct = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
       theResult);
     if (aConstruct)
       return aConstruct->shape();
 
-    ResultGroupPtr aGroup = boost::dynamic_pointer_cast<ModelAPI_ResultGroup>(theResult);
+    ResultGroupPtr aGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(theResult);
     if (aGroup)
       return aGroup->shape();
-    return boost::shared_ptr<GeomAPI_Shape>();
+    return std::shared_ptr<GeomAPI_Shape>();
   }
 }
index bec1b9da1019db0f6d24606ac546cdcd9a1c61a5..5fce98955aed466bc43e23bcaf695532cad9a82d 100644 (file)
@@ -11,7 +11,7 @@
 
 namespace ModelAPI_Tools {
 /// Returns shape from the given Result object
-MODELAPI_EXPORT boost::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult);
+MODELAPI_EXPORT std::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult);
 }
 ;
 
index cd73508d58ecb55d3b82e1590bacc6abe6b24a51..a4eb79416c7f802910eb6f49b9232af7a75502bf 100644 (file)
@@ -6,7 +6,7 @@
 #define ModelAPI_Validator_H_
 
 #include <ModelAPI.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <list>
 
 class ModelAPI_Feature;
@@ -31,7 +31,7 @@ class MODELAPI_EXPORT ModelAPI_Validator
   }
 };
 
-typedef boost::shared_ptr<ModelAPI_Validator> ValidatorPtr;
+typedef std::shared_ptr<ModelAPI_Validator> ValidatorPtr;
 
 /**\class ModelAPI_ValidatorsFactory
  * \ingroup DataModel
@@ -77,7 +77,7 @@ class MODELAPI_EXPORT ModelAPI_ValidatorsFactory
   virtual const ModelAPI_Validator* validator(const std::string& theID) const = 0;
 
   /// Returns true if feature and all its attributes are valid.
-  virtual bool validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature) const = 0;
+  virtual bool validate(const std::shared_ptr<ModelAPI_Feature>& theFeature) const = 0;
 
   /// register that this attribute in feature is not obligatory for the feature execution
   /// so, it is not needed for the standard validation mechanism
index 36e09437e72d38564105a63087319edb9d56c07b..daece8b0d1fcc4c1e778a6343888d221a535b04b 100644 (file)
@@ -42,8 +42,8 @@ void ModuleBase_IModule::launchOperation(const QString& theCmdId)
 void ModuleBase_IModule::sendOperation(ModuleBase_Operation* theOperation)
 {
   static Events_ID aModuleEvent = Events_Loop::eventByName(EVENT_OPERATION_LAUNCHED);
-  boost::shared_ptr<Config_PointerMessage> aMessage =
-      boost::shared_ptr<Config_PointerMessage>(new Config_PointerMessage(aModuleEvent, this));
+  std::shared_ptr<Config_PointerMessage> aMessage =
+      std::shared_ptr<Config_PointerMessage>(new Config_PointerMessage(aModuleEvent, this));
   aMessage->setPointer(theOperation);
   Events_Loop::loop()->send(aMessage);
 }
index 25c0bf2469a3d34fc077546ae0ce56ec108a5b88..7e77804ac36a440d483d726af92e7b29b97d0fac 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <QObject>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class Config_WidgetAPI;
 class ModuleBase_WidgetValue;
index e906b93233b4d133af8559521507554c0cb887f4..c7525d7427571a1879f004c7c79b13c3231e2d72 100644 (file)
@@ -132,7 +132,7 @@ FeaturePtr ModuleBase_Operation::createFeature(
   if (theCompositeFeature) {
     myFeature = theCompositeFeature->addFeature(getDescription()->operationId().toStdString());
   } else {
-    boost::shared_ptr<ModelAPI_Document> aDoc = document();
+    std::shared_ptr<ModelAPI_Document> aDoc = document();
     myFeature = aDoc->addFeature(getDescription()->operationId().toStdString());
   }
   if (myFeature) {  // TODO: generate an error if feature was not created
@@ -175,7 +175,7 @@ bool ModuleBase_Operation::hasObject(ObjectPtr theObj) const
 }
 
 
-boost::shared_ptr<ModelAPI_Document> ModuleBase_Operation::document() const
+std::shared_ptr<ModelAPI_Document> ModuleBase_Operation::document() const
 {
   return ModelAPI_Session::get()->moduleDocument();
 }
@@ -330,7 +330,7 @@ void ModuleBase_Operation::initSelection(ModuleBase_ISelection* theSelection,
 
     double aX, anY;
     if (getViewerPoint(aPrs, theViewer, aX, anY))
-      aValue->setPoint(boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
+      aValue->setPoint(std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
     myPreSelection.append(aValue);
   }
 }
@@ -351,7 +351,7 @@ bool ModuleBase_Operation::setWidgetValue(ObjectPtr theFeature, double theX, dou
     return false;
   ModuleBase_WidgetValueFeature* aValue = new ModuleBase_WidgetValueFeature();
   aValue->setObject(theFeature);
-  aValue->setPoint(boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY)));
+  aValue->setPoint(std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY)));
   bool isApplyed = aActiveWgt->setValue(aValue);
 
   delete aValue;
index cf92faa43ae2191e0419561c1bd3cba22089320d..f1b0ae2180b7963563f06ba4fd977d80833195a2 100644 (file)
@@ -209,7 +209,7 @@ signals:
   virtual bool canBeCommitted() const;
 
   /// Returns pointer to the root document.
-  boost::shared_ptr<ModelAPI_Document> document() const;
+  std::shared_ptr<ModelAPI_Document> document() const;
 
   /// Set value to the active widget
   /// \param theFeature the feature
index 6de0bba8fc0d5037959669ea11288756b16420f4..73f066fc32ea4f4b08d90708cc347f8224ce3a02 100644 (file)
@@ -19,9 +19,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ResultPrs, AIS_Shape);
 ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult)
   : AIS_Shape(TopoDS_Shape()), myResult(theResult), myIsSketchMode(false)
 {
-  boost::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(theResult);
-  boost::shared_ptr<GeomAPI_PlanarEdges> aWirePtr = 
-    boost::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aShapePtr);
+  std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(theResult);
+  std::shared_ptr<GeomAPI_PlanarEdges> aWirePtr = 
+    std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aShapePtr);
   if (aWirePtr) {
     if (aWirePtr->hasPlane() ) {
       // If this is a wire with plane defined thin it is a sketch-like object
@@ -45,7 +45,7 @@ void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t
                                    const Handle(Prs3d_Presentation)& thePresentation, 
                                    const Standard_Integer theMode)
 {
-  boost::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(myResult);
+  std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(myResult);
   if (!aShapePtr)
     return;
   myOriginalShape = aShapePtr->impl<TopoDS_Shape>();
@@ -63,7 +63,7 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a
       TopoDS_Compound aComp;
       aBuilder.MakeCompound(aComp);
       aBuilder.Add(aComp, myOriginalShape);
-      std::list<boost::shared_ptr<GeomAPI_Shape>>::const_iterator aIt;
+      std::list<std::shared_ptr<GeomAPI_Shape>>::const_iterator aIt;
       for (aIt = myFacesList.cbegin(); aIt != myFacesList.cend(); ++aIt) {
         TopoDS_Shape aFace = (*aIt)->impl<TopoDS_Shape>();
         aBuilder.Add(aComp, aFace);
index 0d2d058ce6540fefb7aa324a9b69464b50f311e5..62b82389c6febed609181ae4ed5a5a53d15750a7 100644 (file)
@@ -35,7 +35,7 @@ private:
   bool myIsSketchMode;
 
   TopoDS_Shape myOriginalShape;
-  std::list<boost::shared_ptr<GeomAPI_Shape> > myFacesList;
+  std::list<std::shared_ptr<GeomAPI_Shape> > myFacesList;
 };
 
 
index 1d17c685915bf7e4e47b66f1270816345d4c21a0..a7e2cd3f7b383a80988a86f2f1d8ab396fb37274 100644 (file)
@@ -31,7 +31,7 @@ Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk(const Handle(SelectMgr_Ent
     Handle(AIS_InteractiveObject) aAisObj = 
       Handle(AIS_InteractiveObject)::DownCast(theOwner->Selectable());
     if (!aAisObj.IsNull()) {
-      boost::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
+      std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
       aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aAisObj));
       ObjectPtr aObj = myWorkshop->findPresentedObject(aAISObj);
       if (aObj) {
@@ -96,14 +96,14 @@ Standard_Boolean ModuleBase_ObjectTypesFilter::IsOk(const Handle(SelectMgr_Entit
     Handle(AIS_InteractiveObject) aAisObj = 
       Handle(AIS_InteractiveObject)::DownCast(theOwner->Selectable());
     if (!aAisObj.IsNull()) {
-      boost::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
+      std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
       aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aAisObj));
       ObjectPtr aObj = myWorkshop->findPresentedObject(aAISObj);
 
       foreach (QString aType, myTypes) {
         if (aType.toLower() == "construction") {
           ResultConstructionPtr aConstr = 
-            boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aObj);
+            std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aObj);
           return (aConstr != NULL);
         } // ToDo: Process other types of objects
       }
index 83c9e319354e36d1cde486cb650d719b0e772a22..b9bcb2b9d5c18c4a2f61a00dd822e5f70d36ccba 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "ModuleBase.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <TopoDS_Shape.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <AIS_InteractiveObject.hxx>
index cc0197d577d18d90a5876633cfdf4ce348c92262..4e0ceee4c1dfb7e405798432d9882c7b3b5ebcd3 100644 (file)
@@ -45,7 +45,7 @@ QWidget* ModuleBase_WidgetBoolValue::getControl() const
 bool ModuleBase_WidgetBoolValue::storeValue() const
 {
   DataPtr aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeBoolean> aBool = aData->boolean(attributeID());
+  std::shared_ptr<ModelAPI_AttributeBoolean> aBool = aData->boolean(attributeID());
   aBool->setValue(myCheckBox->isChecked());
   updateObject(myFeature);
   return true;
@@ -54,7 +54,7 @@ bool ModuleBase_WidgetBoolValue::storeValue() const
 bool ModuleBase_WidgetBoolValue::restoreValue()
 {
   DataPtr aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeBoolean> aRef = aData->boolean(attributeID());
+  std::shared_ptr<ModelAPI_AttributeBoolean> aRef = aData->boolean(attributeID());
 
   bool isBlocked = myCheckBox->blockSignals(true);
   myCheckBox->setChecked(aRef->value());
index 65c6c189077c27f97a42a1eeafac4bbfb49cddc3..b2d017db6b5aa0d39c3879270a2d0854e242e28e 100644 (file)
@@ -47,7 +47,7 @@ ModuleBase_WidgetChoice::~ModuleBase_WidgetChoice()
 bool ModuleBase_WidgetChoice::storeValue() const
 {
   DataPtr aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeInteger> aIntAttr = aData->integer(attributeID());
+  std::shared_ptr<ModelAPI_AttributeInteger> aIntAttr = aData->integer(attributeID());
 
   aIntAttr->setValue(myCombo->currentIndex());
   updateObject(myFeature);
@@ -57,7 +57,7 @@ bool ModuleBase_WidgetChoice::storeValue() const
 bool ModuleBase_WidgetChoice::restoreValue()
 {
   DataPtr aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeInteger> aIntAttr = aData->integer(attributeID());
+  std::shared_ptr<ModelAPI_AttributeInteger> aIntAttr = aData->integer(attributeID());
 
   bool isBlocked = myCombo->blockSignals(true);
   myCombo->setCurrentIndex(aIntAttr->value());
index 0b84e8444cedee1262f775e5a73fb10f68487c5d..3b28aeb6a00f6ab380c1e8af8cd9cce1611409f8 100644 (file)
@@ -117,12 +117,12 @@ bool ModuleBase_WidgetFeature::setObject(const ObjectPtr& theObject, bool theSen
 
 bool ModuleBase_WidgetFeature::storeValue() const
 {
-  //FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
+  //FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
   if (!myObject)
     return false;
 
-  boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(attributeID()));
 
   ModuleBase_WidgetFeature* that = (ModuleBase_WidgetFeature*) this;
@@ -134,8 +134,8 @@ bool ModuleBase_WidgetFeature::storeValue() const
 
 bool ModuleBase_WidgetFeature::restoreValue()
 {
-  boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(attributeID()));
 
   ObjectPtr anObjPtr = aRef->object();
index cea8d1ec49bc7c75adcb7dacc1131ceaec1d6580..9c052588d821c765302b54ec0800a5d49c5a2377 100644 (file)
@@ -54,7 +54,7 @@ bool ModuleBase_WidgetFeatureOrAttribute::setValue(ModuleBase_WidgetValue* theVa
     if (aFeatureValue) {
       ObjectPtr aObject = aFeatureValue->object();
 
-      boost::shared_ptr<ModelAPI_Attribute> anAttribute = findAttribute(aFeatureValue);
+      std::shared_ptr<ModelAPI_Attribute> anAttribute = findAttribute(aFeatureValue);
       if (anAttribute) {
         isDone = setAttribute(anAttribute, false);
       }
@@ -71,12 +71,12 @@ bool ModuleBase_WidgetFeatureOrAttribute::setValue(ModuleBase_WidgetValue* theVa
 
 bool ModuleBase_WidgetFeatureOrAttribute::storeValue() const
 {
-  //FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
+  //FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
   //if (!aFeature)
   //  return false;
 
-  boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(attributeID()));
 
   if (myObject)
@@ -92,8 +92,8 @@ bool ModuleBase_WidgetFeatureOrAttribute::storeValue() const
 
 bool ModuleBase_WidgetFeatureOrAttribute::restoreValue()
 {
-  boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(attributeID()));
 
   ObjectPtr aObj = aRef->object();
@@ -114,27 +114,27 @@ bool ModuleBase_WidgetFeatureOrAttribute::restoreValue()
   return false;
 }
 
-boost::shared_ptr<ModelAPI_Attribute> ModuleBase_WidgetFeatureOrAttribute::findAttribute(
+std::shared_ptr<ModelAPI_Attribute> ModuleBase_WidgetFeatureOrAttribute::findAttribute(
                                                         ModuleBase_WidgetValue* theValue)
 {
-  boost::shared_ptr<ModelAPI_Attribute> anAttribute;
+  std::shared_ptr<ModelAPI_Attribute> anAttribute;
   ModuleBase_WidgetValueFeature* aFeatureValue =
                                   dynamic_cast<ModuleBase_WidgetValueFeature*>(theValue);
   if (!aFeatureValue)
     return anAttribute;
 
-  boost::shared_ptr<GeomAPI_Pnt2d> aValuePoint = aFeatureValue->point();
+  std::shared_ptr<GeomAPI_Pnt2d> aValuePoint = aFeatureValue->point();
   if (aValuePoint) {
     ObjectPtr aObject = aFeatureValue->object();
     FeaturePtr aFeature = ModelAPI_Feature::feature(aObject);
     if (aFeature) {
       // find the given point in the feature attributes
-      std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttiributes = aFeature->data()
+      std::list<std::shared_ptr<ModelAPI_Attribute> > anAttiributes = aFeature->data()
           ->attributes(GeomDataAPI_Point2D::type());
-      std::list<boost::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes
+      std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes
           .begin(), aLast = anAttiributes.end();
       for (; anIt != aLast && !anAttribute; anIt++) {
-        boost::shared_ptr<GeomDataAPI_Point2D> aCurPoint = boost::dynamic_pointer_cast<
+        std::shared_ptr<GeomDataAPI_Point2D> aCurPoint = std::dynamic_pointer_cast<
             GeomDataAPI_Point2D>(*anIt);
         if (aCurPoint && aCurPoint->pnt()->distance(aValuePoint) < Precision::Confusion())
           anAttribute = aCurPoint;
@@ -145,7 +145,7 @@ boost::shared_ptr<ModelAPI_Attribute> ModuleBase_WidgetFeatureOrAttribute::findA
 }
 
 bool ModuleBase_WidgetFeatureOrAttribute::setAttribute(
-    const boost::shared_ptr<ModelAPI_Attribute>& theAttribute, bool theSendEvent)
+    const std::shared_ptr<ModelAPI_Attribute>& theAttribute, bool theSendEvent)
 {
   if (!theAttribute)  // || !featureKinds().contains(theAttribute->attributeType().c_str()))
     return false;
index 1dfd055ceb48f2b8699942cc7e59ec4f927cd5c9..5fac251978e04a1794e9f41bf29291c2d437ea1d 100644 (file)
@@ -47,16 +47,16 @@ Q_OBJECT
    /// Returns the feature attribute if it can be found by the given value
    /// \param theValue the widget value
    /// \return an attribute or null
-   boost::shared_ptr<ModelAPI_Attribute> findAttribute(ModuleBase_WidgetValue* theValue);
+   std::shared_ptr<ModelAPI_Attribute> findAttribute(ModuleBase_WidgetValue* theValue);
 
   /// Set the attribute
   /// \param theAttribute value
   /// \return the boolean result of the attribute set
-  bool setAttribute(const boost::shared_ptr<ModelAPI_Attribute>& theAttribute, bool theSendEvent =
+  bool setAttribute(const std::shared_ptr<ModelAPI_Attribute>& theAttribute, bool theSendEvent =
                         true);
 
  protected:
-  boost::shared_ptr<ModelAPI_Attribute> myAttribute;  /// < the attribute
+  std::shared_ptr<ModelAPI_Attribute> myAttribute;  /// < the attribute
 };
 
 #endif
index 259560e382bddebbf27832b31f65cd2a432a1faf..2fb71922adff9c26e199d59d27b48aef2502a067 100644 (file)
@@ -24,7 +24,7 @@
 #include <QString>
 #include <QLabel>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 #include <string>
 
 ModuleBase_WidgetFileSelector::ModuleBase_WidgetFileSelector(QWidget* theParent,
index bf311c59f51979de549a89f7b5754f28ea104a3a..19771a66fd10deb7b3fb7e3c22d546d1725582f1 100644 (file)
@@ -21,7 +21,7 @@
 #include <QObject>
 #include <QString>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 #include <string>
 
 ModuleBase_WidgetLineEdit::ModuleBase_WidgetLineEdit(QWidget* theParent,
index 87c62ba3909e0eae55b51f2e95a294a36b0e733b..ea21968a10618d8e6ee9a29161d873644473f118 100644 (file)
@@ -25,7 +25,7 @@
 #include <QComboBox>
 #include <QEvent>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 #include <string>
 
 ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParent,
@@ -78,7 +78,7 @@ bool ModuleBase_WidgetMultiSelector::storeValue() const
     return false;
   DataPtr aData = myFeature->data();
   AttributeSelectionListPtr aSelectionListAttr = 
-    boost::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
+    std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
 
   if (aSelectionListAttr) {
     aSelectionListAttr->clear();
@@ -104,7 +104,7 @@ bool ModuleBase_WidgetMultiSelector::restoreValue()
     return false;
   DataPtr aData = myFeature->data();
   AttributeSelectionListPtr aSelectionListAttr = 
-    boost::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
+    std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
 
   if (aSelectionListAttr) {
     mySelection.clear();
@@ -182,7 +182,7 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged()
   NCollection_List<TopoDS_Shape>::Iterator aShpIt(aSelectedShapes);
   GeomShapePtr aShape;
   for (aIt = aOwnersList.cbegin(); aIt != aOwnersList.cend(); aShpIt.Next(), aIt++) {
-    ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(*aIt);
+    ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(*aIt);
     if (myFeature) {
       // We can not select a result of our feature
       const std::list<ResultPtr>& aResList = myFeature->results();
@@ -197,7 +197,7 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged()
       if(isSkipSelf)
         continue;
     }
-    aShape = boost::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
+    aShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
     aShape->setImpl(new TopoDS_Shape(aShpIt.Value()));
     mySelection.append(GeomSelection(aResult, aShape));
   }
index 21cef047dc80351fff5b0ca7a32d1aaa36d132b8..130870221d62b2f38ba62e8badfac574a9852ddf 100644 (file)
@@ -81,7 +81,7 @@ bool ModuleBase_WidgetPoint2D::setValue(ModuleBase_WidgetValue* theValue)
     ModuleBase_WidgetValueFeature* aFeatureValue =
         dynamic_cast<ModuleBase_WidgetValueFeature*>(theValue);
     if (aFeatureValue) {
-      boost::shared_ptr<GeomAPI_Pnt2d> aPoint = aFeatureValue->point();
+      std::shared_ptr<GeomAPI_Pnt2d> aPoint = aFeatureValue->point();
       if (aPoint) {
         setPoint(aPoint);
         isDone = true;
@@ -91,7 +91,7 @@ bool ModuleBase_WidgetPoint2D::setValue(ModuleBase_WidgetValue* theValue)
   return isDone;
 }
 
-void ModuleBase_WidgetPoint2D::setPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+void ModuleBase_WidgetPoint2D::setPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
 
   bool isBlocked = this->blockSignals(true);
@@ -104,8 +104,8 @@ void ModuleBase_WidgetPoint2D::setPoint(const boost::shared_ptr<GeomAPI_Pnt2d>&
 
 bool ModuleBase_WidgetPoint2D::storeValue() const
 {
-  boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(attributeID()));
   
   ModuleBase_WidgetPoint2D* that = (ModuleBase_WidgetPoint2D*) this;
@@ -126,8 +126,8 @@ bool ModuleBase_WidgetPoint2D::storeValue() const
 
 bool ModuleBase_WidgetPoint2D::restoreValue()
 {
-  boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(attributeID()));
 
 #ifdef _DEBUG
@@ -160,8 +160,8 @@ bool ModuleBase_WidgetPoint2D::initFromPrevious(ObjectPtr theObject)
 {
   if (myOptionParam.length() == 0)
     return false;
-  boost::shared_ptr<ModelAPI_Data> aData = theObject->data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<ModelAPI_Data> aData = theObject->data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(myOptionParam));
   if (aPoint) {
     bool isBlocked = this->blockSignals(true);
index 29d65a7b23288511f351566c41cdd561c0f26b5f..39421198084235aa6581975d95aaa1ed442d6873 100644 (file)
@@ -64,7 +64,7 @@ signals:
  protected:
   /// Fill the widget values by given point
   /// \param thePoint the point
-  void setPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  void setPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
  private:
   QGroupBox* myGroupBox;  ///< the parent group box for all intenal widgets
index 56496ebd15cdf0a6eab3b59e8fde136562a33f1c..210f4bcba873de3765486f3fee698b88aad5e389 100644 (file)
@@ -33,9 +33,9 @@ bool ModuleBase_WidgetPoint2dDistance::setValue(ModuleBase_WidgetValue* theValue
     ModuleBase_WidgetValueFeature* aFeatureValue =
         dynamic_cast<ModuleBase_WidgetValueFeature*>(theValue);
     if (aFeatureValue) {
-      boost::shared_ptr<GeomAPI_Pnt2d> aPnt = aFeatureValue->point();
+      std::shared_ptr<GeomAPI_Pnt2d> aPnt = aFeatureValue->point();
       ObjectPtr aObject = aFeatureValue->object();
-      FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aObject);
+      FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObject);
       if (aFeature && aPnt) {
         setPoint(aFeature, aPnt);
         isDone = true;
@@ -46,10 +46,10 @@ bool ModuleBase_WidgetPoint2dDistance::setValue(ModuleBase_WidgetValue* theValue
 }
 
 void ModuleBase_WidgetPoint2dDistance::setPoint(FeaturePtr theFeature,
-                                                const boost::shared_ptr<GeomAPI_Pnt2d>& thePnt)
+                                                const std::shared_ptr<GeomAPI_Pnt2d>& thePnt)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(myFirstPntName));
   if (!aPoint)
     return;
index 164e78bac87f7d8ecc7010f7c1562642b52b48b5..e80aa393b78b007d0f2fd39a277a0f939a41d257 100644 (file)
@@ -30,7 +30,7 @@ Q_OBJECT
 
  protected:
   /// Set the second point which defines a value in the widget as a distance with a first point defined by feature
-  void setPoint(FeaturePtr theFeature, const boost::shared_ptr<GeomAPI_Pnt2d>& thePnt);
+  void setPoint(FeaturePtr theFeature, const std::shared_ptr<GeomAPI_Pnt2d>& thePnt);
 
  private:
   std::string myFirstPntName;
index 76c2da2062fa2955e807410e1198d5dd5470c3c8..91cc255e8c7af1d3d5416549a88853f95d00a6ca 100644 (file)
@@ -47,7 +47,7 @@
 #include <TopExp_Explorer.hxx>
 #include <TopoDS_Shape.hxx>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 
 #include <list>
 #include <string>
@@ -127,18 +127,18 @@ bool ModuleBase_WidgetShapeSelector::storeValue() const
 
   DataPtr aData = myFeature->data();
   if (myUseSubShapes) {
-    boost::shared_ptr<ModelAPI_AttributeSelection> aSelect = 
-      boost::dynamic_pointer_cast<ModelAPI_AttributeSelection>(aData->attribute(attributeID()));
+    std::shared_ptr<ModelAPI_AttributeSelection> aSelect = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(aData->attribute(attributeID()));
 
-    ResultPtr aBody = boost::dynamic_pointer_cast<ModelAPI_Result>(mySelectedObject);
+    ResultPtr aBody = std::dynamic_pointer_cast<ModelAPI_Result>(mySelectedObject);
     if (aBody) {
       aSelect->setValue(aBody, myShape);
       updateObject(myFeature);
       return true;
     }
   } else {
-    boost::shared_ptr<ModelAPI_AttributeReference> aRef = 
-      boost::dynamic_pointer_cast<ModelAPI_AttributeReference>(aData->attribute(attributeID()));
+    std::shared_ptr<ModelAPI_AttributeReference> aRef = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeReference>(aData->attribute(attributeID()));
 
     ObjectPtr aObject = aRef->value();
     if (!(aObject && aObject->isSame(mySelectedObject))) {
@@ -156,13 +156,13 @@ bool ModuleBase_WidgetShapeSelector::restoreValue()
   DataPtr aData = myFeature->data();
   bool isBlocked = this->blockSignals(true);
   if (myUseSubShapes) {
-    boost::shared_ptr<ModelAPI_AttributeSelection> aSelect = aData->selection(attributeID());
+    std::shared_ptr<ModelAPI_AttributeSelection> aSelect = aData->selection(attributeID());
     if (aSelect) {
       mySelectedObject = aSelect->context();
       myShape = aSelect->value();
     }
   } else {
-    boost::shared_ptr<ModelAPI_AttributeReference> aRef = aData->reference(attributeID());
+    std::shared_ptr<ModelAPI_AttributeReference> aRef = aData->reference(attributeID());
     mySelectedObject = aRef->value();
   }
   updateSelectionName();
@@ -189,14 +189,14 @@ void ModuleBase_WidgetShapeSelector::onSelectionChanged()
       return;
 
     // Check that the selected object is result (others can not be accepted)
-    ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(aObject);
+    ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObject);
     if (!aRes)
       return;
 
     if (myFeature) {
       // We can not select a result of our feature
-      const std::list<boost::shared_ptr<ModelAPI_Result>>& aResList = myFeature->results();
-      std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aIt;
+      const std::list<std::shared_ptr<ModelAPI_Result>>& aResList = myFeature->results();
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aIt;
       for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) {
         if ((*aIt) == aRes)
           return;
@@ -223,7 +223,7 @@ void ModuleBase_WidgetShapeSelector::onSelectionChanged()
       std::list<ObjectPtr> aOwners;
       myWorkshop->selection()->selectedShapes(aShapeList, aOwners);
       if (aShapeList.Extent() > 0) {
-        aShape = boost::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
+        aShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
         aShape->setImpl(new TopoDS_Shape(aShapeList.First()));
       }
     }
@@ -243,7 +243,7 @@ void ModuleBase_WidgetShapeSelector::onSelectionChanged()
 }
 
 //********************************************************************
-void ModuleBase_WidgetShapeSelector::setObject(ObjectPtr theObj, boost::shared_ptr<GeomAPI_Shape> theShape)
+void ModuleBase_WidgetShapeSelector::setObject(ObjectPtr theObj, std::shared_ptr<GeomAPI_Shape> theShape)
 {
   mySelectedObject = theObj;
   myShape = theShape;
@@ -262,10 +262,10 @@ void ModuleBase_WidgetShapeSelector::setObject(ObjectPtr theObj, boost::shared_p
 //********************************************************************
 bool ModuleBase_WidgetShapeSelector::acceptObjectShape(const ObjectPtr theResult) const
 {
-  ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(theResult);
+  ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theResult);
 
   // Check that the shape of necessary type
-  boost::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
+  std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
   if (!aShapePtr)
     return false;
   TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
@@ -289,7 +289,7 @@ bool ModuleBase_WidgetShapeSelector::acceptObjectShape(const ObjectPtr theResult
 }
 
 //********************************************************************
-bool ModuleBase_WidgetShapeSelector::acceptSubShape(boost::shared_ptr<GeomAPI_Shape> theShape) const
+bool ModuleBase_WidgetShapeSelector::acceptSubShape(std::shared_ptr<GeomAPI_Shape> theShape) const
 {
   TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
   foreach (QString aType, myShapeTypes) {
@@ -310,7 +310,7 @@ bool ModuleBase_WidgetShapeSelector::acceptObjectType(const ObjectPtr theObject)
   foreach (QString aType, myObjectTypes) {
     if (aType.toLower() == "construction") {
       ResultConstructionPtr aConstr = 
-        boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theObject);
+        std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theObject);
       return (aConstr != NULL);
     } // ToDo: Process other types of objects
   }
index ad3d3b857931ff08b2f62fdc6c82137295c7473f..7284d8ae59ec8c7e305457122850d1a75f53c1b3 100644 (file)
@@ -83,7 +83,7 @@ Q_OBJECT
 
   /// Returns true if selected shape corresponds to requested shape types
   /// This method is called only in sub-shapes selection mode
-  virtual bool acceptSubShape(boost::shared_ptr<GeomAPI_Shape> theShape) const;
+  virtual bool acceptSubShape(std::shared_ptr<GeomAPI_Shape> theShape) const;
 
   /// Returns true if selected object corresponds to requested Object type
   /// Thid method is used in any selection mode
@@ -91,7 +91,7 @@ Q_OBJECT
 
 
   // Set the given object as a value of the widget
-  void setObject(ObjectPtr theObj, boost::shared_ptr<GeomAPI_Shape> theShape = boost::shared_ptr<GeomAPI_Shape>());
+  void setObject(ObjectPtr theObj, std::shared_ptr<GeomAPI_Shape> theShape = std::shared_ptr<GeomAPI_Shape>());
 
   //----------- Class members -------------
  private:
@@ -102,7 +102,7 @@ Q_OBJECT
   ModuleBase_IWorkshop* myWorkshop;
 
   ObjectPtr mySelectedObject;
-  boost::shared_ptr<GeomAPI_Shape> myShape;
+  std::shared_ptr<GeomAPI_Shape> myShape;
 
   QStringList myShapeTypes;
   QStringList myObjectTypes;
index e6a4f818c71b465c2842b37a7f5ced7566376e98..43d3a7cfe3dbd6c51f9daa1d9ff7259cb3e5fdd4 100644 (file)
@@ -24,12 +24,12 @@ const ObjectPtr& ModuleBase_WidgetValueFeature::object() const
   return myResult;
 }
 
-void ModuleBase_WidgetValueFeature::setPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+void ModuleBase_WidgetValueFeature::setPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
   myPoint = thePoint;
 }
 
-const boost::shared_ptr<GeomAPI_Pnt2d>& ModuleBase_WidgetValueFeature::point() const
+const std::shared_ptr<GeomAPI_Pnt2d>& ModuleBase_WidgetValueFeature::point() const
 {
   return myPoint;
 }
index 53abb591bdbd8e5345c306929bbd88253dbcf0ef..d11a6bfd9fd44f48eb5da343e32749852d28caf8 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <ModelAPI_Result.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Pnt2d;
 
@@ -36,15 +36,15 @@ class ModuleBase_WidgetValueFeature : public ModuleBase_WidgetValue
 
   /// Fill the widget values by given point
   /// \param thePoint the point
-  MODULEBASE_EXPORT void setPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  MODULEBASE_EXPORT void setPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
   /// Returns the widget point
   /// \return the current point
-  MODULEBASE_EXPORT const boost::shared_ptr<GeomAPI_Pnt2d>& point() const;
+  MODULEBASE_EXPORT const std::shared_ptr<GeomAPI_Pnt2d>& point() const;
 
  private:
   ObjectPtr myResult;
-  boost::shared_ptr<GeomAPI_Pnt2d> myPoint;
+  std::shared_ptr<GeomAPI_Pnt2d> myPoint;
 };
 
 #endif
index 8d34fb04157a77afd5d17c64e0607444d1048e9b..d12987eded6f32e09ad00e6e7b0f4e5e2a3237ea 100644 (file)
@@ -39,7 +39,7 @@ PartSet_Listener::~PartSet_Listener()
 }
 
 //******************************************************
-void PartSet_Listener::processEvent(const boost::shared_ptr<Events_Message>& theMessage)
+void PartSet_Listener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
   ModuleBase_Operation* anOperation = myModule->xWorkshop()->operationMgr()->currentOperation();
   PartSet_OperationSketchBase* aSketchOp = dynamic_cast<PartSet_OperationSketchBase*>(anOperation);
@@ -49,8 +49,8 @@ void PartSet_Listener::processEvent(const boost::shared_ptr<Events_Message>& the
   XGUI_Displayer* aDisplayer = myModule->xWorkshop()->displayer();
   QString aType = QString(theMessage->eventID().eventText());
   if (aType == EVENT_OBJECT_CREATED) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     std::set<ObjectPtr> aFeatures = aUpdMsg->objects();
 
     PartSet_OperationSketch* aSketchOp = 
@@ -76,8 +76,8 @@ void PartSet_Listener::processEvent(const boost::shared_ptr<Events_Message>& the
       XGUI_Displayer* aDisplayer = myModule->xWorkshop()->displayer();
       FeaturePtr aFeature = aCreationOp->feature();
       const std::list<ResultPtr>& aResults = aFeature->results();
-      boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+      std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
 
       std::set<ObjectPtr> aFeatures = aUpdMsg->objects();
       std::set<ObjectPtr>::const_iterator aObjIt, aNoObj = aFeatures.cend();
@@ -90,9 +90,9 @@ void PartSet_Listener::processEvent(const boost::shared_ptr<Events_Message>& the
       }
     }
   } else if (aType == EVENT_OBJECT_DELETED) {
-    boost::shared_ptr<ModelAPI_ObjectDeletedMessage> aDelMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
-    boost::shared_ptr<ModelAPI_Document> aDoc = aDelMsg->document();
+    std::shared_ptr<ModelAPI_ObjectDeletedMessage> aDelMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_Document> aDoc = aDelMsg->document();
 
     std::set<std::string> aGroups = aDelMsg->groups();
     std::set<std::string>::const_iterator anIt = aGroups.begin(), aLast = aGroups.end();
index 272a40063a0ce08be3ea474d85783684f14549b3..8950d2f64f4c32168765b9aa3d81578eacd9c81f 100644 (file)
@@ -26,7 +26,7 @@ class PARTSET_EXPORT PartSet_Listener : public Events_Listener
   virtual ~PartSet_Listener();
 
   /// This method is called by loop when the event is started to process.
-  virtual void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
  private:
   PartSet_Module* myModule;  ///< the current module
index d2c0d9de888270eb9e21938692d81e911602edaa..092b0769f36c6d06f01939d757caac942a59086a 100644 (file)
@@ -204,7 +204,7 @@ void PartSet_Module::onContextMenuCommand(const QString& theId, bool isChecked)
 {
   QList<ObjectPtr> aFeatures = workshop()->selection()->selectedObjects();
   if (theId == "EDIT_CMD" && (aFeatures.size() > 0)) {
-    FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aFeatures.first());
+    FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aFeatures.first());
     if (aFeature)
       editFeature(aFeature);
   }
@@ -481,7 +481,7 @@ void PartSet_Module::updateCurrentPreview(const std::string& theCmdId)
 
   std::list<FeaturePtr>::const_iterator anIt = aList.begin(), aLast = aList.end();
   for (; anIt != aLast; anIt++) {
-    boost::shared_ptr<SketchPlugin_Feature> aSPFeature = boost::dynamic_pointer_cast<
+    std::shared_ptr<SketchPlugin_Feature> aSPFeature = std::dynamic_pointer_cast<
         SketchPlugin_Feature>(*anIt);
     if (!aSPFeature)
       continue;
@@ -505,7 +505,7 @@ void PartSet_Module::editFeature(FeaturePtr theFeature)
 //  if (theFeature->getKind() == SKETCH_KIND) {
   //FeaturePtr aFeature = theFeature;
   //if (XGUI_Tools::isModelObject(aFeature)) {
-  //  ObjectPtr aObject = boost::dynamic_pointer_cast<ModelAPI_Object>(aFeature);
+  //  ObjectPtr aObject = std::dynamic_pointer_cast<ModelAPI_Object>(aFeature);
   //  aFeature = aObject->featureRef();
   //}
 
@@ -518,14 +518,14 @@ void PartSet_Module::editFeature(FeaturePtr theFeature)
 
 void PartSet_Module::onStorePoint2D(ObjectPtr theFeature, const std::string& theAttribute)
 {
-  FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
+  FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
 
   PartSet_OperationSketchBase* aPreviewOp = 
     dynamic_cast<PartSet_OperationSketchBase*>(myWorkshop->currentOperation());
   if (!aPreviewOp)
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aFeature->data()->attribute(theAttribute));
 
   PartSet_Tools::setConstraints(aPreviewOp->sketch(), aFeature, theAttribute, aPoint->x(),
@@ -559,7 +559,7 @@ XGUI_Workshop* PartSet_Module::xWorkshop() const
 QIntList PartSet_Module::sketchSelectionModes(ObjectPtr theFeature)
 {
   QIntList aModes;
-  FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
+  FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
   if (aFeature) {
     if (aFeature->getKind() == SketchPlugin_Sketch::ID()) {
       aModes.append(TopAbs_FACE);
@@ -579,9 +579,9 @@ QIntList PartSet_Module::sketchSelectionModes(ObjectPtr theFeature)
 gp_Pln PartSet_Module::getSketchPlane(FeaturePtr theSketch) const
 {
   DataPtr aData = theSketch->data();
-  boost::shared_ptr<GeomDataAPI_Point> anOrigin = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       aData->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aNorm = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aNorm = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::NORM_ID()));
   gp_Pnt aOrig(anOrigin->x(), anOrigin->y(), anOrigin->z());
   gp_Dir aDir(aNorm->x(), aNorm->y(), aNorm->z());
index a3a188ad0347ff9a10f376b7bc06d3f382f84928..b42c1a93da6d9ccf3ee8213360f6d6b0a9a083b5 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <string>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class PartSet_Listener;
 class ModelAPI_Feature;
index 2d53041c0fefa5ef2e8bd84cb707fbfb3e644e53..65689f2e6d3e752f3c852794dab53f5786dc452a 100644 (file)
@@ -117,7 +117,7 @@ bool PartSet_OperationFeatureBase::getViewerPoint(ModuleBase_ViewerPrs thePrs,
     return false;
   ModuleBase_WidgetValueFeature* aValue = new ModuleBase_WidgetValueFeature();
   aValue->setObject(theFeature);
-  aValue->setPoint(boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY)));
+  aValue->setPoint(std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY)));
   bool isApplyed = aActiveWgt->setValue(aValue);
 
   delete aValue;
index a49e63dc7149ce030c9f51ffdf73a700cd07038f..d44dfa3d7f8d51084ac72356951b69aacf3334a8 100644 (file)
@@ -116,7 +116,7 @@ void PartSet_OperationFeatureEdit::fillFeature2Attribute(
         continue;
 
       // append the attribute of the vertex if it is found on the current feature
-      boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D = PartSet_Tools::getFeaturePoint(
+      std::shared_ptr<GeomDataAPI_Point2D> aPoint2D = PartSet_Tools::getFeaturePoint(
                                                                     aFeature, aX, anY);
       std::string anAttribute = aFeature->data()->id(aPoint2D);
       std::list<std::string> aList;
@@ -239,8 +239,8 @@ void PartSet_OperationFeatureEdit::mouseMoved(QMouseEvent* theEvent, ModuleBase_
     //    std::list<std::string> anAttributes = aFeatIter->second;
     //    // perform edit for the feature
     //    if (anAttributes.empty()) {
-    //      boost::shared_ptr<SketchPlugin_Feature> aSketchFeature =
-    //                                     boost::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
+    //      std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
+    //                                     std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
     //      if (aSketchFeature) {
     //        aSketchFeature->move(aDeltaX, aDeltaY);
     //      }
@@ -250,7 +250,7 @@ void PartSet_OperationFeatureEdit::mouseMoved(QMouseEvent* theEvent, ModuleBase_
     //      std::list<std::string>::const_iterator anAttrIter = anAttributes.begin(),
     //                                             anAttrEnd = anAttributes.end();
     //      for (; anAttrIter != anAttrEnd; anAttrIter++) {
-    //        boost::shared_ptr<GeomDataAPI_Point2D> aPointAttr = boost::dynamic_pointer_cast<
+    //        std::shared_ptr<GeomDataAPI_Point2D> aPointAttr = std::dynamic_pointer_cast<
     //                         GeomDataAPI_Point2D>(aFeature->data()->attribute(*anAttrIter));
     //        if (aPointAttr) {
     //          aPointAttr->move(aDeltaX, aDeltaY);
@@ -262,7 +262,7 @@ void PartSet_OperationFeatureEdit::mouseMoved(QMouseEvent* theEvent, ModuleBase_
     //}
     //else { // multieditoperation
 
-    //boost::shared_ptr<SketchPlugin_Feature> aSketchFeature = boost::dynamic_pointer_cast<
+    //std::shared_ptr<SketchPlugin_Feature> aSketchFeature = std::dynamic_pointer_cast<
     //    SketchPlugin_Feature>(feature());
 
     bool isMoved = false;
@@ -290,8 +290,8 @@ void PartSet_OperationFeatureEdit::mouseMoved(QMouseEvent* theEvent, ModuleBase_
       std::list<std::string> anAttributes = aFeatIter->second;
       // perform edit for the feature
       if (anAttributes.empty()) {
-        boost::shared_ptr<SketchPlugin_Feature> aSketchFeature =
-                                       boost::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
+        std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
+                                       std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
         if (aSketchFeature) {
           aSketchFeature->move(aDeltaX, aDeltaY);
           isMoved = true;
@@ -302,7 +302,7 @@ void PartSet_OperationFeatureEdit::mouseMoved(QMouseEvent* theEvent, ModuleBase_
         std::list<std::string>::const_iterator anAttrIter = anAttributes.begin(),
                                                anAttrEnd = anAttributes.end();
         for (; anAttrIter != anAttrEnd; anAttrIter++) {
-          boost::shared_ptr<GeomDataAPI_Point2D> aPointAttr = boost::dynamic_pointer_cast<
+          std::shared_ptr<GeomDataAPI_Point2D> aPointAttr = std::dynamic_pointer_cast<
                            GeomDataAPI_Point2D>(aFeature->data()->attribute(*anAttrIter));
           if (aPointAttr) {
             aPointAttr->move(aDeltaX, aDeltaY);
index c3ca9d922d802d974e962a87ac41eddf62f6983c..5d9454d7a143e262a2b28d45576a1520fb5297d7 100644 (file)
@@ -51,7 +51,7 @@ PartSet_OperationSketch::~PartSet_OperationSketch()
 
 CompositeFeaturePtr PartSet_OperationSketch::sketch() const
 {
-  return boost::dynamic_pointer_cast<ModelAPI_CompositeFeature>(feature());
+  return std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(feature());
 }
 
 void PartSet_OperationSketch::mousePressed(QMouseEvent* theEvent, ModuleBase_IViewer* theViewer, ModuleBase_ISelection* theSelection)
@@ -104,20 +104,20 @@ void PartSet_OperationSketch::selectionChanged(ModuleBase_ISelection* theSelecti
     // We have to select a plane before any operation
     TopoDS_Shape aShape = aPrs.shape();
     if (!aShape.IsNull()) {
-      boost::shared_ptr<GeomAPI_Dir> aDir = setSketchPlane(aShape);
+      std::shared_ptr<GeomAPI_Dir> aDir = setSketchPlane(aShape);
       flushUpdated();
       emit featureConstructed(feature(), FM_Hide);
       // If selection is not a sketcher presentation then it has to be stored as 
       // External shape
       if (feature() != aPrs.object()) {
-        //boost::shared_ptr<SketchPlugin_Sketch> aSketch = 
-        //  boost::dynamic_pointer_cast<SketchPlugin_Sketch>(feature());
+        //std::shared_ptr<SketchPlugin_Sketch> aSketch = 
+        //  std::dynamic_pointer_cast<SketchPlugin_Sketch>(feature());
         DataPtr aData = feature()->data();
         AttributeSelectionPtr aSelAttr = 
-          boost::dynamic_pointer_cast<ModelAPI_AttributeSelection>
+          std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
           (aData->attribute(SketchPlugin_Feature::EXTERNAL_ID()));
         if (aSelAttr) {
-          ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(aPrs.object());
+          ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs.object());
           if (aRes) {
             GeomShapePtr aShapePtr(new GeomAPI_Shape());
             aShapePtr->setImpl(new TopoDS_Shape(aShape));
@@ -176,16 +176,16 @@ std::list<FeaturePtr> PartSet_OperationSketch::subFeatures() const
   if (!aFeature)
     return aFeaList;
 
-  boost::shared_ptr<ModelAPI_Data> aData = aFeature->data();
+  std::shared_ptr<ModelAPI_Data> aData = aFeature->data();
   if (!aData->isValid())
     return std::list<FeaturePtr>();
-  boost::shared_ptr<ModelAPI_AttributeRefList> aRefList = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefList> aRefList = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefList>(aData->attribute(SketchPlugin_Sketch::FEATURES_ID()));
 
   std::list<ObjectPtr> aList = aRefList->list();
   std::list<ObjectPtr>::iterator aIt;
   for (aIt = aList.begin(); aIt != aList.end(); ++aIt) {
-    FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(*aIt);
+    FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*aIt);
     if (aFeature)
       aFeaList.push_back(aFeature);
   }
@@ -227,59 +227,59 @@ bool PartSet_OperationSketch::hasSketchPlane() const
   bool aHasPlane = false;
 
   if (feature()) {
-    boost::shared_ptr<ModelAPI_Data> aData = feature()->data();
+    std::shared_ptr<ModelAPI_Data> aData = feature()->data();
     AttributeDoublePtr anAttr;
-    boost::shared_ptr<GeomDataAPI_Dir> aNormal = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+    std::shared_ptr<GeomDataAPI_Dir> aNormal = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
         aData->attribute(SketchPlugin_Sketch::NORM_ID()));
     aHasPlane = aNormal && !(aNormal->x() == 0 && aNormal->y() == 0 && aNormal->z() == 0);
   }
   return aHasPlane;
 }
 
-boost::shared_ptr<GeomAPI_Dir> PartSet_OperationSketch::setSketchPlane(const TopoDS_Shape& theShape)
+std::shared_ptr<GeomAPI_Dir> PartSet_OperationSketch::setSketchPlane(const TopoDS_Shape& theShape)
 {
   if (theShape.IsNull())
-    return boost::shared_ptr<GeomAPI_Dir>();
+    return std::shared_ptr<GeomAPI_Dir>();
 
   // get selected shape
-  boost::shared_ptr<GeomAPI_Shape> aGShape(new GeomAPI_Shape);
+  std::shared_ptr<GeomAPI_Shape> aGShape(new GeomAPI_Shape);
   aGShape->setImpl(new TopoDS_Shape(theShape));
 
   // get plane parameters
-  boost::shared_ptr<GeomAPI_Pln> aPlane = GeomAlgoAPI_FaceBuilder::plane(aGShape);
+  std::shared_ptr<GeomAPI_Pln> aPlane = GeomAlgoAPI_FaceBuilder::plane(aGShape);
 
   // set plane parameters to feature
-  boost::shared_ptr<ModelAPI_Data> aData = feature()->data();
+  std::shared_ptr<ModelAPI_Data> aData = feature()->data();
   double anA, aB, aC, aD;
   aPlane->coefficients(anA, aB, aC, aD);
 
   // calculate attributes of the sketch
-  boost::shared_ptr<GeomAPI_Dir> aNormDir(new GeomAPI_Dir(anA, aB, aC));
-  boost::shared_ptr<GeomAPI_XYZ> aCoords = aNormDir->xyz();
-  boost::shared_ptr<GeomAPI_XYZ> aZero(new GeomAPI_XYZ(0, 0, 0));
+  std::shared_ptr<GeomAPI_Dir> aNormDir(new GeomAPI_Dir(anA, aB, aC));
+  std::shared_ptr<GeomAPI_XYZ> aCoords = aNormDir->xyz();
+  std::shared_ptr<GeomAPI_XYZ> aZero(new GeomAPI_XYZ(0, 0, 0));
   aCoords = aCoords->multiplied(-aD * aCoords->distance(aZero));
-  boost::shared_ptr<GeomAPI_Pnt> anOrigPnt(new GeomAPI_Pnt(aCoords));
+  std::shared_ptr<GeomAPI_Pnt> anOrigPnt(new GeomAPI_Pnt(aCoords));
   // X axis is preferable to be dirX on the sketch
   const double tol = Precision::Confusion();
   bool isX = fabs(anA - 1.0) < tol && fabs(aB) < tol && fabs(aC) < tol;
-  boost::shared_ptr<GeomAPI_Dir> aTempDir(
+  std::shared_ptr<GeomAPI_Dir> aTempDir(
       isX ? new GeomAPI_Dir(0, 1, 0) : new GeomAPI_Dir(1, 0, 0));
-  boost::shared_ptr<GeomAPI_Dir> aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir)));
-  boost::shared_ptr<GeomAPI_Dir> aXDir(new GeomAPI_Dir(aYDir->cross(aNormDir)));
+  std::shared_ptr<GeomAPI_Dir> aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir)));
+  std::shared_ptr<GeomAPI_Dir> aXDir(new GeomAPI_Dir(aYDir->cross(aNormDir)));
 
-  boost::shared_ptr<GeomDataAPI_Point> anOrigin = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       aData->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
   anOrigin->setValue(anOrigPnt);
-  boost::shared_ptr<GeomDataAPI_Dir> aNormal = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aNormal = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::NORM_ID()));
   aNormal->setValue(aNormDir);
-  boost::shared_ptr<GeomDataAPI_Dir> aDirX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aDirX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::DIRX_ID()));
   aDirX->setValue(aXDir);
-  boost::shared_ptr<GeomDataAPI_Dir> aDirY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aDirY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::DIRY_ID()));
   aDirY->setValue(aYDir);
-  boost::shared_ptr<GeomAPI_Dir> aDir = aPlane->direction();
+  std::shared_ptr<GeomAPI_Dir> aDir = aPlane->direction();
   return aDir;
 }
 
index 216b4d94d8717741ad3198be729eaa5f6d169b57..1a770e16bc8f317cba87d43f07882c9749bcb524 100644 (file)
@@ -87,7 +87,7 @@ Q_OBJECT
   /// Set the plane to the current sketch
   /// \param theShape the shape
   /// \return selected direction
-  boost::shared_ptr<GeomAPI_Dir> setSketchPlane(const TopoDS_Shape& theShape);
+  std::shared_ptr<GeomAPI_Dir> setSketchPlane(const TopoDS_Shape& theShape);
   
   /// Called on selection changed when the operation is active
   virtual void selectionChanged(ModuleBase_ISelection* theSelection);
index 1f7550403123cabec03ac0a7ad79dacf3d6a482b..310658e9b317d2f37fb77bac03014f0687e6e0ed 100644 (file)
@@ -35,17 +35,17 @@ PartSet_OperationSketchBase::~PartSet_OperationSketchBase()
 {
 }
 
-boost::shared_ptr<GeomAPI_Shape> PartSet_OperationSketchBase::preview(FeaturePtr theFeature)
+std::shared_ptr<GeomAPI_Shape> PartSet_OperationSketchBase::preview(FeaturePtr theFeature)
 {
-  boost::shared_ptr<SketchPlugin_Feature> aFeature = boost::dynamic_pointer_cast<
+  std::shared_ptr<SketchPlugin_Feature> aFeature = std::dynamic_pointer_cast<
       SketchPlugin_Feature>(theFeature);
   if (aFeature) {
     ResultPtr aRes = aFeature->firstResult();
-    ResultBodyPtr aBody = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(aRes);
+    ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aRes);
     if (aBody)
       return aBody->shape();
   }
-  return boost::shared_ptr<GeomAPI_Shape>();
+  return std::shared_ptr<GeomAPI_Shape>();
 }
 
 std::list<FeaturePtr> PartSet_OperationSketchBase::subFeatures() const
index ef3991a9a1710c0557e48c23b3f22d77d44c7830..dacfb8fd7155756f2b8ea2d4b5bf23feb3fee174 100644 (file)
@@ -56,7 +56,7 @@ Q_OBJECT
 
   /// Returns the feature preview shape
   /// \param theFeature the feature object to obtain the preview
-  static boost::shared_ptr<GeomAPI_Shape> preview(FeaturePtr theFeature);
+  static std::shared_ptr<GeomAPI_Shape> preview(FeaturePtr theFeature);
 
   /// Returns the list of the nested features
   /// \return the list of subfeatures
index bd9b248330a075112716d61061cc996b2915d210..29c5829a037ff570a181571710499251ddc27286 100644 (file)
@@ -37,7 +37,7 @@ void PartSet_TestOCC::testSelection(XGUI_Workshop* theWorkshop)
                                theWorkshop->viewer()->activeView());
     PartSet_TestOCC::changeTestLine(theWorkshop);
   }
-  boost::shared_ptr<GeomAPI_AISObject> anIO = theWorkshop->displayer()->getAISObject(myTestObject);
+  std::shared_ptr<GeomAPI_AISObject> anIO = theWorkshop->displayer()->getAISObject(myTestObject);
   if (!anIO->empty()) {
     theWorkshop->viewer()->AISContext()->MoveTo(0, 0, theWorkshop->viewer()->activeView());
     theWorkshop->viewer()->AISContext()->Select(0, 0, 2500, 2500,
@@ -132,26 +132,26 @@ void PartSet_TestOCC::createTestLine(XGUI_Workshop* theWorkshop)
 
   if (aPreviewOp) {
     // create a line
-    boost::shared_ptr<ModelAPI_Document> aDoc = ModelAPI_Session::get()->moduleDocument();
+    std::shared_ptr<ModelAPI_Document> aDoc = ModelAPI_Session::get()->moduleDocument();
     FeaturePtr aFeature = aDoc->addFeature(SketchPlugin_Line::ID());
     if (aFeature)  // TODO: generate an error if feature was not created
       aFeature->execute();
 
-    boost::shared_ptr<SketchPlugin_Feature> aSketch = boost::dynamic_pointer_cast<
+    std::shared_ptr<SketchPlugin_Feature> aSketch = std::dynamic_pointer_cast<
         SketchPlugin_Feature>(aPreviewOp->sketch());
     aSketch->addSub(aFeature);
 
     PartSet_Tools::setFeaturePoint(aFeature, 100, 100, SketchPlugin_Line::START_ID());
     PartSet_Tools::setFeaturePoint(aFeature, 150, 300, SketchPlugin_Line::END_ID());
 
-    boost::shared_ptr<GeomAPI_Shape> aPreview = PartSet_OperationSketchBase::preview(aFeature);
+    std::shared_ptr<GeomAPI_Shape> aPreview = PartSet_OperationSketchBase::preview(aFeature);
 
     XGUI_Displayer* aDisplayer = theWorkshop->displayer();
 
-    boost::shared_ptr<GeomAPI_AISObject> aPrevAIS;
-    boost::shared_ptr<SketchPlugin_Feature> aSPFeature = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomAPI_AISObject> aPrevAIS;
+    std::shared_ptr<SketchPlugin_Feature> aSPFeature = std::dynamic_pointer_cast<
         SketchPlugin_Feature>(aFeature);
-    //boost::shared_ptr<GeomAPI_AISObject> anAIS = aSPFeature->getAISObject(aPrevAIS);
+    //std::shared_ptr<GeomAPI_AISObject> anAIS = aSPFeature->getAISObject(aPrevAIS);
     //if (!anAIS->empty())
     aDisplayer->display(aFeature, false);
     //aDisplayer->redisplay(aFeature->firstResult(), anAIS, false);
@@ -168,7 +168,7 @@ void PartSet_TestOCC::createTestLine(XGUI_Workshop* theWorkshop)
      PartSet_Tools::setFeaturePoint(aFeature, 100+aDelta, 200+aDelta, SketchPlugin_Line::START_ID());
      PartSet_Tools::setFeaturePoint(aFeature, 300+aDelta, 500+aDelta, SketchPlugin_Line::END_ID());
 
-     boost::shared_ptr<GeomAPI_Shape> aPreview = PartSet_OperationSketchBase::preview(aFeature);
+     std::shared_ptr<GeomAPI_Shape> aPreview = PartSet_OperationSketchBase::preview(aFeature);
      Handle(AIS_InteractiveObject) anAIS = PartSet_Presentation::createPresentation(
      aFeature, aSketch,
      aPreview ? aPreview->impl<TopoDS_Shape>() : TopoDS_Shape(), NULL);
@@ -204,12 +204,12 @@ void PartSet_TestOCC::changeTestLine(XGUI_Workshop* theWorkshop)
   // TODO
   //PartSet_Tools::setFeaturePoint(aFeature, -100/*aDelta*/, -100/*aDelta*/, LINE_ATTR_START);
   //PartSet_Tools::setFeaturePoint(aFeature, 200/*aDelta*2*/, 200/*aDelta*2*/, LINE_ATTR_END);
-  //boost::shared_ptr<GeomAPI_Shape> aPreview = PartSet_OperationSketchBase::preview(aFeature);
+  //std::shared_ptr<GeomAPI_Shape> aPreview = PartSet_OperationSketchBase::preview(aFeature);
 
-  boost::shared_ptr<GeomAPI_AISObject> aPrevAIS;
-  boost::shared_ptr<SketchPlugin_Feature> aSPFeature = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomAPI_AISObject> aPrevAIS;
+  std::shared_ptr<SketchPlugin_Feature> aSPFeature = std::dynamic_pointer_cast<
       SketchPlugin_Feature>(aFeature);
-  //boost::shared_ptr<GeomAPI_AISObject> anAIS = aSPFeature->getAISObject(aPrevAIS);
+  //std::shared_ptr<GeomAPI_AISObject> anAIS = aSPFeature->getAISObject(aPrevAIS);
   //if (!anAIS->empty())
   theWorkshop->displayer()->display(aFeature, true);
   //  theWorkshop->displayer()->redisplay(aFeature, anAIS, true);
index 364d7c9d20e1b0985cd195a0d0ae2f46c89a6d15..c97b6c68f2b55fd192de55fdc44544f80539c36f 100644 (file)
@@ -88,14 +88,14 @@ Handle(V3d_View) theView,
     return;
 
   AttributeDoublePtr anAttr;
-  boost::shared_ptr<ModelAPI_Data> aData = theSketch->data();
+  std::shared_ptr<ModelAPI_Data> aData = theSketch->data();
 
-  boost::shared_ptr<GeomDataAPI_Point> anOrigin = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       aData->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
 
-  boost::shared_ptr<GeomDataAPI_Dir> aX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::DIRX_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> anY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> anY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::DIRY_ID()));
 
   gp_Pnt anOriginPnt(anOrigin->x(), anOrigin->y(), anOrigin->z());
@@ -112,7 +112,7 @@ Handle(V3d_View) theView,
     gp_Vec anEyeVec(EyePoint, AtPoint);
     anEyeVec.Normalize();
 
-    boost::shared_ptr<GeomDataAPI_Dir> aNormal = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+    std::shared_ptr<GeomDataAPI_Dir> aNormal = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
         aData->attribute(SketchPlugin_Sketch::NORM_ID()));
     gp_Vec aNormalVec(aNormal->x(), aNormal->y(), aNormal->z());
 
@@ -132,19 +132,19 @@ void PartSet_Tools::convertTo3D(const double theX, const double theY, FeaturePtr
   if (!theSketch)
     return;
 
-  boost::shared_ptr<ModelAPI_Data> aData = theSketch->data();
+  std::shared_ptr<ModelAPI_Data> aData = theSketch->data();
 
-  boost::shared_ptr<GeomDataAPI_Point> aC = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> aC = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       aData->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::DIRX_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::DIRY_ID()));
 
-  boost::shared_ptr<GeomAPI_XYZ> aSum = aC->pnt()->xyz()->added(aX->dir()->xyz()->multiplied(theX))
+  std::shared_ptr<GeomAPI_XYZ> aSum = aC->pnt()->xyz()->added(aX->dir()->xyz()->multiplied(theX))
       ->added(aY->dir()->xyz()->multiplied(theY));
 
-  boost::shared_ptr<GeomAPI_Pnt> aPoint = boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aSum));
+  std::shared_ptr<GeomAPI_Pnt> aPoint = std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aSum));
   thePoint = gp_Pnt(aPoint->x(), aPoint->y(), aPoint->z());
 }
 
@@ -169,7 +169,7 @@ ObjectPtr PartSet_Tools::nearestFeature(QPoint thePoint, Handle_V3d_View theView
   ObjectPtr aDeltaObject;
 
   CompositeFeaturePtr aSketch = 
-      boost::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theSketch);
+      std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theSketch);
   // 1. find it in the selected list by the selected point
   if (!aDeltaObject) {
     double aX, anY;
@@ -183,13 +183,13 @@ ObjectPtr PartSet_Tools::nearestFeature(QPoint thePoint, Handle_V3d_View theView
       if (!aPrs.object())
         continue;
       FeaturePtr aFeature = ModelAPI_Feature::feature(aPrs.object());
-      boost::shared_ptr<SketchPlugin_Feature> aSketchFeature = boost::dynamic_pointer_cast<
+      std::shared_ptr<SketchPlugin_Feature> aSketchFeature = std::dynamic_pointer_cast<
           SketchPlugin_Feature>(aFeature);
       if (!aSketchFeature || !aSketch->isSub(aSketchFeature))
         continue;
 
       double aDelta = aSketchFeature->distanceToPoint(
-          boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
+          std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
       if (aMinDelta < 0 || aMinDelta > aDelta) {
         aMinDelta = aDelta;
         // TODO aDeltaObject = aPrs.result();
@@ -210,23 +210,23 @@ ObjectPtr PartSet_Tools::nearestFeature(QPoint thePoint, Handle_V3d_View theView
   return aDeltaObject;
 }
 
-boost::shared_ptr<ModelAPI_Document> PartSet_Tools::document()
+std::shared_ptr<ModelAPI_Document> PartSet_Tools::document()
 {
   return ModelAPI_Session::get()->moduleDocument();
 }
 
-boost::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::getFeaturePoint(FeaturePtr theFeature,
+std::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::getFeaturePoint(FeaturePtr theFeature,
                                                                       double theX, double theY)
 {
-  boost::shared_ptr<GeomAPI_Pnt2d> aClickedPoint = boost::shared_ptr<GeomAPI_Pnt2d>(
+  std::shared_ptr<GeomAPI_Pnt2d> aClickedPoint = std::shared_ptr<GeomAPI_Pnt2d>(
                                                                  new GeomAPI_Pnt2d(theX, theY));
-  std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttiributes =
+  std::list<std::shared_ptr<ModelAPI_Attribute> > anAttiributes =
                                     theFeature->data()->attributes(GeomDataAPI_Point2D::type());
-  std::list<boost::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes.begin(),
+  std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes.begin(),
                                                                     aLast = anAttiributes.end();
-  boost::shared_ptr<GeomDataAPI_Point2D> aFPoint;
+  std::shared_ptr<GeomDataAPI_Point2D> aFPoint;
   for (; anIt != aLast && !aFPoint; anIt++) {
-    boost::shared_ptr<GeomDataAPI_Point2D> aCurPoint = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aCurPoint = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(*anIt);
     if (aCurPoint && aCurPoint->pnt()->distance(aClickedPoint) < Precision::Confusion())
       aFPoint = aCurPoint;
@@ -240,8 +240,8 @@ void PartSet_Tools::setFeatureValue(FeaturePtr theFeature, double theValue,
 {
   if (!theFeature)
     return;
-  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
-  AttributeDoublePtr anAttribute = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+  std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+  AttributeDoublePtr anAttribute = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
       aData->attribute(theAttribute));
   if (anAttribute)
     anAttribute->setValue(theValue);
@@ -253,8 +253,8 @@ double PartSet_Tools::featureValue(FeaturePtr theFeature, const std::string& the
   isValid = false;
   double aValue = 0;
   if (theFeature) {
-    boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
-    AttributeDoublePtr anAttribute = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+    std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+    AttributeDoublePtr anAttribute = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
         aData->attribute(theAttribute));
     if (anAttribute) {
       aValue = anAttribute->value();
@@ -271,11 +271,11 @@ FeaturePtr PartSet_Tools::feature(FeaturePtr theFeature, const std::string& theA
   if (!theFeature)
     return aFeature;
 
-  boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(theAttribute));
   if (anAttr) {
-    aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->object());
+    aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->object());
     if (!theKind.empty() && aFeature && aFeature->getKind() != theKind) {
       aFeature = FeaturePtr();
     }
@@ -284,24 +284,24 @@ FeaturePtr PartSet_Tools::feature(FeaturePtr theFeature, const std::string& theA
 }
 
 void PartSet_Tools::createConstraint(CompositeFeaturePtr theSketch,
-                                     boost::shared_ptr<GeomDataAPI_Point2D> thePoint1,
-                                     boost::shared_ptr<GeomDataAPI_Point2D> thePoint2)
+                                     std::shared_ptr<GeomDataAPI_Point2D> thePoint1,
+                                     std::shared_ptr<GeomDataAPI_Point2D> thePoint2)
 {
   FeaturePtr aFeature;
   if (theSketch) {
     aFeature = theSketch->addFeature(SketchPlugin_ConstraintCoincidence::ID());
   } else {
-    boost::shared_ptr<ModelAPI_Document> aDoc = document();
+    std::shared_ptr<ModelAPI_Document> aDoc = document();
     aFeature = aDoc->addFeature(SketchPlugin_ConstraintCoincidence::ID());
   }
 
-  boost::shared_ptr<ModelAPI_Data> aData = aFeature->data();
+  std::shared_ptr<ModelAPI_Data> aData = aFeature->data();
 
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef1 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef1 = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
   aRef1->setAttr(thePoint1);
 
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef2 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef2 = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   aRef2->setAttr(thePoint2);
 
@@ -314,32 +314,32 @@ void PartSet_Tools::setConstraints(CompositeFeaturePtr theSketch, FeaturePtr the
                                    double theClickedY)
 {
   // find a feature point by the selection mode
-  //boost::shared_ptr<GeomDataAPI_Point2D> aPoint = featurePoint(theMode);
-  boost::shared_ptr<GeomDataAPI_Point2D> aFeaturePoint = boost::dynamic_pointer_cast<
+  //std::shared_ptr<GeomDataAPI_Point2D> aPoint = featurePoint(theMode);
+  std::shared_ptr<GeomDataAPI_Point2D> aFeaturePoint = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(theFeature->data()->attribute(theAttribute));
   if (!aFeaturePoint)
     return;
 
   // get all sketch features. If the point with the given coordinates belong to any sketch feature,
   // the constraint is created between the feature point and the found sketch point
-  boost::shared_ptr<ModelAPI_Data> aData = theSketch->data();
-  boost::shared_ptr<ModelAPI_AttributeRefList> aRefList = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = theSketch->data();
+  std::shared_ptr<ModelAPI_AttributeRefList> aRefList = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefList>(aData->attribute(SketchPlugin_Sketch::FEATURES_ID()));
 
   std::list<ObjectPtr> aFeatures = aRefList->list();
   std::list<ObjectPtr>::const_iterator anIt = aFeatures.begin(), aLast = aFeatures.end();
-  std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttiributes;
-  boost::shared_ptr<GeomAPI_Pnt2d> aClickedPoint = boost::shared_ptr<GeomAPI_Pnt2d>(
+  std::list<std::shared_ptr<ModelAPI_Attribute> > anAttiributes;
+  std::shared_ptr<GeomAPI_Pnt2d> aClickedPoint = std::shared_ptr<GeomAPI_Pnt2d>(
       new GeomAPI_Pnt2d(theClickedX, theClickedY));
   for (; anIt != aLast; anIt++) {
-    FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
+    FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
     // find the given point in the feature attributes
     anAttiributes = aFeature->data()->attributes(GeomDataAPI_Point2D::type());
-    std::list<boost::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes.begin(),
+    std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes.begin(),
         aLast = anAttiributes.end();
-    boost::shared_ptr<GeomDataAPI_Point2D> aFPoint;
+    std::shared_ptr<GeomDataAPI_Point2D> aFPoint;
     for (; anIt != aLast && !aFPoint; anIt++) {
-      boost::shared_ptr<GeomDataAPI_Point2D> aCurPoint = boost::dynamic_pointer_cast<
+      std::shared_ptr<GeomDataAPI_Point2D> aCurPoint = std::dynamic_pointer_cast<
           GeomDataAPI_Point2D>(*anIt);
       if (aCurPoint && aCurPoint->pnt()->distance(aClickedPoint) < Precision::Confusion())
         aFPoint = aCurPoint;
@@ -349,37 +349,37 @@ void PartSet_Tools::setConstraints(CompositeFeaturePtr theSketch, FeaturePtr the
   }
 }
 
-boost::shared_ptr<GeomAPI_Pln> PartSet_Tools::sketchPlane(CompositeFeaturePtr theSketch)
+std::shared_ptr<GeomAPI_Pln> PartSet_Tools::sketchPlane(CompositeFeaturePtr theSketch)
 {
-  boost::shared_ptr<GeomAPI_Pln> aPlane;
+  std::shared_ptr<GeomAPI_Pln> aPlane;
   double aA, aB, aC, aD;
 
-  boost::shared_ptr<ModelAPI_Data> aData = theSketch->data();
-  boost::shared_ptr<GeomDataAPI_Point> anOrigin = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<ModelAPI_Data> aData = theSketch->data();
+  std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       aData->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aNormal = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aNormal = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       aData->attribute(SketchPlugin_Sketch::NORM_ID()));
   aA = aNormal->x();
   aB = aNormal->y();
   aC = aNormal->z();
   aD = 0;
 
-  aPlane = boost::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(aA, aB, aC, aD));
+  aPlane = std::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(aA, aB, aC, aD));
   return aPlane;
 }
 
-boost::shared_ptr<GeomAPI_Pnt> PartSet_Tools::point3D(boost::shared_ptr<GeomAPI_Pnt2d> thePoint2D,
+std::shared_ptr<GeomAPI_Pnt> PartSet_Tools::point3D(std::shared_ptr<GeomAPI_Pnt2d> thePoint2D,
                                                       CompositeFeaturePtr theSketch)
 {
-  boost::shared_ptr<GeomAPI_Pnt> aPoint;
+  std::shared_ptr<GeomAPI_Pnt> aPoint;
   if (!theSketch || !thePoint2D)
     return aPoint;
 
-  boost::shared_ptr<GeomDataAPI_Point> aC = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> aC = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       theSketch->data()->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       theSketch->data()->attribute(SketchPlugin_Sketch::DIRX_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       theSketch->data()->attribute(SketchPlugin_Sketch::DIRY_ID()));
 
   return thePoint2D->to3D(aC->pnt(), aX->dir(), aY->dir());
@@ -400,7 +400,7 @@ ResultPtr PartSet_Tools::createFixedObjectByEdge(const ModuleBase_ViewerPrs& the
     return ResultPtr();
 
   // Check that we already have such external edge
-  boost::shared_ptr<GeomAPI_Edge> aInEdge = boost::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge());
+  std::shared_ptr<GeomAPI_Edge> aInEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge());
   aInEdge->setImpl(new TopoDS_Shape(aShape));
   ResultPtr aResult = findExternalEdge(theSketch, aInEdge);
   if (aResult)
@@ -418,8 +418,8 @@ ResultPtr PartSet_Tools::createFixedObjectByEdge(const ModuleBase_ViewerPrs& the
     aMyFeature = theSketch->addFeature(SketchPlugin_Line::ID());
 
     //DataPtr aData = myFeature->data();
-    //boost::shared_ptr<GeomDataAPI_Point2D> anEndAttr = 
-    //  boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Line::END_ID()));
+    //std::shared_ptr<GeomDataAPI_Point2D> anEndAttr = 
+    //  std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Line::END_ID()));
 
     //double aX, aY;
     //gp_Pnt Pnt1 = aAdaptor.Value(aStart);
@@ -448,12 +448,12 @@ ResultPtr PartSet_Tools::createFixedObjectByEdge(const ModuleBase_ViewerPrs& the
   if (aMyFeature) {
     DataPtr aData = aMyFeature->data();
     AttributeSelectionPtr anAttr = 
-      boost::dynamic_pointer_cast<ModelAPI_AttributeSelection>
+      std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
       (aData->attribute(SketchPlugin_Feature::EXTERNAL_ID()));
 
-    ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(thePrs.object());
+    ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(thePrs.object());
     if (anAttr && aRes) {
-      boost::shared_ptr<GeomAPI_Shape> anEdge(new GeomAPI_Shape);
+      std::shared_ptr<GeomAPI_Shape> anEdge(new GeomAPI_Shape);
       anEdge->setImpl(new TopoDS_Shape(aShape));
 
       anAttr->setValue(aRes, anEdge);
@@ -481,21 +481,21 @@ bool PartSet_Tools::isContainPresentation(const QList<ModuleBase_ViewerPrs>& the
   return false;
 }
 
-ResultPtr PartSet_Tools::findExternalEdge(CompositeFeaturePtr theSketch, boost::shared_ptr<GeomAPI_Edge> theEdge)
+ResultPtr PartSet_Tools::findExternalEdge(CompositeFeaturePtr theSketch, std::shared_ptr<GeomAPI_Edge> theEdge)
 {
   for (int i = 0; i < theSketch->numberOfSubs(); i++) {
     FeaturePtr aFeature = theSketch->subFeature(i);
-    boost::shared_ptr<SketchPlugin_Feature> aSketchFea = 
-      boost::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
+    std::shared_ptr<SketchPlugin_Feature> aSketchFea = 
+      std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
     if (aSketchFea) {
       if (aSketchFea->isExternal()) {
         std::list<ResultPtr> aResults = aSketchFea->results();
         std::list<ResultPtr>::const_iterator aIt;
         for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) {
           ResultConstructionPtr aRes = 
-            boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aIt);
+            std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aIt);
           if (aRes) {
-            boost::shared_ptr<GeomAPI_Shape> aShape = aRes->shape();
+            std::shared_ptr<GeomAPI_Shape> aShape = aRes->shape();
             if (aShape) {
               if (theEdge->isEqual(aShape))
                 return aRes;
index 30838ae09f66fc9869e36d6e48c87a3d5a7421e0..5dda6eafb17e47f370de749ddbdbdd20cf98aed4 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <ModelAPI_CompositeFeature.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class Handle_V3d_View;
 class ModuleBase_ViewerPrs;
@@ -68,14 +68,14 @@ class PARTSET_EXPORT PartSet_Tools
                                   const QList<ModuleBase_ViewerPrs>& theHighlighted);
 
   /// Returns pointer to the root document.
-  static boost::shared_ptr<ModelAPI_Document> document();
+  static std::shared_ptr<ModelAPI_Document> document();
 
 
   /// Returns a point attribute of the feature by the coordinates if it is
   /// \param theFeature the feature
   /// \param theX the horizontal coordinate
   /// \param theY the vertical coordinate
-  static boost::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(FeaturePtr theFeature,
+  static std::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(FeaturePtr theFeature,
                                                                 double theX, double theY);
 
   /// \brief Save the double to the feature. If the attribute is double, it is filled.
@@ -104,8 +104,8 @@ class PARTSET_EXPORT PartSet_Tools
   /// \param thePoint1 the first point
   /// \param thePoint1 the second point
   static void createConstraint(CompositeFeaturePtr theSketch,
-                               boost::shared_ptr<GeomDataAPI_Point2D> thePoint1,
-                               boost::shared_ptr<GeomDataAPI_Point2D> thePoint2);
+                               std::shared_ptr<GeomDataAPI_Point2D> thePoint1,
+                               std::shared_ptr<GeomDataAPI_Point2D> thePoint2);
 
   /// Creates constrains of the current 
   /// \param theSketch a sketch feature
@@ -120,13 +120,13 @@ class PARTSET_EXPORT PartSet_Tools
   /// Create a sketch plane instance
   /// \param theSketch a sketch feature
   /// \return API object of geom plane
-  static boost::shared_ptr<GeomAPI_Pln> sketchPlane(CompositeFeaturePtr theSketch);
+  static std::shared_ptr<GeomAPI_Pln> sketchPlane(CompositeFeaturePtr theSketch);
 
   /// Create a point 3D on a basis of point 2D and sketch feature
   /// \param thePoint2D a point on a sketch
   /// \param theSketch a sketch feature
   /// \return API object of point 3D
-  static boost::shared_ptr<GeomAPI_Pnt> point3D(boost::shared_ptr<GeomAPI_Pnt2d> thePoint2D,
+  static std::shared_ptr<GeomAPI_Pnt> point3D(std::shared_ptr<GeomAPI_Pnt2d> thePoint2D,
                                                 CompositeFeaturePtr theSketch);
   /// Check whether there is a constraint with the feature kind given
   /// \param theKind a feature kind
@@ -150,7 +150,7 @@ class PARTSET_EXPORT PartSet_Tools
   /// \param theSketch - the sketch feature
   /// \param theEdge - the edge
   /// \return result object with external edge if it is found
-  static ResultPtr findExternalEdge(CompositeFeaturePtr theSketch, boost::shared_ptr<GeomAPI_Edge> theEdge);
+  static ResultPtr findExternalEdge(CompositeFeaturePtr theSketch, std::shared_ptr<GeomAPI_Edge> theEdge);
 
   /// Returns whether the selected presentation has a shape with the vertex type
   /// \param thePrs a selected presentation
index 8c6e8cc0ae117285373734155090805ffa58069d..f92c0e912a895a79b195896df95811709a704f39 100644 (file)
@@ -21,11 +21,11 @@ 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()->document(ModelAPI_ResultPart::DOC_REF())->value()
             == aPManager->activeDocument())
@@ -33,7 +33,7 @@ void PartSetPlugin_Duplicate::initAttributes()
     aSource.reset();
   }
   if (aSource) {
-    boost::shared_ptr<ModelAPI_Document> aCopy = aPManager->copy(
+    std::shared_ptr<ModelAPI_Document> aCopy = aPManager->copy(
         aSource->data()->document(ModelAPI_ResultPart::DOC_REF())->value(), data()->name());
     data()->refattr(ORIGIN_REF())->setObject(aSource);
   }
index 48d338267b04554fb857d5cf5d263ed87fc8a4b1..47fa360a9ee84a6163d0d966c1e26a72d5cf8574 100644 (file)
@@ -21,7 +21,7 @@ void PartSetPlugin_Part::initAttributes()
 
 void PartSetPlugin_Part::execute()
 {
-  ResultPartPtr aResult = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
+  ResultPartPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
   if (!aResult) {
     aResult = document()->createPart(data());
     setResult(aResult);
@@ -29,7 +29,7 @@ void PartSetPlugin_Part::execute()
   }
 }
 
-boost::shared_ptr<ModelAPI_Document> PartSetPlugin_Part::documentToAdd()
+std::shared_ptr<ModelAPI_Document> PartSetPlugin_Part::documentToAdd()
 {
   return ModelAPI_Session::get()->moduleDocument();
 }
index ef1dd528c15f90bb646799c430dacfbb7c7fcdf4..5a9b4202ceebd37a2f5328f3dd022fc02ce674f9 100644 (file)
@@ -41,7 +41,7 @@ class PartSetPlugin_Part : public ModelAPI_Feature
   /// Request for initialization of data model of the feature: adding all attributes
   PARTSETPLUGIN_EXPORT virtual void initAttributes();
 
-  PARTSETPLUGIN_EXPORT virtual boost::shared_ptr<ModelAPI_Document> documentToAdd();
+  PARTSETPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Document> documentToAdd();
 
   /// Returns true if this feature must be displayed in the history (top level of Part tree)
   PARTSETPLUGIN_EXPORT virtual bool isInHistory()
index d459d9753a76aa8e4bb3176279b186e2c7f3e4ac..3f2cd80fe609d6724d1c41f30247cae83bbba9db 100644 (file)
 
 void PartSetPlugin_Remove::execute()
 {
-  boost::shared_ptr<ModelAPI_Session> aPManager = ModelAPI_Session::get();
-  boost::shared_ptr<ModelAPI_Document> aRoot = aPManager->moduleDocument();
-  boost::shared_ptr<ModelAPI_Document> aCurrent;
-  boost::shared_ptr<PartSetPlugin_Part> a;
+  std::shared_ptr<ModelAPI_Session> aPManager = ModelAPI_Session::get();
+  std::shared_ptr<ModelAPI_Document> aRoot = aPManager->moduleDocument();
+  std::shared_ptr<ModelAPI_Document> aCurrent;
+  std::shared_ptr<PartSetPlugin_Part> a;
   for (int a = aRoot->size(ModelAPI_ResultPart::group()) - 1; a >= 0; a--) {
-    ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(
+    ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(
         aRoot->object(ModelAPI_ResultPart::group(), a));
     if (aPart
         && aPart->data()->document(ModelAPI_ResultPart::DOC_REF())->value()
index 7d25c48c3d10017323e923319605d9852c708817..9f717bd702ff3279625c7fc1717d464c347d3aaa 100644 (file)
@@ -41,43 +41,43 @@ void SketchPlugin_Arc::execute()
   // otherwise AIS object is used to visualize the arc's preview
   if (aSketch && isFeatureValid()) {
     // compute a circle point in 3D view
-    boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::CENTER_ID()));
     // compute the arc start point
-    boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::START_ID()));
 
-    boost::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
+    std::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
     // make a visible point
-    boost::shared_ptr<GeomAPI_Shape> aCenterPointShape = GeomAlgoAPI_PointBuilder::point(aCenter);
-    boost::shared_ptr<ModelAPI_ResultConstruction> aConstr1 = document()->createConstruction(
+    std::shared_ptr<GeomAPI_Shape> aCenterPointShape = GeomAlgoAPI_PointBuilder::point(aCenter);
+    std::shared_ptr<ModelAPI_ResultConstruction> aConstr1 = document()->createConstruction(
         data(), 0);
     aConstr1->setShape(aCenterPointShape);
     aConstr1->setIsInHistory(false);
     setResult(aConstr1, 0);
 
     // make a visible circle
-    boost::shared_ptr<GeomDataAPI_Dir> aNDir = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+    std::shared_ptr<GeomDataAPI_Dir> aNDir = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
         aSketch->data()->attribute(SketchPlugin_Sketch::NORM_ID()));
     bool aHasPlane = aNDir && !(aNDir->x() == 0 && aNDir->y() == 0 && aNDir->z() == 0);
     if (aHasPlane) {
-      boost::shared_ptr<GeomAPI_Dir> aNormal = aNDir->dir();
-      boost::shared_ptr<GeomAPI_Pnt> aStartPoint(aSketch->to3D(aStartAttr->x(), aStartAttr->y()));
+      std::shared_ptr<GeomAPI_Dir> aNormal = aNDir->dir();
+      std::shared_ptr<GeomAPI_Pnt> aStartPoint(aSketch->to3D(aStartAttr->x(), aStartAttr->y()));
 
       // compute and change the arc end point
-      boost::shared_ptr<GeomDataAPI_Point2D> anEndAttr = boost::dynamic_pointer_cast<
+      std::shared_ptr<GeomDataAPI_Point2D> anEndAttr = std::dynamic_pointer_cast<
           GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::END_ID()));
-      boost::shared_ptr<GeomAPI_Circ2d> aCircleForArc(
+      std::shared_ptr<GeomAPI_Circ2d> aCircleForArc(
           new GeomAPI_Circ2d(aCenterAttr->pnt(), aStartAttr->pnt()));
-      boost::shared_ptr<GeomAPI_Pnt2d> aProjection = aCircleForArc->project(anEndAttr->pnt());
+      std::shared_ptr<GeomAPI_Pnt2d> aProjection = aCircleForArc->project(anEndAttr->pnt());
       if (aProjection && anEndAttr->pnt()->distance(aProjection) > tolerance)
         anEndAttr->setValue(aProjection);
-      boost::shared_ptr<GeomAPI_Pnt> aEndPoint(aSketch->to3D(anEndAttr->x(), anEndAttr->y()));
+      std::shared_ptr<GeomAPI_Pnt> aEndPoint(aSketch->to3D(anEndAttr->x(), anEndAttr->y()));
 
-      boost::shared_ptr<GeomAPI_Shape> aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircleArc(
+      std::shared_ptr<GeomAPI_Shape> aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircleArc(
           aCenter, aStartPoint, aEndPoint, aNormal);
       if (aCircleShape) {
-        boost::shared_ptr<ModelAPI_ResultConstruction> aConstr2 = document()->createConstruction(
+        std::shared_ptr<ModelAPI_ResultConstruction> aConstr2 = document()->createConstruction(
             data(), 1);
         aConstr2->setShape(aCircleShape);
         aConstr2->setIsInHistory(false);
@@ -94,33 +94,33 @@ AISObjectPtr SketchPlugin_Arc::getAISObject(AISObjectPtr thePrevious)
     // if the feature is valid, the execute() method should be performed, AIS object is empty
     if (!isFeatureValid()) {
       // compute a circle point in 3D view
-      boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = boost::dynamic_pointer_cast<
+      std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
           GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::CENTER_ID()));
       if (aCenterAttr->isInitialized()) {
-        boost::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
+        std::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
 
-        boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = boost::dynamic_pointer_cast<
+        std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
             GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::START_ID()));
         if (aStartAttr->isInitialized()) {
           // make a visible circle
-          boost::shared_ptr<GeomDataAPI_Dir> aNDir = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+          std::shared_ptr<GeomDataAPI_Dir> aNDir = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
               aSketch->data()->attribute(SketchPlugin_Sketch::NORM_ID()));
           bool aHasPlane = aNDir && !(aNDir->x() == 0 && aNDir->y() == 0 && aNDir->z() == 0);
           if (aHasPlane) {
-            boost::shared_ptr<GeomAPI_Dir> aNormal = aNDir->dir();
-            boost::shared_ptr<GeomAPI_Pnt> aStartPoint(aSketch->to3D(aStartAttr->x(), aStartAttr->y()));
-            boost::shared_ptr<GeomAPI_Shape> aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircleArc(
+            std::shared_ptr<GeomAPI_Dir> aNormal = aNDir->dir();
+            std::shared_ptr<GeomAPI_Pnt> aStartPoint(aSketch->to3D(aStartAttr->x(), aStartAttr->y()));
+            std::shared_ptr<GeomAPI_Shape> aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircleArc(
                                                             aCenter, aStartPoint, aStartPoint, aNormal);
             if (aCircleShape) {
-              std::list<boost::shared_ptr<GeomAPI_Shape> > aShapes;
+              std::list<std::shared_ptr<GeomAPI_Shape> > aShapes;
               // make a visible point
-              boost::shared_ptr<GeomAPI_Shape> aCenterPointShape = GeomAlgoAPI_PointBuilder::point(aCenter);
+              std::shared_ptr<GeomAPI_Shape> aCenterPointShape = GeomAlgoAPI_PointBuilder::point(aCenter);
               aShapes.push_back(aCenterPointShape);
 
               aShapes.push_back(aCircleShape);
               if (!aShapes.empty())
               {
-                boost::shared_ptr<GeomAPI_Shape> aCompound = GeomAlgoAPI_CompoundBuilder::compound(aShapes);
+                std::shared_ptr<GeomAPI_Shape> aCompound = GeomAlgoAPI_CompoundBuilder::compound(aShapes);
                 AISObjectPtr anAIS = thePrevious;
                 if (!anAIS)
                   anAIS = AISObjectPtr(new GeomAPI_AISObject);
@@ -138,39 +138,39 @@ AISObjectPtr SketchPlugin_Arc::getAISObject(AISObjectPtr thePrevious)
 
 void SketchPlugin_Arc::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Arc::CENTER_ID()));
   aPoint1->move(theDeltaX, theDeltaY);
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Arc::START_ID()));
   aPoint2->move(theDeltaX, theDeltaY);
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint3 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint3 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Arc::END_ID()));
   aPoint3->move(theDeltaX, theDeltaY);
 }
 
-double SketchPlugin_Arc::distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+double SketchPlugin_Arc::distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
   double aDelta = 0;
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Arc::CENTER_ID()));
   aDelta = aPoint1->pnt()->distance(thePoint);
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Arc::START_ID()));
   double aDistance = aPoint2->pnt()->distance(thePoint);
   if (aDelta < aDistance)
     aDelta = aDistance;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint3 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint3 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Arc::END_ID()));
   aDistance = aPoint3->pnt()->distance(thePoint);
   if (aDelta < aDistance)
@@ -185,11 +185,11 @@ bool SketchPlugin_Arc::isFixed() {
 
 bool SketchPlugin_Arc::isFeatureValid()
 {
-  boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::CENTER_ID()));
-  boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::START_ID()));
-  boost::shared_ptr<GeomDataAPI_Point2D> anEndAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> anEndAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Arc::END_ID()));
 
   return aCenterAttr->isInitialized() && aStartAttr->isInitialized() && anEndAttr->isInitialized();
index a60774336e9f58d10779852101129d699f4e1a63..3958adbd743a464b3614b0e8df0b25e967e63a5d 100644 (file)
@@ -72,7 +72,7 @@ class SketchPlugin_Arc : public SketchPlugin_Feature, public GeomAPI_IPresentabl
 
   /// Return the distance between the feature and the point
   /// \param thePoint the point
-  virtual double distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
   /// Use plugin manager for features creation
   SketchPlugin_Arc();
index a65a6b7c6ccef3c98d1bc7a6a183b663f59625ad..209f9744a7310e9483a080a96033975dd4f91599 100644 (file)
@@ -36,37 +36,37 @@ void SketchPlugin_Circle::execute()
 {
   SketchPlugin_Sketch* aSketch = sketch();
   if (aSketch) {
-    std::list<boost::shared_ptr<GeomAPI_Shape> > aShapes;
+    std::list<std::shared_ptr<GeomAPI_Shape> > aShapes;
 
     // compute a circle point in 3D view
-    boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(CENTER_ID()));
     AttributeDoublePtr aRadiusAttr = 
-      boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(data()->attribute(RADIUS_ID()));
+      std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(data()->attribute(RADIUS_ID()));
     if (aCenterAttr->isInitialized() && aRadiusAttr->isInitialized()) {
-      boost::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
+      std::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
       //std::cout<<"Execute circle "<<aCenter->x()<<" "<<aCenter->y()<<" "<<aCenter->z()<<std::endl;
       // make a visible point
-      boost::shared_ptr<GeomAPI_Shape> aCenterPointShape = GeomAlgoAPI_PointBuilder::point(aCenter);
-      boost::shared_ptr<ModelAPI_ResultConstruction> aConstr1 = document()->createConstruction(
+      std::shared_ptr<GeomAPI_Shape> aCenterPointShape = GeomAlgoAPI_PointBuilder::point(aCenter);
+      std::shared_ptr<ModelAPI_ResultConstruction> aConstr1 = document()->createConstruction(
           data(), 0);
       aConstr1->setShape(aCenterPointShape);
       aConstr1->setIsInHistory(false);
       setResult(aConstr1, 0);
 
       // make a visible circle
-      boost::shared_ptr<GeomDataAPI_Dir> aNDir = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+      std::shared_ptr<GeomDataAPI_Dir> aNDir = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
           aSketch->data()->attribute(SketchPlugin_Sketch::NORM_ID()));
       bool aHasPlane = aNDir && !(aNDir->x() == 0 && aNDir->y() == 0 && aNDir->z() == 0);
       if (aHasPlane) {
-        boost::shared_ptr<GeomAPI_Dir> aNormal(new GeomAPI_Dir(aNDir->x(), aNDir->y(), aNDir->z()));
+        std::shared_ptr<GeomAPI_Dir> aNormal(new GeomAPI_Dir(aNDir->x(), aNDir->y(), aNDir->z()));
         // compute the circle radius
         double aRadius = aRadiusAttr->value();
 
-        boost::shared_ptr<GeomAPI_Shape> aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircle(
+        std::shared_ptr<GeomAPI_Shape> aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircle(
             aCenter, aNormal, aRadius);
         aShapes.push_back(aCircleShape);
-        boost::shared_ptr<ModelAPI_ResultConstruction> aConstr2 = document()->createConstruction(
+        std::shared_ptr<ModelAPI_ResultConstruction> aConstr2 = document()->createConstruction(
             data(), 1);
         aConstr2->setShape(aCircleShape);
         aConstr2->setIsInHistory(false);
@@ -78,20 +78,20 @@ void SketchPlugin_Circle::execute()
 
 void SketchPlugin_Circle::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(CENTER_ID()));
   aPoint1->move(theDeltaX, theDeltaY);
 }
 
-double SketchPlugin_Circle::distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+double SketchPlugin_Circle::distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = 
-    boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(CENTER_ID()));
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = 
+    std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(CENTER_ID()));
 
   return aPoint->pnt()->distance(thePoint);
 }
@@ -102,14 +102,14 @@ bool SketchPlugin_Circle::isFixed() {
 
 void SketchPlugin_Circle::attributeChanged() {
   static bool myIsUpdated = false; // to avoid infinitive cycle on attrubtes change
-  boost::shared_ptr<GeomAPI_Shape> aSelection = data()->selection(EXTERNAL_ID())->value();
+  std::shared_ptr<GeomAPI_Shape> aSelection = data()->selection(EXTERNAL_ID())->value();
   // update arguments due to the selection value
   if (aSelection && !aSelection->isNull() && aSelection->isEdge() && !myIsUpdated) {
     myIsUpdated = true;
-    boost::shared_ptr<GeomAPI_Edge> anEdge( new GeomAPI_Edge(aSelection));
-    boost::shared_ptr<GeomAPI_Circ> aCirc = anEdge->circle();
-    boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = 
-      boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(CENTER_ID()));
+    std::shared_ptr<GeomAPI_Edge> anEdge( new GeomAPI_Edge(aSelection));
+    std::shared_ptr<GeomAPI_Circ> aCirc = anEdge->circle();
+    std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = 
+      std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(CENTER_ID()));
     aCenterAttr->setValue(sketch()->to2D(aCirc->center()));
     real(RADIUS_ID())->setValue(aCirc->radius());
     myIsUpdated = false;
index 70ee0c892630546da0b394f6b79afacb0b570acd..8ceef34ebce1a521f54428ffa9a8a9e1b0c68965 100644 (file)
@@ -74,7 +74,7 @@ class SketchPlugin_Circle : public SketchPlugin_Feature  //, public GeomAPI_IPre
 
   /// Return the distance between the feature and the point
   /// \param thePoint the point
-  virtual double distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
   /// Called on change of any argument-attribute of this object
   SKETCHPLUGIN_EXPORT virtual void attributeChanged();
index f8ecab3651bc86b653991a2a36cf39d8d55a4a82..3dd0b92242df83e7874aa4a449b89c84891bee33 100644 (file)
@@ -20,7 +20,7 @@ void SketchPlugin_ConstraintBase::move(const double theDeltaX, const double theD
 }
 
 double SketchPlugin_ConstraintBase::distanceToPoint(
-    const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+    const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
   return 0;
 }
index b027076cc5ce6e8ba1e990050fa8dccc8d4c8872..7299aabe0fe3e19d216c3b05a5fe2c2363fe24d8 100644 (file)
@@ -51,7 +51,7 @@ class SketchPlugin_ConstraintBase : public SketchPlugin_Constraint, public GeomA
 
   /// Return the distance between the feature and the point
   /// \param thePoint the point
-  virtual double distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
  protected:
   /// \brief Use plugin manager for features creation
index 89faf4208935b55f52961b8be9a7534d0663aa1a..611d85a0fba3c238f4605bf9d0ca953736a02906 100644 (file)
@@ -32,8 +32,8 @@ void SketchPlugin_ConstraintDistance::initAttributes()
 //*************************************************************************************
 void SketchPlugin_ConstraintDistance::execute()
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  AttributeDoublePtr anAttrValue = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  AttributeDoublePtr anAttrValue = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
       aData->attribute(SketchPlugin_Constraint::VALUE()));
 
   if(anAttrValue->isInitialized())
@@ -51,29 +51,29 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi
   if (!sketch())
     return thePrevious;
 
-  boost::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
+  std::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
 
   DataPtr aData = data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint_A = getFeaturePoint(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint_A = getFeaturePoint(
       aData, SketchPlugin_Constraint::ENTITY_A());
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint_B = getFeaturePoint(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint_B = getFeaturePoint(
       aData, SketchPlugin_Constraint::ENTITY_B());
 
-  boost::shared_ptr<GeomAPI_Pnt2d> aPnt_A;
-  boost::shared_ptr<GeomAPI_Pnt2d> aPnt_B;
+  std::shared_ptr<GeomAPI_Pnt2d> aPnt_A;
+  std::shared_ptr<GeomAPI_Pnt2d> aPnt_B;
 
   if (aPoint_A && aPoint_B) {
     aPnt_A = aPoint_A->pnt();
     aPnt_B = aPoint_B->pnt();
   } else if (!aPoint_A && aPoint_B) {
-    boost::shared_ptr<SketchPlugin_Line> aLine = getFeatureLine(
+    std::shared_ptr<SketchPlugin_Line> aLine = getFeatureLine(
         aData, SketchPlugin_Constraint::ENTITY_A());
     if (aLine) {
       aPnt_B = aPoint_B->pnt();
       aPnt_A = getProjectionPoint(aLine, aPnt_B);
     }
   } else if (aPoint_A && !aPoint_B) {
-    boost::shared_ptr<SketchPlugin_Line> aLine = getFeatureLine(
+    std::shared_ptr<SketchPlugin_Line> aLine = getFeatureLine(
         aData, SketchPlugin_Constraint::ENTITY_B());
     if (aLine) {
       aPnt_A = aPoint_A->pnt();
@@ -83,23 +83,23 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi
   if (!aPnt_A || !aPnt_B)
     return AISObjectPtr();
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aFlyOutAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyOutAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
 
-  boost::shared_ptr<GeomAPI_Pnt> aPoint1 = sketch()->to3D(aPnt_A->x(), aPnt_A->y());
-  boost::shared_ptr<GeomAPI_Pnt> aPoint2 = sketch()->to3D(aPnt_B->x(), aPnt_B->y());
-  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = boost::shared_ptr<GeomAPI_Pnt>();
+  std::shared_ptr<GeomAPI_Pnt> aPoint1 = sketch()->to3D(aPnt_A->x(), aPnt_A->y());
+  std::shared_ptr<GeomAPI_Pnt> aPoint2 = sketch()->to3D(aPnt_B->x(), aPnt_B->y());
+  std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = std::shared_ptr<GeomAPI_Pnt>();
   if(aFlyOutAttr->isInitialized()) {
     aFlyoutPnt = sketch()->to3D(aFlyOutAttr->x(), aFlyOutAttr->y());
   } else {
-    boost::shared_ptr<GeomAPI_Lin2d> aLine = boost::shared_ptr<GeomAPI_Lin2d>(new GeomAPI_Lin2d(aPnt_A, aPnt_B));
+    std::shared_ptr<GeomAPI_Lin2d> aLine = std::shared_ptr<GeomAPI_Lin2d>(new GeomAPI_Lin2d(aPnt_A, aPnt_B));
     double aDist = aPoint1->distance(aPoint2)/5.;
-    boost::shared_ptr<GeomAPI_Pnt2d> aFPnt = aLine->shiftedLocation(aDist);
+    std::shared_ptr<GeomAPI_Pnt2d> aFPnt = aLine->shiftedLocation(aDist);
     aFlyOutAttr->setValue(aFPnt);
     aFlyoutPnt = sketch()->to3D(aFPnt->x(), aFPnt->y());
   }
   // value calculation
-  boost::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeDouble>(aData->attribute(SketchPlugin_Constraint::VALUE()));
   double aValue = aValueAttr->value();
   // Issue #196: checking the positivity of the distance constraint
@@ -123,11 +123,11 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi
 //*************************************************************************************
 void SketchPlugin_ConstraintDistance::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
   aPoint->move(theDeltaX, theDeltaY);
 }
@@ -136,23 +136,23 @@ double SketchPlugin_ConstraintDistance::calculateCurrentDistance() const
 {
   double aDistance = -1.;
 
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPointA =
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPointA =
     getFeaturePoint(aData, SketchPlugin_Constraint::ENTITY_A());
-  boost::shared_ptr<GeomDataAPI_Point2D> aPointB =
+  std::shared_ptr<GeomDataAPI_Point2D> aPointB =
       getFeaturePoint(aData, SketchPlugin_Constraint::ENTITY_B());
 
   if (aPointA && aPointB) {  // both points
     aDistance = aPointA->pnt()->distance(aPointB->pnt());
   } else {
     if (!aPointA && aPointB) {  //Line and point
-      boost::shared_ptr<SketchPlugin_Line> aLine =
+      std::shared_ptr<SketchPlugin_Line> aLine =
           getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_A());
       if (aLine) {
         aDistance = aLine->distanceToPoint(aPointB->pnt());
       }
     } else if (aPointA && !aPointB) {  // Point and line
-      boost::shared_ptr<SketchPlugin_Line> aLine =
+      std::shared_ptr<SketchPlugin_Line> aLine =
           getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_B());
       if (aLine) {
         aDistance = aLine->distanceToPoint(aPointA->pnt());
@@ -164,60 +164,60 @@ double SketchPlugin_ConstraintDistance::calculateCurrentDistance() const
 
 
 //*************************************************************************************
-boost::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
+std::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
                                                        const std::string& theAttribute)
 {
-  boost::shared_ptr<GeomDataAPI_Point2D> aPointAttr;
+  std::shared_ptr<GeomDataAPI_Point2D> aPointAttr;
 
   if (!theData)
     return aPointAttr;
 
   FeaturePtr aFeature;
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(theData->attribute(theAttribute));
   if (anAttr)
     aFeature = ModelAPI_Feature::feature(anAttr->object());
 
   if (aFeature && aFeature->getKind() == SketchPlugin_Point::ID())
-    aPointAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+    aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aFeature->data()->attribute(SketchPlugin_Point::COORD_ID()));
   else if (aFeature && aFeature->getKind() == SketchPlugin_Circle::ID())
-    aPointAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+    aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aFeature->data()->attribute(SketchPlugin_Circle::CENTER_ID()));
   else if (anAttr->attr()) {
-    aPointAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->attr());
+    aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->attr());
   }
   return aPointAttr;
 }
 
 //*************************************************************************************
-boost::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
+std::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
                                                     const std::string& theAttribute)
 {
-  boost::shared_ptr<SketchPlugin_Line> aLine;
+  std::shared_ptr<SketchPlugin_Line> aLine;
   if (!theData)
     return aLine;
 
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(theData->attribute(theAttribute));
   if (anAttr) {
     FeaturePtr aFeature = ModelAPI_Feature::feature(anAttr->object());
     if (aFeature && aFeature->getKind() == SketchPlugin_Line::ID()) {
-      aLine = boost::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
+      aLine = std::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
     }
   }
   return aLine;
 }
 
 //*************************************************************************************
-boost::shared_ptr<GeomAPI_Pnt2d> getProjectionPoint(
-    const boost::shared_ptr<SketchPlugin_Line>& theLine,
-    const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+std::shared_ptr<GeomAPI_Pnt2d> getProjectionPoint(
+    const std::shared_ptr<SketchPlugin_Line>& theLine,
+    const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = theLine->data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<ModelAPI_Data> aData = theLine->data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Line::START_ID()));
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Line::END_ID()));
 
   GeomAPI_Lin2d aLin2d(aPoint1->x(), aPoint1->y(), aPoint2->x(), aPoint2->y());
index b5981d017f24d418bcb0f0e3811f8cb07906a72e..8ac80c3139df4e41830ff70033cc6095d987cb24 100644 (file)
@@ -64,14 +64,14 @@ class SketchPlugin_ConstraintDistance : public SketchPlugin_ConstraintBase
 };
 
 /// Obtain the point object from specified constraint parameter
-boost::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
+std::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
                                                        const std::string& theAttribute);
 
-boost::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
+std::shared_ptr<SketchPlugin_Line> getFeatureLine(DataPtr theData,
                                                     const std::string& theAttribute);
 
-boost::shared_ptr<GeomAPI_Pnt2d> getProjectionPoint(
-    const boost::shared_ptr<SketchPlugin_Line>& theLine,
-    const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+std::shared_ptr<GeomAPI_Pnt2d> getProjectionPoint(
+    const std::shared_ptr<SketchPlugin_Line>& theLine,
+    const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
 #endif
index ff8a480b46ea314aad8fe37a1e8d0a78d7a5e0a8..5b3d0f05fc5e737bdef61df55ff483b47c597e7c 100644 (file)
@@ -31,19 +31,19 @@ void SketchPlugin_ConstraintLength::initAttributes()
 
 void SketchPlugin_ConstraintLength::execute()
 {
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
   FeaturePtr aFeature = ModelAPI_Feature::feature(aRef->object());
   if (aFeature) {
     // set length value
-    boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(aFeature->data()->attribute(SketchPlugin_Line::START_ID()));
-    boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(aFeature->data()->attribute(SketchPlugin_Line::END_ID()));
 
     double aLenght = aPoint1->pnt()->distance(aPoint2->pnt());
 
-    boost::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
         ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
     if(!aValueAttr->isInitialized()) {
       aValueAttr->setValue(aLenght);
@@ -56,9 +56,9 @@ AISObjectPtr SketchPlugin_ConstraintLength::getAISObject(AISObjectPtr thePreviou
   if (!sketch())
     return thePrevious;
 
-  boost::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
+  std::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
 
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
   if (!anAttr)
     return thePrevious;
@@ -66,30 +66,30 @@ AISObjectPtr SketchPlugin_ConstraintLength::getAISObject(AISObjectPtr thePreviou
   if (!aFeature || aFeature->getKind() != SketchPlugin_Line::ID())
     return thePrevious;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aFlyOutAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyOutAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(data()->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
 
   DataPtr aData = aFeature->data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aStartPoint = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aStartPoint = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Line::START_ID()));
-  boost::shared_ptr<GeomDataAPI_Point2D> anEndPoint = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> anEndPoint = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Line::END_ID()));
 
-  boost::shared_ptr<GeomAPI_Pnt> aPoint1 = sketch()->to3D(aStartPoint->x(), aStartPoint->y());
-  boost::shared_ptr<GeomAPI_Pnt> aPoint2 = sketch()->to3D(anEndPoint->x(), anEndPoint->y());
-  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = boost::shared_ptr<GeomAPI_Pnt>();
+  std::shared_ptr<GeomAPI_Pnt> aPoint1 = sketch()->to3D(aStartPoint->x(), aStartPoint->y());
+  std::shared_ptr<GeomAPI_Pnt> aPoint2 = sketch()->to3D(anEndPoint->x(), anEndPoint->y());
+  std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = std::shared_ptr<GeomAPI_Pnt>();
   if (aFlyOutAttr->isInitialized()) {
     aFlyoutPnt = sketch()->to3D(aFlyOutAttr->x(), aFlyOutAttr->y());
   } else {
-    boost::shared_ptr<GeomAPI_Lin2d> aLine = 
-      boost::shared_ptr<GeomAPI_Lin2d>(new GeomAPI_Lin2d(aStartPoint->pnt(), anEndPoint->pnt()));
+    std::shared_ptr<GeomAPI_Lin2d> aLine = 
+      std::shared_ptr<GeomAPI_Lin2d>(new GeomAPI_Lin2d(aStartPoint->pnt(), anEndPoint->pnt()));
     double aDist = aPoint1->distance(aPoint2)/5.;
-    boost::shared_ptr<GeomAPI_Pnt2d> aFPnt = aLine->shiftedLocation(aDist);
+    std::shared_ptr<GeomAPI_Pnt2d> aFPnt = aLine->shiftedLocation(aDist);
     aFlyOutAttr->setValue(aFPnt);
     aFlyoutPnt = sketch()->to3D(aFPnt->x(), aFPnt->y());
   }
   // value calculation
-  boost::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
   double aValue = aValueAttr->value();
 
@@ -106,11 +106,11 @@ AISObjectPtr SketchPlugin_ConstraintLength::getAISObject(AISObjectPtr thePreviou
 
 void SketchPlugin_ConstraintLength::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
   aPoint->move(theDeltaX, theDeltaY);
 }
index ae105caa331fbe7a061c60c441a24d19bda6aaa1..a2f50adf7941a03923ebded51601b6a1f15fd92c 100644 (file)
@@ -37,10 +37,10 @@ AISObjectPtr SketchPlugin_ConstraintParallel::getAISObject(AISObjectPtr thePrevi
   if (!sketch())
     return thePrevious;
 
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr1 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr1 = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr2 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr2 = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   if (!anAttr1 || !anAttr1->isObject() || !anAttr2 || !anAttr2->isObject())
     return thePrevious;
@@ -48,32 +48,32 @@ AISObjectPtr SketchPlugin_ConstraintParallel::getAISObject(AISObjectPtr thePrevi
   FeaturePtr aFeature = ModelAPI_Feature::feature(anAttr1->object());
   if (!aFeature)
     return thePrevious;
-  boost::shared_ptr<SketchPlugin_Line> aLine1Feature =
-      boost::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
+  std::shared_ptr<SketchPlugin_Line> aLine1Feature =
+      std::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
 
   aFeature = ModelAPI_Feature::feature(anAttr2->object());
   if (!aFeature)
     return thePrevious;
-  boost::shared_ptr<SketchPlugin_Line> aLine2Feature =
-      boost::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
+  std::shared_ptr<SketchPlugin_Line> aLine2Feature =
+      std::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
 
   if (!aLine1Feature || !aLine2Feature)
     return thePrevious;
 
-  boost::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
-  boost::shared_ptr<GeomAPI_Shape> aLine1, aLine2;
-  boost::shared_ptr<ModelAPI_ResultConstruction> aConst1 = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
+  std::shared_ptr<GeomAPI_Shape> aLine1, aLine2;
+  std::shared_ptr<ModelAPI_ResultConstruction> aConst1 = std::dynamic_pointer_cast<
       ModelAPI_ResultConstruction>(anAttr1->object());
   if (aConst1)
     aLine1 = aConst1->shape();
-  boost::shared_ptr<ModelAPI_ResultConstruction> aConst2 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_ResultConstruction> aConst2 = std::dynamic_pointer_cast<
       ModelAPI_ResultConstruction>(anAttr2->object());
   if (aConst2)
     aLine2 = aConst2->shape();
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
-  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = boost::shared_ptr<GeomAPI_Pnt>();;
+  std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = std::shared_ptr<GeomAPI_Pnt>();;
   if(aFlyoutAttr->isInitialized()) {
     aFlyoutPnt = sketch()->to3D(aFlyoutAttr->x(), aFlyoutAttr->y());
   }
@@ -92,11 +92,11 @@ AISObjectPtr SketchPlugin_ConstraintParallel::getAISObject(AISObjectPtr thePrevi
 
 void SketchPlugin_ConstraintParallel::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
   aPoint->move(theDeltaX, theDeltaY);
 }
index 31772fb16fff275e4367fbd110b14ba567be0182..e4f396ab747e2a4c43b32e0b04975fdfdd49a865 100644 (file)
@@ -36,10 +36,10 @@ AISObjectPtr SketchPlugin_ConstraintPerpendicular::getAISObject(AISObjectPtr the
   if (!sketch())
     return thePrevious;
 
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr1 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr1 = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr2 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr2 = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   if (!anAttr1 || !anAttr1->isObject() || !anAttr2 || !anAttr2->isObject())
     return thePrevious;
@@ -47,25 +47,25 @@ AISObjectPtr SketchPlugin_ConstraintPerpendicular::getAISObject(AISObjectPtr the
   FeaturePtr aFeature = ModelAPI_Feature::feature(anAttr1->object());
   if (!aFeature)
     return thePrevious;
-  boost::shared_ptr<SketchPlugin_Line> aLine1Feature =
-      boost::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
+  std::shared_ptr<SketchPlugin_Line> aLine1Feature =
+      std::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
 
   aFeature = ModelAPI_Feature::feature(anAttr2->object());
   if (!aFeature)
     return thePrevious;
-  boost::shared_ptr<SketchPlugin_Line> aLine2Feature =
-      boost::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
+  std::shared_ptr<SketchPlugin_Line> aLine2Feature =
+      std::dynamic_pointer_cast<SketchPlugin_Line>(aFeature);
 
   if (!aLine1Feature || !aLine2Feature)
     return thePrevious;
 
-  boost::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
-  boost::shared_ptr<GeomAPI_Shape> aLine1, aLine2;
-  boost::shared_ptr<ModelAPI_ResultConstruction> aConst1 = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
+  std::shared_ptr<GeomAPI_Shape> aLine1, aLine2;
+  std::shared_ptr<ModelAPI_ResultConstruction> aConst1 = std::dynamic_pointer_cast<
       ModelAPI_ResultConstruction>(anAttr1->object());
   if (aConst1)
     aLine1 = aConst1->shape();
-  boost::shared_ptr<ModelAPI_ResultConstruction> aConst2 = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_ResultConstruction> aConst2 = std::dynamic_pointer_cast<
       ModelAPI_ResultConstruction>(anAttr2->object());
   if (aConst2)
     aLine2 = aConst2->shape();
index fd429a544a241b97a99501dc5dd58b63a0e2938b..8da7b3606dff6ab3091151729d82614c455d7ded 100644 (file)
@@ -34,26 +34,26 @@ void SketchPlugin_ConstraintRadius::initAttributes()
 
 void SketchPlugin_ConstraintRadius::execute()
 {
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
   FeaturePtr aFeature = ModelAPI_Feature::feature(aRef->object());
   if (aFeature) {
     double aRadius = 0;
-    boost::shared_ptr<ModelAPI_Data> aData = aFeature->data();
+    std::shared_ptr<ModelAPI_Data> aData = aFeature->data();
     if (aFeature->getKind() == SketchPlugin_Circle::ID()) {
-      AttributeDoublePtr anAttribute = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+      AttributeDoublePtr anAttribute = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
           aData->attribute(SketchPlugin_Circle::RADIUS_ID()));
       if (anAttribute)
         aRadius = anAttribute->value();
     } else if (aFeature->getKind() == SketchPlugin_Arc::ID()) {
-      boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = boost::dynamic_pointer_cast<
+      std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
           GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Arc::CENTER_ID()));
-      boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = boost::dynamic_pointer_cast<
+      std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
           GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Arc::START_ID()));
       if (aCenterAttr && aStartAttr)
         aRadius = aCenterAttr->pnt()->distance(aStartAttr->pnt());
     }
-    boost::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
         ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
     if(!aValueAttr->isInitialized()) {
       aValueAttr->setValue(aRadius);
@@ -66,8 +66,8 @@ AISObjectPtr SketchPlugin_ConstraintRadius::getAISObject(AISObjectPtr thePreviou
   if (!sketch())
     return thePrevious;
 
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
   if (!anAttr)
     return thePrevious;
@@ -77,53 +77,53 @@ AISObjectPtr SketchPlugin_ConstraintRadius::getAISObject(AISObjectPtr thePreviou
     return thePrevious;
 
   // Flyout point
-  boost::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
-  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt;
+  std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt;
   if (aFlyoutAttr->isInitialized()) {
     aFlyoutPnt = sketch()->to3D(aFlyoutAttr->x(), aFlyoutAttr->y());
   } 
 
   // Prepare a circle
   aData = aFeature->data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr;
+  std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr;
   double aRadius;
   if (aKind == SketchPlugin_Circle::ID()) {
-    aCenterAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+    aCenterAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aData->attribute(SketchPlugin_Circle::CENTER_ID()));
-    AttributeDoublePtr aCircRadius = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+    AttributeDoublePtr aCircRadius = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
         aData->attribute(SketchPlugin_Circle::RADIUS_ID()));
     aRadius = aCircRadius->value();
     if (!aFlyoutPnt) {
       double aShift = aRadius * 1.1;
-      boost::shared_ptr<GeomAPI_Pnt2d> aPnt = aCenterAttr->pnt();
-      boost::shared_ptr<GeomAPI_Pnt2d> aFPnt = 
-        boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aPnt->x() + aShift, aPnt->y() + aShift));
+      std::shared_ptr<GeomAPI_Pnt2d> aPnt = aCenterAttr->pnt();
+      std::shared_ptr<GeomAPI_Pnt2d> aFPnt = 
+        std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aPnt->x() + aShift, aPnt->y() + aShift));
       aFlyoutAttr->setValue(aFPnt);
       aFlyoutPnt = sketch()->to3D(aFPnt->x(), aFPnt->y());
     }
   } else if (aKind == SketchPlugin_Arc::ID()) {
-    aCenterAttr = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+    aCenterAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aData->attribute(SketchPlugin_Arc::CENTER_ID()));
-    boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Arc::START_ID()));
     aRadius = aCenterAttr->pnt()->distance(aStartAttr->pnt());
     if (!aFlyoutPnt) {
-      boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = boost::dynamic_pointer_cast<
+      std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Arc::START_ID()));      
       aFlyoutAttr->setValue(aStartAttr->pnt());
       aFlyoutPnt = sketch()->to3D(aStartAttr->pnt()->x(), aStartAttr->pnt()->y());
     }
   }
 
-  boost::shared_ptr<GeomAPI_Pnt> aCenter = sketch()->to3D(aCenterAttr->x(), aCenterAttr->y());
-  boost::shared_ptr<GeomDataAPI_Dir> aNDir = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomAPI_Pnt> aCenter = sketch()->to3D(aCenterAttr->x(), aCenterAttr->y());
+  std::shared_ptr<GeomDataAPI_Dir> aNDir = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       sketch()->data()->attribute(SketchPlugin_Sketch::NORM_ID()));
-  boost::shared_ptr<GeomAPI_Dir> aNormal = aNDir->dir();
-  boost::shared_ptr<GeomAPI_Circ> aCircle(new GeomAPI_Circ(aCenter, aNormal, aRadius));
+  std::shared_ptr<GeomAPI_Dir> aNormal = aNDir->dir();
+  std::shared_ptr<GeomAPI_Circ> aCircle(new GeomAPI_Circ(aCenter, aNormal, aRadius));
 
   // Value
-  boost::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeDouble>(aData->attribute(SketchPlugin_Constraint::VALUE()));
   double aValue = aRadius;
   if (aValueAttr && aValueAttr->isInitialized())
@@ -142,11 +142,11 @@ AISObjectPtr SketchPlugin_ConstraintRadius::getAISObject(AISObjectPtr thePreviou
 
 void SketchPlugin_ConstraintRadius::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
   FeaturePtr aFeature = ModelAPI_Feature::feature(aRef->object());
   if (!aFeature)
@@ -156,21 +156,21 @@ void SketchPlugin_ConstraintRadius::move(double theDeltaX, double theDeltaY)
     aCenterAttrName = SketchPlugin_Circle::CENTER_ID();
   else if (aFeature->getKind() == SketchPlugin_Arc::ID())
     aCenterAttrName = SketchPlugin_Arc::CENTER_ID();
-  boost::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aFeature->data()->attribute(aCenterAttrName));
-  boost::shared_ptr<GeomAPI_Pnt2d> aCenter = aCenterAttr->pnt();
+  std::shared_ptr<GeomAPI_Pnt2d> aCenter = aCenterAttr->pnt();
 
   // The specified delta applied on the circle curve, 
   // so it will be scaled due to distance between flyout and center points
-  boost::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
-  boost::shared_ptr<GeomAPI_Pnt2d> aFlyout = aFlyoutAttr->pnt();
+  std::shared_ptr<GeomAPI_Pnt2d> aFlyout = aFlyoutAttr->pnt();
 
-  boost::shared_ptr<ModelAPI_AttributeDouble> aRadius = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeDouble> aRadius = std::dynamic_pointer_cast<
       ModelAPI_AttributeDouble>(aData->attribute(SketchPlugin_Constraint::VALUE()));
   double aScale = aFlyout->distance(aCenter) / aRadius->value();
 
-  boost::shared_ptr<GeomAPI_Circ2d> aCircle(new GeomAPI_Circ2d(aCenter, aFlyout));
+  std::shared_ptr<GeomAPI_Circ2d> aCircle(new GeomAPI_Circ2d(aCenter, aFlyout));
   aFlyout->setX(aFlyout->x() + aScale * theDeltaX);
   aFlyout->setY(aFlyout->y() + aScale * theDeltaY);
   aFlyout = aCircle->project(aFlyout);
index 847ecfc86238c86c59afe562b3d7b1adb2151727..7653eb59ba4575ff1c2ebd1edd754a5f724ae22a 100644 (file)
@@ -28,28 +28,28 @@ AISObjectPtr SketchPlugin_ConstraintRigid::getAISObject(AISObjectPtr thePrevious
   if (!sketch())
     return thePrevious;
 
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
   if (!anAttr /*|| !anAttr->isObject()*/)
     return thePrevious;
 
-  boost::shared_ptr<GeomAPI_Shape> aShape;
+  std::shared_ptr<GeomAPI_Shape> aShape;
 
   if (anAttr->isObject()) {
-    boost::shared_ptr<ModelAPI_ResultConstruction> aConst;
-    aConst = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(anAttr->object());
+    std::shared_ptr<ModelAPI_ResultConstruction> aConst;
+    aConst = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(anAttr->object());
 
     if (!aConst) 
       return thePrevious;
     aShape = aConst->shape();
   }
   else {
-    boost::shared_ptr<GeomDataAPI_Point2D> aPointAttr =
-                             boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->attr());
+    std::shared_ptr<GeomDataAPI_Point2D> aPointAttr =
+                             std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->attr());
     if (!aPointAttr)
       return thePrevious;
-    boost::shared_ptr<GeomAPI_Pnt> aPoint(sketch()->to3D(aPointAttr->x(), aPointAttr->y()));
+    std::shared_ptr<GeomAPI_Pnt> aPoint(sketch()->to3D(aPointAttr->x(), aPointAttr->y()));
     aShape = GeomAlgoAPI_PointBuilder::point(aPoint);
   }
 
@@ -57,7 +57,7 @@ AISObjectPtr SketchPlugin_ConstraintRigid::getAISObject(AISObjectPtr thePrevious
   if (!anAIS)
     anAIS = AISObjectPtr(new GeomAPI_AISObject);
 
-  boost::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
+  std::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
   anAIS->createFixed(aShape, aPlane);
 
   // Set color from preferences
index 2d46d8ca14e2bb79a1c3a29564ba528bd59b1edb..42c5956b85da8181c408d3b2659c72a7bf5b2830 100644 (file)
@@ -18,8 +18,8 @@ SketchPlugin_Sketch* SketchPlugin_Feature::sketch()
     const std::set<AttributePtr>& aBackRefs = data()->refsToMe();
     std::set<AttributePtr>::const_iterator aBackRef = aBackRefs.begin();
     for(; aBackRef != aBackRefs.end(); aBackRef++) {
-      boost::shared_ptr<SketchPlugin_Sketch> aSketch = 
-        boost::dynamic_pointer_cast<SketchPlugin_Sketch>((*aBackRef)->owner());
+      std::shared_ptr<SketchPlugin_Sketch> aSketch = 
+        std::dynamic_pointer_cast<SketchPlugin_Sketch>((*aBackRef)->owner());
       if (aSketch) {
         mySketch = aSketch.get();
         break;
@@ -29,13 +29,13 @@ SketchPlugin_Sketch* SketchPlugin_Feature::sketch()
   return mySketch;
 }
 
-AISObjectPtr SketchPlugin_Feature::simpleAISObject(boost::shared_ptr<ModelAPI_Result> theRes,
+AISObjectPtr SketchPlugin_Feature::simpleAISObject(std::shared_ptr<ModelAPI_Result> theRes,
                                                    AISObjectPtr thePrevious)
 {
-  boost::shared_ptr<ModelAPI_ResultConstruction> aConstr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_ResultConstruction> aConstr = std::dynamic_pointer_cast<
       ModelAPI_ResultConstruction>(theRes);
 
-  boost::shared_ptr<GeomAPI_Shape> aPreview;
+  std::shared_ptr<GeomAPI_Shape> aPreview;
   if (aConstr)
     aPreview = aConstr->shape();
 
index 2f4c3aaf17fd94aba30aaf0180fa38cfe00a25f2..5bd3814b4fbbb01649f651bbad4749da5ee7f61a 100644 (file)
@@ -24,7 +24,7 @@ class SketchPlugin_Feature : public ModelAPI_Feature
 {
  public:
   /// Simple creation of interactive object by the result of the object
-  static AISObjectPtr simpleAISObject(boost::shared_ptr<ModelAPI_Result> theRes,
+  static AISObjectPtr simpleAISObject(std::shared_ptr<ModelAPI_Result> theRes,
                                       AISObjectPtr thePrevious);
 
   /// Reference to the external edge or vertex as a AttributeSelection
@@ -47,7 +47,7 @@ class SketchPlugin_Feature : public ModelAPI_Feature
 
   /// Return the distance between the feature and the point
   /// \param thePoint the point
-  virtual double distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) = 0;
+  virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) = 0;
 
   /// Construction result is allways recomuted on the fly
   SKETCHPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
@@ -77,7 +77,7 @@ protected:
   friend class SketchPlugin_Sketch;
 
  private:
-  boost::shared_ptr<GeomAPI_Shape> myPreview;  ///< the preview shape
+  std::shared_ptr<GeomAPI_Shape> myPreview;  ///< the preview shape
   SketchPlugin_Sketch* mySketch;  /// sketch that contains this feature
 };
 
index 501478a32d77ffb80452128daa62cf759bf9fa14..2cba979ce710164a078d324ea93bf8139ee9fe8f 100644 (file)
@@ -36,20 +36,20 @@ void SketchPlugin_Line::execute()
   SketchPlugin_Sketch* aSketch = sketch();
   if (aSketch) {
     // compute a start point in 3D view
-    boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(START_ID()));
     // compute an end point in 3D view
-    boost::shared_ptr<GeomDataAPI_Point2D> anEndAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<GeomDataAPI_Point2D> anEndAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(END_ID()));
     if (aStartAttr->isInitialized() && anEndAttr->isInitialized()) {
-      boost::shared_ptr<GeomAPI_Pnt> aStart(aSketch->to3D(aStartAttr->x(), aStartAttr->y()));
-      boost::shared_ptr<GeomAPI_Pnt> anEnd(aSketch->to3D(anEndAttr->x(), anEndAttr->y()));
+      std::shared_ptr<GeomAPI_Pnt> aStart(aSketch->to3D(aStartAttr->x(), aStartAttr->y()));
+      std::shared_ptr<GeomAPI_Pnt> anEnd(aSketch->to3D(anEndAttr->x(), anEndAttr->y()));
       //std::cout<<"Execute line "<<aStart->x()<<" "<<aStart->y()<<" "<<aStart->z()<<" - "
       //  <<anEnd->x()<<" "<<anEnd->y()<<" "<<anEnd->z()<<std::endl;
       // make linear edge
-      boost::shared_ptr<GeomAPI_Edge> anEdge = GeomAlgoAPI_EdgeBuilder::line(aStart, anEnd);
+      std::shared_ptr<GeomAPI_Edge> anEdge = GeomAlgoAPI_EdgeBuilder::line(aStart, anEnd);
       // store the result
-      boost::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(
+      std::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(
           data());
       aConstr->setShape(anEdge);
       aConstr->setIsInHistory(false);
@@ -60,33 +60,33 @@ void SketchPlugin_Line::execute()
 
 void SketchPlugin_Line::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>
     (aData->attribute(START_ID()));
   aPoint1->move(theDeltaX, theDeltaY);
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>
     (aData->attribute(END_ID()));
   aPoint2->move(theDeltaX, theDeltaY);
 }
 
-double SketchPlugin_Line::distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+double SketchPlugin_Line::distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
   double aDelta = 0;
 
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = 
-    boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(START_ID()));
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2 = 
-    boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(END_ID()));
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = 
+    std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(START_ID()));
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = 
+    std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(END_ID()));
 
   GeomAPI_Lin2d aLin2d(aPoint1->x(), aPoint1->y(), aPoint2->x(), aPoint2->y());
 
   if (false/*projection*/) {  // TODO: if it has not been necessary, remove this block
-    boost::shared_ptr<GeomAPI_Pnt2d> aResult = aLin2d.project(thePoint);
+    std::shared_ptr<GeomAPI_Pnt2d> aResult = aLin2d.project(thePoint);
     aDelta = aResult->distance(thePoint);
   } else {  // distance
     aDelta = aLin2d.distance(thePoint);
@@ -101,16 +101,16 @@ bool SketchPlugin_Line::isFixed() {
 
 void SketchPlugin_Line::attributeChanged() {
   static bool myIsUpdated = false; // to avoid infinitive cycle on attrubtes change
-  boost::shared_ptr<GeomAPI_Shape> aSelection = data()->selection(EXTERNAL_ID())->value();
+  std::shared_ptr<GeomAPI_Shape> aSelection = data()->selection(EXTERNAL_ID())->value();
    // update arguments due to the selection value
   if (aSelection && !aSelection->isNull() && aSelection->isEdge() && !myIsUpdated) {
     myIsUpdated = true;
-    boost::shared_ptr<GeomAPI_Edge> anEdge( new GeomAPI_Edge(aSelection));
-    boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr = 
-      boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(START_ID()));
+    std::shared_ptr<GeomAPI_Edge> anEdge( new GeomAPI_Edge(aSelection));
+    std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = 
+      std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(START_ID()));
     aStartAttr->setValue(sketch()->to2D(anEdge->firstPoint()));
-    boost::shared_ptr<GeomDataAPI_Point2D> anEndAttr = 
-      boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(END_ID()));
+    std::shared_ptr<GeomDataAPI_Point2D> anEndAttr = 
+      std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(END_ID()));
     anEndAttr->setValue(sketch()->to2D(anEdge->lastPoint()));
     myIsUpdated = false;
   }
index 3943eafd3608869a6f708539e8f61b19ac82c085..a9e3e606cc6b931e6b9f097603dabaf873886d57 100644 (file)
@@ -65,7 +65,7 @@ class SketchPlugin_Line : public SketchPlugin_Feature
 
   /// Return the distance between the feature and the point
   /// \param thePoint the point
-  virtual double distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
   /// Called on change of any argument-attribute of this object
   SKETCHPLUGIN_EXPORT virtual void attributeChanged();
index 7cbdb647cc521533ec783ba3a192e52553b1b1d6..cd862a6adbd46ccac051ffca6eea0b5b02500994 100644 (file)
@@ -34,13 +34,13 @@ void SketchPlugin_Point::execute()
   SketchPlugin_Sketch* aSketch = sketch();
   if (aSketch) {
     // compute a point in 3D view
-    boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
-        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+    std::shared_ptr<GeomDataAPI_Point2D> aPoint =
+        std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
             data()->attribute(SketchPlugin_Point::COORD_ID()));
-    boost::shared_ptr<GeomAPI_Pnt> aPoint3D(aSketch->to3D(aPoint->x(), aPoint->y()));
+    std::shared_ptr<GeomAPI_Pnt> aPoint3D(aSketch->to3D(aPoint->x(), aPoint->y()));
     // make a visible point
-    boost::shared_ptr<GeomAPI_Shape> aPointShape = GeomAlgoAPI_PointBuilder::point(aPoint3D);
-    boost::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(data());
+    std::shared_ptr<GeomAPI_Shape> aPointShape = GeomAlgoAPI_PointBuilder::point(aPoint3D);
+    std::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(data());
     aConstr->setShape(aPointShape);
     aConstr->setIsInHistory(false);
     setResult(aConstr);
@@ -49,19 +49,19 @@ void SketchPlugin_Point::execute()
 
 void SketchPlugin_Point::move(double theDeltaX, double theDeltaY)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<ModelAPI_Data> aData = data();
   if (!aData->isValid())
     return;
 
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Point::COORD_ID()));
   aPoint1->move(theDeltaX, theDeltaY);
 }
 
-double SketchPlugin_Point::distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+double SketchPlugin_Point::distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
 {
-  boost::shared_ptr<ModelAPI_Data> aData = data();
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+  std::shared_ptr<ModelAPI_Data> aData = data();
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Point::COORD_ID()));
 
   return aPoint->pnt()->distance(thePoint);
index 48415b18ccf83a6b3592aa9c226b6b83c6f8dcb9..50eb4591db845e1524e7e03cfec4c638a9a9416c 100644 (file)
@@ -58,7 +58,7 @@ class SketchPlugin_Point : public SketchPlugin_Feature
 
   /// Return the distance between the feature and the point
   /// \param thePoint the point
-  virtual double distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+  virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
   /// Use plugin manager for features creation
   SketchPlugin_Point();
index 0e39fcb0349631b93175cafb88c913c7ea4440e9..043f45a0dac3c02f5d6085358c97e8f2c42ac97f 100644 (file)
@@ -10,7 +10,7 @@
 
 ResultPtr result(const ObjectPtr theObject)
 {
-  return boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+  return std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
 }
 
 bool SketchPlugin_ResultPointValidator::isValid(const ObjectPtr theObject) const
@@ -18,7 +18,7 @@ bool SketchPlugin_ResultPointValidator::isValid(const ObjectPtr theObject) const
   ResultPtr aResult = result(theObject);
   if (!aResult)
     return false;
-  boost::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
+  std::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
   return aShape && aShape->isVertex();
 }
 
@@ -27,7 +27,7 @@ bool SketchPlugin_ResultLineValidator::isValid(const ObjectPtr theObject) const
   ResultPtr aResult = result(theObject);
   if (!aResult)
     return false;
-  boost::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
+  std::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
   return aShape && aShape->isEdge() && GeomAPI_Curve(aShape).isLine();
 }
 
@@ -36,6 +36,6 @@ bool SketchPlugin_ResultArcValidator::isValid(const ObjectPtr theObject) const
   ResultPtr aResult = result(theObject);
   if (!aResult)
     return false;
-  boost::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
+  std::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
   return aShape && aShape->isEdge() && GeomAPI_Curve(aShape).isCircle();
 }
index e1ac62b0c8c03519117e1aa950f11469dff472d9..4902305a8b34bb67ee8a530db671d0106ca67a9c 100644 (file)
@@ -28,7 +28,7 @@
 #include <SketchPlugin_Sketch.h>
 #include <SketchPlugin_Feature.h>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 
 #include <math.h>
 #include <vector>
@@ -56,16 +56,16 @@ void SketchPlugin_Sketch::execute()
 {
   if (!data()->isValid())
     return;
-  boost::shared_ptr<ModelAPI_AttributeRefList> aRefList = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefList> aRefList = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefList>(data()->attribute(SketchPlugin_Sketch::FEATURES_ID()));
 
-  boost::shared_ptr<GeomDataAPI_Point> anOrigin = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       data()->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aDirX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aDirX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::DIRX_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aDirY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aDirY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::DIRY_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aNorm = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aNorm = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::NORM_ID()));
 
   std::list<ObjectPtr> aFeatures = aRefList->list();
@@ -73,10 +73,10 @@ void SketchPlugin_Sketch::execute()
     return;
 
   std::list<ObjectPtr>::const_iterator anIt = aFeatures.begin(), aLast = aFeatures.end();
-  boost::shared_ptr<SketchPlugin_Feature> aFeature;
-  std::list<boost::shared_ptr<GeomAPI_Shape> > aFeaturesPreview;
+  std::shared_ptr<SketchPlugin_Feature> aFeature;
+  std::list<std::shared_ptr<GeomAPI_Shape> > aFeaturesPreview;
   for (; anIt != aLast; anIt++) {
-    aFeature = boost::dynamic_pointer_cast<SketchPlugin_Feature>(*anIt);
+    aFeature = std::dynamic_pointer_cast<SketchPlugin_Feature>(*anIt);
     if (aFeature) {
       if (!aFeature->sketch()) // on load document the back references are missed
         aFeature->setSketch(this);
@@ -86,13 +86,13 @@ void SketchPlugin_Sketch::execute()
           continue;
       }
 
-      const std::list<boost::shared_ptr<ModelAPI_Result> >& aRes = aFeature->results();
-      std::list<boost::shared_ptr<ModelAPI_Result> >::const_iterator aResIter = aRes.cbegin();
+      const std::list<std::shared_ptr<ModelAPI_Result> >& aRes = aFeature->results();
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aResIter = aRes.cbegin();
       for (; aResIter != aRes.cend(); aResIter++) {
-        boost::shared_ptr<ModelAPI_ResultConstruction> aConstr = boost::dynamic_pointer_cast<
+        std::shared_ptr<ModelAPI_ResultConstruction> aConstr = std::dynamic_pointer_cast<
             ModelAPI_ResultConstruction>(*aResIter);
         if (aConstr) {
-          boost::shared_ptr<GeomAPI_Shape> aShape = aConstr->shape();
+          std::shared_ptr<GeomAPI_Shape> aShape = aConstr->shape();
           if (aShape)
             aFeaturesPreview.push_back(aShape);
         }
@@ -104,8 +104,8 @@ void SketchPlugin_Sketch::execute()
     return;
 
   // Collect all edges as one big wire
-  boost::shared_ptr<GeomAPI_PlanarEdges> aBigWire(new GeomAPI_PlanarEdges);
-  std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator aShapeIt = aFeaturesPreview.begin();
+  std::shared_ptr<GeomAPI_PlanarEdges> aBigWire(new GeomAPI_PlanarEdges);
+  std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator aShapeIt = aFeaturesPreview.begin();
   for (; aShapeIt != aFeaturesPreview.end(); ++aShapeIt) {
     aBigWire->addEdge(*aShapeIt);
   }
@@ -116,16 +116,16 @@ void SketchPlugin_Sketch::execute()
 
 //  GeomAlgoAPI_SketchBuilder::createFaces(anOrigin->pnt(), aDirX->dir(), aDirY->dir(), aNorm->dir(),
 //                                         aFeaturesPreview, aLoops, aWires);
-  boost::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(data());
+  std::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(data());
   aConstr->setShape(aBigWire);
   setResult(aConstr);
 }
 
-boost::shared_ptr<ModelAPI_Feature> SketchPlugin_Sketch::addFeature(std::string theID)
+std::shared_ptr<ModelAPI_Feature> SketchPlugin_Sketch::addFeature(std::string theID)
 {
-  boost::shared_ptr<ModelAPI_Feature> aNew = document()->addFeature(theID);
+  std::shared_ptr<ModelAPI_Feature> aNew = document()->addFeature(theID);
   if (aNew) {
-    boost::dynamic_pointer_cast<SketchPlugin_Feature>(aNew)->setSketch(this);
+    std::dynamic_pointer_cast<SketchPlugin_Feature>(aNew)->setSketch(this);
     data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->append(aNew);
   }
   return aNew;
@@ -136,10 +136,10 @@ int SketchPlugin_Sketch::numberOfSubs() const
   return data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->size();
 }
 
-boost::shared_ptr<ModelAPI_Feature> SketchPlugin_Sketch::subFeature(const int theIndex) const
+std::shared_ptr<ModelAPI_Feature> SketchPlugin_Sketch::subFeature(const int theIndex) const
 {
   ObjectPtr anObj = data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->object(theIndex);
-  return boost::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
+  return std::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
 }
 
 int SketchPlugin_Sketch::subFeatureId(const int theIndex) const
@@ -150,9 +150,9 @@ int SketchPlugin_Sketch::subFeatureId(const int theIndex) const
 bool SketchPlugin_Sketch::isSub(ObjectPtr theObject) const
 {
   // check is this feature of result
-  FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
+  FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
   if (!aFeature) {
-    ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+    ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
     if (aRes)
       aFeature = document()->feature(aRes);
   }
@@ -166,29 +166,29 @@ bool SketchPlugin_Sketch::isSub(ObjectPtr theObject) const
   return false;
 }
 
-boost::shared_ptr<GeomAPI_Pnt> SketchPlugin_Sketch::to3D(const double theX, const double theY)
+std::shared_ptr<GeomAPI_Pnt> SketchPlugin_Sketch::to3D(const double theX, const double theY)
 {
-  boost::shared_ptr<GeomDataAPI_Point> aC = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> aC = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       data()->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::DIRX_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::DIRY_ID()));
 
-  boost::shared_ptr<GeomAPI_XYZ> aSum = aC->pnt()->xyz()->added(aX->dir()->xyz()->multiplied(theX))
+  std::shared_ptr<GeomAPI_XYZ> aSum = aC->pnt()->xyz()->added(aX->dir()->xyz()->multiplied(theX))
       ->added(aY->dir()->xyz()->multiplied(theY));
 
-  return boost::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aSum));
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aSum));
 }
 
-boost::shared_ptr<GeomAPI_Pnt2d> SketchPlugin_Sketch::to2D(
-  const boost::shared_ptr<GeomAPI_Pnt>& thePnt)
+std::shared_ptr<GeomAPI_Pnt2d> SketchPlugin_Sketch::to2D(
+  const std::shared_ptr<GeomAPI_Pnt>& thePnt)
 {
-  boost::shared_ptr<GeomDataAPI_Point> aC = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> aC = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       data()->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::DIRX_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::DIRY_ID()));
   return thePnt->to2D(aC->pnt(), aX->dir(), aY->dir());
 }
@@ -196,50 +196,50 @@ boost::shared_ptr<GeomAPI_Pnt2d> SketchPlugin_Sketch::to2D(
 
 bool SketchPlugin_Sketch::isPlaneSet()
 {
-  boost::shared_ptr<GeomDataAPI_Dir> aNormal = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aNormal = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::NORM_ID()));
 
   return aNormal && !(aNormal->x() == 0 && aNormal->y() == 0 && aNormal->z() == 0);
 }
 
-boost::shared_ptr<GeomAPI_Pln> SketchPlugin_Sketch::plane()
+std::shared_ptr<GeomAPI_Pln> SketchPlugin_Sketch::plane()
 {
-  boost::shared_ptr<GeomDataAPI_Point> anOrigin = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       data()->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
-  boost::shared_ptr<GeomDataAPI_Dir> aNorm = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aNorm = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::NORM_ID()));
 
   if (!anOrigin || !aNorm)
-    return boost::shared_ptr<GeomAPI_Pln>();
+    return std::shared_ptr<GeomAPI_Pln>();
 
-  return boost::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(anOrigin->pnt(), aNorm->dir()));
+  return std::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(anOrigin->pnt(), aNorm->dir()));
 }
 
 void addPlane(double theX, double theY, double theZ,
-              std::list<boost::shared_ptr<GeomAPI_Shape> >& theShapes)
+              std::list<std::shared_ptr<GeomAPI_Shape> >& theShapes)
 {
-  boost::shared_ptr<GeomAPI_Pnt> anOrigin(new GeomAPI_Pnt(0, 0, 0));
-  boost::shared_ptr<GeomAPI_Dir> aNormal(new GeomAPI_Dir(theX, theY, theZ));
+  std::shared_ptr<GeomAPI_Pnt> anOrigin(new GeomAPI_Pnt(0, 0, 0));
+  std::shared_ptr<GeomAPI_Dir> aNormal(new GeomAPI_Dir(theX, theY, theZ));
   double aSize = Config_PropManager::integer("Sketch planes", "Size of planes", PLANE_SIZE);
-  boost::shared_ptr<GeomAPI_Shape> aFace = GeomAlgoAPI_FaceBuilder::square(anOrigin, aNormal,
+  std::shared_ptr<GeomAPI_Shape> aFace = GeomAlgoAPI_FaceBuilder::square(anOrigin, aNormal,
                                                                            aSize);
   theShapes.push_back(aFace);
 }
 
 AISObjectPtr SketchPlugin_Sketch::getAISObject(AISObjectPtr thePrevious)
 {
-  boost::shared_ptr<GeomDataAPI_Dir> aNorm = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+  std::shared_ptr<GeomDataAPI_Dir> aNorm = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
       data()->attribute(SketchPlugin_Sketch::NORM_ID()));
 
   if (!aNorm || (aNorm->x() == 0 && aNorm->y() == 0 && aNorm->z() == 0)) {
     AISObjectPtr aAIS = thePrevious;
     if (!aAIS) {
-      std::list<boost::shared_ptr<GeomAPI_Shape> > aFaces;
+      std::list<std::shared_ptr<GeomAPI_Shape> > aFaces;
 
       addPlane(1, 0, 0, aFaces);  // YZ plane
       addPlane(0, 1, 0, aFaces);  // XZ plane
       addPlane(0, 0, 1, aFaces);  // XY plane
-      boost::shared_ptr<GeomAPI_Shape> aCompound = GeomAlgoAPI_CompoundBuilder::compound(aFaces);
+      std::shared_ptr<GeomAPI_Shape> aCompound = GeomAlgoAPI_CompoundBuilder::compound(aFaces);
       aAIS = AISObjectPtr(new GeomAPI_AISObject());
       aAIS->createShape(aCompound);
 
@@ -257,12 +257,12 @@ AISObjectPtr SketchPlugin_Sketch::getAISObject(AISObjectPtr thePrevious)
 
 void SketchPlugin_Sketch::erase()
 {
-  boost::shared_ptr<ModelAPI_AttributeRefList> aRefList = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefList> aRefList = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefList>(data()->attribute(SketchPlugin_Sketch::FEATURES_ID()));
   std::list<ObjectPtr> aFeatures = aRefList->list();
   std::list<ObjectPtr>::const_iterator anIt = aFeatures.begin();
   for (; anIt != aFeatures.end(); anIt++) {
-    FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
+    FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
     if (aFeature) {
        // subs are referenced from sketch, but must be removed for sure, so not checkings
       document()->removeFeature(aFeature, false);
@@ -274,44 +274,44 @@ void SketchPlugin_Sketch::erase()
 void SketchPlugin_Sketch::attributeChanged() {
   static bool kIsUpdated = false; // to avoid infinitive cycle on attrubtes change
   static bool kIsAttrChanged = false;
-  boost::shared_ptr<GeomAPI_Shape> aSelection = 
+  std::shared_ptr<GeomAPI_Shape> aSelection = 
     data()->selection(SketchPlugin_Feature::EXTERNAL_ID())->value();
   if (aSelection && !kIsUpdated) { // update arguments due to the selection value
     kIsUpdated = true;
     // update the sketch plane
-    boost::shared_ptr<GeomAPI_Pln> aPlane = GeomAlgoAPI_FaceBuilder::plane(aSelection);
+    std::shared_ptr<GeomAPI_Pln> aPlane = GeomAlgoAPI_FaceBuilder::plane(aSelection);
     if (aPlane) {
       double anA, aB, aC, aD;
       aPlane->coefficients(anA, aB, aC, aD);
 
       // calculate attributes of the sketch
-      boost::shared_ptr<GeomAPI_Dir> aNormDir(new GeomAPI_Dir(anA, aB, aC));
-      boost::shared_ptr<GeomAPI_XYZ> aCoords = aNormDir->xyz();
-      boost::shared_ptr<GeomAPI_XYZ> aZero(new GeomAPI_XYZ(0, 0, 0));
+      std::shared_ptr<GeomAPI_Dir> aNormDir(new GeomAPI_Dir(anA, aB, aC));
+      std::shared_ptr<GeomAPI_XYZ> aCoords = aNormDir->xyz();
+      std::shared_ptr<GeomAPI_XYZ> aZero(new GeomAPI_XYZ(0, 0, 0));
       aCoords = aCoords->multiplied(-aD * aCoords->distance(aZero));
-      boost::shared_ptr<GeomAPI_Pnt> anOrigPnt(new GeomAPI_Pnt(aCoords));
+      std::shared_ptr<GeomAPI_Pnt> anOrigPnt(new GeomAPI_Pnt(aCoords));
       // X axis is preferable to be dirX on the sketch
       static const double tol = 1.e-7;
       bool isX = fabs(anA - 1.0) < tol && fabs(aB) < tol && fabs(aC) < tol;
-      boost::shared_ptr<GeomAPI_Dir> aTempDir(
+      std::shared_ptr<GeomAPI_Dir> aTempDir(
         isX ? new GeomAPI_Dir(0, 1, 0) : new GeomAPI_Dir(1, 0, 0));
-      boost::shared_ptr<GeomAPI_Dir> aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir)));
-      boost::shared_ptr<GeomAPI_Dir> aXDir(new GeomAPI_Dir(aYDir->cross(aNormDir)));
+      std::shared_ptr<GeomAPI_Dir> aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir)));
+      std::shared_ptr<GeomAPI_Dir> aXDir(new GeomAPI_Dir(aYDir->cross(aNormDir)));
 
       kIsAttrChanged = false; // track the attributes were really changed during the plane update
-      boost::shared_ptr<GeomDataAPI_Point> anOrigin = boost::dynamic_pointer_cast
+      std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast
         <GeomDataAPI_Point>(data()->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
       anOrigin->setValue(anOrigPnt);
-      boost::shared_ptr<GeomDataAPI_Dir> aNormal = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+      std::shared_ptr<GeomDataAPI_Dir> aNormal = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
         data()->attribute(SketchPlugin_Sketch::NORM_ID()));
       aNormal->setValue(aNormDir);
-      boost::shared_ptr<GeomDataAPI_Dir> aDirX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+      std::shared_ptr<GeomDataAPI_Dir> aDirX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
         data()->attribute(SketchPlugin_Sketch::DIRX_ID()));
       aDirX->setValue(aXDir);
-      boost::shared_ptr<GeomDataAPI_Dir> aDirY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(
+      std::shared_ptr<GeomDataAPI_Dir> aDirY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
         data()->attribute(SketchPlugin_Sketch::DIRY_ID()));
       aDirY->setValue(aYDir);
-      boost::shared_ptr<GeomAPI_Dir> aDir = aPlane->direction();
+      std::shared_ptr<GeomAPI_Dir> aDir = aPlane->direction();
 
       if (kIsAttrChanged) {
         /* now it is in updater
@@ -319,8 +319,8 @@ void SketchPlugin_Sketch::attributeChanged() {
         ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
         list<ObjectPtr> aSubs = data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->list();
         for(list<ObjectPtr>::iterator aSubIt = aSubs.begin(); aSubIt != aSubs.end(); aSubIt++) {
-          boost::shared_ptr<SketchPlugin_Feature> aFeature = 
-            boost::dynamic_pointer_cast<SketchPlugin_Feature>(*aSubIt);
+          std::shared_ptr<SketchPlugin_Feature> aFeature = 
+            std::dynamic_pointer_cast<SketchPlugin_Feature>(*aSubIt);
           if (aFeature && aFactory->validate(aFeature)) {
             aFeature->execute();
           }
index 6a07b55c9038696881c6c1d43ae52c78804bb9f2..c4802d48324df9f3962893c047eee3eb4122ca0c 100644 (file)
@@ -88,14 +88,14 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_IPr
 
   /// Return the distance between the feature and the point
   /// \param thePoint the point
-  virtual double distanceToPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint)
+  virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
   {
     return 0;
   }
   ;
 
   /// Converts a 2D sketch space point into point in 3D space
-  SKETCHPLUGIN_EXPORT boost::shared_ptr<GeomAPI_Pnt> to3D(const double theX, const double theY);
+  SKETCHPLUGIN_EXPORT std::shared_ptr<GeomAPI_Pnt> to3D(const double theX, const double theY);
 
   /// Returns true if this feature must be displayed in the history (top level of Part tree)
   SKETCHPLUGIN_EXPORT virtual bool isInHistory()
@@ -107,20 +107,20 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_IPr
   SketchPlugin_Sketch();
 
   /// Returns the basis plane for the sketch
-  boost::shared_ptr<GeomAPI_Pln> plane();
+  std::shared_ptr<GeomAPI_Pln> plane();
 
   virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
 
   /// removes also all sub-sketch elements
   SKETCHPLUGIN_EXPORT virtual void erase();
 
-  SKETCHPLUGIN_EXPORT virtual boost::shared_ptr<ModelAPI_Feature> addFeature(std::string theID);
+  SKETCHPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Feature> addFeature(std::string theID);
 
   /// Returns the number of sub-elements
   SKETCHPLUGIN_EXPORT virtual int numberOfSubs() const;
 
   /// Returns the sub-feature by zero-base index
-  SKETCHPLUGIN_EXPORT virtual boost::shared_ptr<ModelAPI_Feature> 
+  SKETCHPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Feature> 
     subFeature(const int theIndex) const;
 
   /// Returns the sub-feature unique identifier in this composite feature by zero-base index
@@ -133,7 +133,7 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_IPr
   SKETCHPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
 
   /// Returns the point projected into the sketch plane
-  boost::shared_ptr<GeomAPI_Pnt2d> to2D(const boost::shared_ptr<GeomAPI_Pnt>& thePnt);
+  std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& thePnt);
 
   SKETCHPLUGIN_EXPORT virtual void attributeChanged();
 protected:
@@ -143,7 +143,7 @@ protected:
   /// \param theZ the Z normal value
   /// \param theShapes the list of result shapes
   //void addPlane(double theX, double theY, double theZ,
-  //              std::list<boost::shared_ptr<GeomAPI_Shape> >& theShapes) const;
+  //              std::list<std::shared_ptr<GeomAPI_Shape> >& theShapes) const;
 
   /// Checks whether the plane is set in the sketch.
   /// \returns the boolean state
index 822ddaf6ceb365cb404720053783280fb16a25d7..ce58a0b3b54f6350815dfd7f825fc60ab935096a 100644 (file)
@@ -27,7 +27,7 @@ bool SketchPlugin_DistanceAttrValidator::isValid(const FeaturePtr& theFeature,
     return true;
 
   // If it is a line then we have to check that first attribute id not a line
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint = getFeaturePoint(theFeature->data(), aParamA);
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint = getFeaturePoint(theFeature->data(), aParamA);
   if (aPoint)
     return true;
   return false;
@@ -36,11 +36,11 @@ bool SketchPlugin_DistanceAttrValidator::isValid(const FeaturePtr& theFeature,
 bool SketchPlugin_DistanceAttrValidator::isValid(
   const AttributePtr& theAttribute, const std::list<std::string>& theArguments ) const
 {
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
-    boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+    std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
   if (anAttr) {
     const ObjectPtr& anObj = theAttribute->owner();
-    const FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
+    const FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
     return isValid(aFeature, theArguments, anAttr->object());
   }
   return true; // it may be not reference attribute, in this case, it is OK
@@ -50,13 +50,13 @@ bool SketchPlugin_DifferentObjectsValidator::isValid(const FeaturePtr& theFeatur
                                                  const std::list<std::string>& theArguments,
                                                  const ObjectPtr& theObject) const
 {
-  std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttrs = 
+  std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
     theFeature->data()->attributes(ModelAPI_AttributeRefAttr::type());
-  std::list<boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
+  std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
   for(; anAttr != anAttrs.end(); anAttr++) {
     if (*anAttr) {
-      boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = 
-        boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttr);
+      std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = 
+        std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttr);
       // check the object is already presented
       if (aRef->isObject() && aRef->object() == theObject)
         return false;
@@ -68,19 +68,19 @@ bool SketchPlugin_DifferentObjectsValidator::isValid(const FeaturePtr& theFeatur
 bool SketchPlugin_DifferentObjectsValidator::isValid(
   const AttributePtr& theAttribute, const std::list<std::string>& theArguments ) const
 {
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anOrigAttr = 
-    boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anOrigAttr = 
+    std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
   if (anOrigAttr && anOrigAttr->isObject()) {
     const ObjectPtr& anObj = theAttribute->owner();
-    const FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
+    const FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
 
-    std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttrs = 
+    std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
       aFeature->data()->attributes(ModelAPI_AttributeRefAttr::type());
-    std::list<boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
+    std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
     for(; anAttr != anAttrs.end(); anAttr++) {
       if (*anAttr && *anAttr != theAttribute) {
-        boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = 
-          boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttr);
+        std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = 
+          std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttr);
         // check the object is already presented
         if (aRef->isObject() && aRef->object() == anOrigAttr->object())
           return false;
@@ -93,13 +93,13 @@ bool SketchPlugin_DifferentObjectsValidator::isValid(
 bool SketchPlugin_DifferentObjectsValidator::isValid(const FeaturePtr& theFeature,
   const std::list<std::string>& theArguments, const AttributePtr& theAttribute) const
 {
-  std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttrs = 
+  std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
     theFeature->data()->attributes(ModelAPI_AttributeRefAttr::type());
-  std::list<boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
+  std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
   for(; anAttr != anAttrs.end(); anAttr++) {
     if (*anAttr) {
-      boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = 
-        boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttr);
+      std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = 
+        std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttr);
       // check the object is already presented
       if (!aRef->isObject() && aRef->attr() == theAttribute)
         return false;
index 6d4fdee3330506efff1dc38bb4618042a4428e81..caccc5223b1303460ed3fd6dd265e4cd728c4c9c 100644 (file)
@@ -40,17 +40,17 @@ enum AttrType
 };
 
 /// Calculate type of the attribute
-static AttrType typeOfAttribute(boost::shared_ptr<ModelAPI_Attribute> theAttribute);
+static AttrType typeOfAttribute(std::shared_ptr<ModelAPI_Attribute> theAttribute);
 
 SketchSolver_Constraint::SketchSolver_Constraint()
-    : myConstraint(boost::shared_ptr<SketchPlugin_Constraint>()),
+    : myConstraint(std::shared_ptr<SketchPlugin_Constraint>()),
       myType(SLVS_C_UNKNOWN),
       myAttributesList()
 {
 }
 
 SketchSolver_Constraint::SketchSolver_Constraint(
-    boost::shared_ptr<SketchPlugin_Constraint> theConstraint)
+    std::shared_ptr<SketchPlugin_Constraint> theConstraint)
     : myConstraint(theConstraint),
       myAttributesList()
 {
@@ -58,7 +58,7 @@ SketchSolver_Constraint::SketchSolver_Constraint(
 }
 
 const int& SketchSolver_Constraint::getType(
-    boost::shared_ptr<SketchPlugin_Constraint> theConstraint)
+    std::shared_ptr<SketchPlugin_Constraint> theConstraint)
 {
   myType = SLVS_C_UNKNOWN;
   if (!theConstraint)
@@ -81,7 +81,7 @@ const int& SketchSolver_Constraint::getType(
     int aPt2d = 0;  // bit-mapped field, each bit indicates whether the attribute is 2D point
     int aPt3d = 0;  // bit-mapped field, the same information for 3D points
     for (unsigned int indAttr = 0; indAttr < CONSTRAINT_ATTR_SIZE; indAttr++) {
-      boost::shared_ptr<ModelAPI_Attribute> anAttr = 
+      std::shared_ptr<ModelAPI_Attribute> anAttr = 
           aConstrData->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr));
       if (!anAttr)
         continue;
@@ -112,7 +112,7 @@ const int& SketchSolver_Constraint::getType(
     int aNbPoints = 0;
     int aNbEntities = 0;
     for (unsigned int indAttr = 0; indAttr < CONSTRAINT_ATTR_SIZE; indAttr++) {
-      boost::shared_ptr<ModelAPI_Attribute> anAttr = 
+      std::shared_ptr<ModelAPI_Attribute> anAttr = 
           aConstrData->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr));
       switch (typeOfAttribute(anAttr)) {
         case POINT2D:
@@ -138,7 +138,7 @@ const int& SketchSolver_Constraint::getType(
   if (aConstraintKind.compare(SketchPlugin_ConstraintLength::ID()) == 0) {
     int aNbLines = 0;
     for (unsigned int indAttr = 0; indAttr < CONSTRAINT_ATTR_SIZE; indAttr++) {
-      boost::shared_ptr<ModelAPI_Attribute> anAttr = 
+      std::shared_ptr<ModelAPI_Attribute> anAttr = 
           aConstrData->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr));
       if (typeOfAttribute(anAttr) == LINE)
         myAttributesList[aNbLines++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr);
@@ -154,7 +154,7 @@ const int& SketchSolver_Constraint::getType(
   if (isParallel || isPerpendicular) {
     int aNbEntities = 2;  // lines in SolveSpace constraints should start from SketchPlugin_Constraint::ENTITY_C() attribute
     for (unsigned int indAttr = 0; indAttr < CONSTRAINT_ATTR_SIZE; indAttr++) {
-      boost::shared_ptr<ModelAPI_Attribute> anAttr = 
+      std::shared_ptr<ModelAPI_Attribute> anAttr = 
           aConstrData->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr));
       if (typeOfAttribute(anAttr) == LINE)
         myAttributesList[aNbEntities++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr);
@@ -168,7 +168,7 @@ const int& SketchSolver_Constraint::getType(
   if (aConstraintKind.compare(SketchPlugin_ConstraintRadius::ID()) == 0) {
     int aNbEntities = 2;  // lines in SolveSpace constraints should started from SketchPlugin_Constraint::ENTITY_C() attribute
     for (unsigned int indAttr = 0; indAttr < CONSTRAINT_ATTR_SIZE; indAttr++) {
-      boost::shared_ptr<ModelAPI_Attribute> anAttr = 
+      std::shared_ptr<ModelAPI_Attribute> anAttr = 
           aConstrData->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr));
       AttrType aType = typeOfAttribute(anAttr);
       if (aType == CIRCLE || aType == ARC)
@@ -184,7 +184,7 @@ const int& SketchSolver_Constraint::getType(
     // Verify that only one entity is filled
     int aNbAttrs = 0;
     for (unsigned int indAttr = 0; indAttr < CONSTRAINT_ATTR_SIZE; indAttr++) {
-      boost::shared_ptr<ModelAPI_Attribute> anAttr = 
+      std::shared_ptr<ModelAPI_Attribute> anAttr = 
           aConstrData->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr));
       AttrType aType = typeOfAttribute(anAttr);
       if (aType != UNKNOWN)
@@ -201,15 +201,15 @@ const int& SketchSolver_Constraint::getType(
 }
 
 // ================= Auxiliary functions ==============================
-AttrType typeOfAttribute(boost::shared_ptr<ModelAPI_Attribute> theAttribute)
+AttrType typeOfAttribute(std::shared_ptr<ModelAPI_Attribute> theAttribute)
 {
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> anAttrRef = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttrRef = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(theAttribute);
   if (!anAttrRef)
     return UNKNOWN;
 
   if (anAttrRef->isObject()) {
-    ResultConstructionPtr aRC = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
+    ResultConstructionPtr aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
         anAttrRef->object());
     if (!aRC || !aRC->shape())
       return UNKNOWN;
@@ -217,7 +217,7 @@ AttrType typeOfAttribute(boost::shared_ptr<ModelAPI_Attribute> theAttribute)
     if (aRC->shape()->isVertex())
       return POINT3D;
     else if (aRC->shape()->isEdge()) {
-      boost::shared_ptr<GeomAPI_Edge> anEdge = boost::dynamic_pointer_cast<GeomAPI_Edge>(
+      std::shared_ptr<GeomAPI_Edge> anEdge = std::dynamic_pointer_cast<GeomAPI_Edge>(
           aRC->shape());
       if (anEdge->isLine())
         return LINE;
index 0d20edd38b121b3805f0ac5cb0950d16a8935fdb..4caa73b49bcc9ec0598383d34513ab35780f40e6 100644 (file)
@@ -20,14 +20,14 @@ class SketchSolver_Constraint
 {
  public:
   SketchSolver_Constraint();
-  SketchSolver_Constraint(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
+  SketchSolver_Constraint(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
 
   /** \brief Compute constraint type according to SolveSpace identifiers
    *         and verify that constraint parameters are correct
    *  \param[in]  theConstraint constraint which type should be determined
    *  \return identifier of constraint type or SLVS_C_UNKNOWN if the type is wrong
    */
-  const int& getType(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
+  const int& getType(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
   /// \brief Returns the type of myConstraint member
   inline const int& getType() const
   {
@@ -41,7 +41,7 @@ class SketchSolver_Constraint
   }
 
  private:
-  boost::shared_ptr<SketchPlugin_Constraint> myConstraint;
+  std::shared_ptr<SketchPlugin_Constraint> myConstraint;
   int myType;
   std::vector<std::string> myAttributesList;
 };
index 2eb18737cdfe15ad5f210365252870dea2db3df9..050c262b53cf04746afce0a2d9eae8c5ddde9cb8 100644 (file)
@@ -68,7 +68,7 @@ static int Search(const uint32_t& theEntityID, const std::vector<T>& theEntities
 // ========================================================
 
 SketchSolver_ConstraintGroup::SketchSolver_ConstraintGroup(
-    boost::shared_ptr<ModelAPI_CompositeFeature> theWorkplane)
+    std::shared_ptr<ModelAPI_CompositeFeature> theWorkplane)
     : myID(++myGroupIndexer),
       myParamMaxID(0),
       myEntityMaxID(0),
@@ -116,7 +116,7 @@ SketchSolver_ConstraintGroup::~SketchSolver_ConstraintGroup()
 //  Purpose:  verify the group is based on the given workplane
 // ============================================================================
 bool SketchSolver_ConstraintGroup::isBaseWorkplane(
-    boost::shared_ptr<ModelAPI_CompositeFeature> theWorkplane) const
+    std::shared_ptr<ModelAPI_CompositeFeature> theWorkplane) const
 {
   return theWorkplane == mySketch;
 }
@@ -127,7 +127,7 @@ bool SketchSolver_ConstraintGroup::isBaseWorkplane(
 //  Purpose:  verify are there any entities in the group used by given constraint
 // ============================================================================
 bool SketchSolver_ConstraintGroup::isInteract(
-    boost::shared_ptr<SketchPlugin_Feature> theFeature) const
+    std::shared_ptr<SketchPlugin_Feature> theFeature) const
 {
   // Check the group is empty
   if (isEmpty())
@@ -136,37 +136,37 @@ bool SketchSolver_ConstraintGroup::isInteract(
   // Check if the feature is already in the group
   if (myEntityFeatMap.find(theFeature) != myEntityFeatMap.end())
     return true;
-  boost::shared_ptr<SketchPlugin_Constraint> aConstr =
-      boost::dynamic_pointer_cast<SketchPlugin_Constraint>(theFeature);
+  std::shared_ptr<SketchPlugin_Constraint> aConstr =
+      std::dynamic_pointer_cast<SketchPlugin_Constraint>(theFeature);
   if (aConstr && myConstraintMap.find(aConstr) != myConstraintMap.end())
     return true;
 
   // Go through the attributes and verify if some of them already in the group
-  std::list<boost::shared_ptr<ModelAPI_Attribute>> 
+  std::list<std::shared_ptr<ModelAPI_Attribute>> 
       anAttrList = theFeature->data()->attributes(std::string());
-  std::list<boost::shared_ptr<ModelAPI_Attribute>>::const_iterator
+  std::list<std::shared_ptr<ModelAPI_Attribute>>::const_iterator
       anAttrIter = anAttrList.begin();
   for ( ; anAttrIter != anAttrList.end(); anAttrIter++) {
-    boost::shared_ptr<ModelAPI_AttributeRefAttr> aCAttrRef =
-        boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttrIter);
+    std::shared_ptr<ModelAPI_AttributeRefAttr> aCAttrRef =
+        std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttrIter);
     if (!aCAttrRef || !aCAttrRef->isObject()) {
-      boost::shared_ptr<ModelAPI_Attribute> anAttr = 
+      std::shared_ptr<ModelAPI_Attribute> anAttr = 
           aCAttrRef ? aCAttrRef->attr() : *anAttrIter;
       if (myEntityAttrMap.find(anAttr) != myEntityAttrMap.end())
         return true;
     } else {
-      ResultConstructionPtr aRC = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
+      ResultConstructionPtr aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
           aCAttrRef->object());
       if (!aRC)
         continue;
-      boost::shared_ptr<ModelAPI_Document> aDoc = aRC->document();
+      std::shared_ptr<ModelAPI_Document> aDoc = aRC->document();
       FeaturePtr aFeature = aDoc->feature(aRC);
       if (myEntityFeatMap.find(aFeature) != myEntityFeatMap.end())
         return true;
       // search attributes of a feature to be parameters of constraint
-      std::list<boost::shared_ptr<ModelAPI_Attribute> > aFeatAttrList =
+      std::list<std::shared_ptr<ModelAPI_Attribute> > aFeatAttrList =
           aFeature->data()->attributes(std::string());
-      std::list<boost::shared_ptr<ModelAPI_Attribute> >::const_iterator aFAIter = aFeatAttrList
+      std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator aFAIter = aFeatAttrList
           .begin();
       for (; aFAIter != aFeatAttrList.end(); aFAIter++)
         if (myEntityAttrMap.find(*aFAIter) != myEntityAttrMap.end())
@@ -191,18 +191,18 @@ void SketchSolver_ConstraintGroup::checkConstraintConsistence(Slvs_Constraint& t
     // point coordinates
     int aPtPos = Search(theConstraint.ptA, myEntities);
     int aPtParamPos = Search(myEntities[aPtPos].param[0], myParams);
-    boost::shared_ptr<GeomAPI_XY> aPoint(
+    std::shared_ptr<GeomAPI_XY> aPoint(
         new GeomAPI_XY(myParams[aPtParamPos].val, myParams[aPtParamPos + 1].val));
 
     // line coordinates
     int aLnPos = Search(theConstraint.entityA, myEntities);
     aPtPos = Search(myEntities[aLnPos].point[0], myEntities);
     aPtParamPos = Search(myEntities[aPtPos].param[0], myParams);
-    boost::shared_ptr<GeomAPI_XY> aStart(
+    std::shared_ptr<GeomAPI_XY> aStart(
         new GeomAPI_XY(-myParams[aPtParamPos].val, -myParams[aPtParamPos + 1].val));
     aPtPos = Search(myEntities[aLnPos].point[1], myEntities);
     aPtParamPos = Search(myEntities[aPtPos].param[0], myParams);
-    boost::shared_ptr<GeomAPI_XY> aEnd(
+    std::shared_ptr<GeomAPI_XY> aEnd(
         new GeomAPI_XY(myParams[aPtParamPos].val, myParams[aPtParamPos + 1].val));
 
     aEnd = aEnd->added(aStart);
@@ -218,7 +218,7 @@ void SketchSolver_ConstraintGroup::checkConstraintConsistence(Slvs_Constraint& t
 //  Purpose:  create/update the constraint in the group
 // ============================================================================
 bool SketchSolver_ConstraintGroup::changeConstraint(
-    boost::shared_ptr<SketchPlugin_Constraint> theConstraint)
+    std::shared_ptr<SketchPlugin_Constraint> theConstraint)
 {
   // There is no workplane yet, something wrong
   if (myWorkplane.h == SLVS_E_UNKNOWN)
@@ -245,7 +245,7 @@ bool SketchSolver_ConstraintGroup::changeConstraint(
 
   // Create constraint parameters
   double aDistance = 0.0;  // scalar value of the constraint
-  AttributeDoublePtr aDistAttr = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+  AttributeDoublePtr aDistAttr = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
       theConstraint->data()->attribute(SketchPlugin_Constraint::VALUE()));
   if (aDistAttr) {
     aDistance = aDistAttr->value();
@@ -267,7 +267,7 @@ bool SketchSolver_ConstraintGroup::changeConstraint(
   Slvs_hEntity aConstrEnt[CONSTRAINT_ATTR_SIZE];  // parameters of the constraint
   for (unsigned int indAttr = 0; indAttr < CONSTRAINT_ATTR_SIZE; indAttr++) {
     aConstrEnt[indAttr] = SLVS_E_UNKNOWN;
-    boost::shared_ptr<ModelAPI_AttributeRefAttr> aConstrAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<ModelAPI_AttributeRefAttr> aConstrAttr = std::dynamic_pointer_cast<
         ModelAPI_AttributeRefAttr>(
         theConstraint->data()->attribute(aConstraintAttributes[indAttr]));
     if (!aConstrAttr)
@@ -276,11 +276,11 @@ bool SketchSolver_ConstraintGroup::changeConstraint(
     // Convert the object of the attribute to the feature
     FeaturePtr aFeature;
     if (aConstrAttr->isObject() && aConstrAttr->object()) {
-      ResultConstructionPtr aRC = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
+      ResultConstructionPtr aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
           aConstrAttr->object());
       if (!aRC)
         continue;
-      boost::shared_ptr<ModelAPI_Document> aDoc = aRC->document();
+      std::shared_ptr<ModelAPI_Document> aDoc = aRC->document();
       aFeature = aDoc->feature(aRC);
     }
 
@@ -396,7 +396,7 @@ bool SketchSolver_ConstraintGroup::changeConstraint(
 //  Purpose:  create/update the "Rigid" constraint in the group
 // ============================================================================
 bool SketchSolver_ConstraintGroup::changeRigidConstraint(
-    boost::shared_ptr<SketchPlugin_Constraint> theConstraint)
+    std::shared_ptr<SketchPlugin_Constraint> theConstraint)
 {
   // Search this constraint in the current group to update it
   ConstraintMap::const_iterator aConstrMapIter = myConstraintMap.find(theConstraint);
@@ -415,7 +415,7 @@ bool SketchSolver_ConstraintGroup::changeRigidConstraint(
   const std::vector<std::string>& aConstraintAttributes = aConstraint.getAttributes();
 
   Slvs_hEntity aConstrEnt = SLVS_E_UNKNOWN;
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aConstrAttr = boost::dynamic_pointer_cast<
+  std::shared_ptr<ModelAPI_AttributeRefAttr> aConstrAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(
       theConstraint->data()->attribute(aConstraintAttributes[0]));
   if (!aConstrAttr)
@@ -424,11 +424,11 @@ bool SketchSolver_ConstraintGroup::changeRigidConstraint(
   // Convert the object of the attribute to the feature
   FeaturePtr aFeature;
   if (aConstrAttr->isObject() && aConstrAttr->object()) {
-    ResultConstructionPtr aRC = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
+    ResultConstructionPtr aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
         aConstrAttr->object());
     if (!aRC)
       return false;
-    boost::shared_ptr<ModelAPI_Document> aDoc = aRC->document();
+    std::shared_ptr<ModelAPI_Document> aDoc = aRC->document();
     aFeature = aDoc->feature(aRC);
   }
 
@@ -436,12 +436,12 @@ bool SketchSolver_ConstraintGroup::changeRigidConstraint(
 
   if (aConstrMapIter == myConstraintMap.end()) { // Add new constraint
     // Check the fixed entity is not a point.
-    boost::shared_ptr<ModelAPI_AttributeRefAttr> aConstrAttr = boost::dynamic_pointer_cast<
+    std::shared_ptr<ModelAPI_AttributeRefAttr> aConstrAttr = std::dynamic_pointer_cast<
         ModelAPI_AttributeRefAttr>(theConstraint->data()->attribute(aConstraintAttributes[0]));
-    boost::shared_ptr<GeomDataAPI_Point> aPoint =
-        boost::dynamic_pointer_cast<GeomDataAPI_Point>(aConstrAttr->attr());
-    boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D =
-        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aConstrAttr->attr());
+    std::shared_ptr<GeomDataAPI_Point> aPoint =
+        std::dynamic_pointer_cast<GeomDataAPI_Point>(aConstrAttr->attr());
+    std::shared_ptr<GeomDataAPI_Point2D> aPoint2D =
+        std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aConstrAttr->attr());
     if (aPoint || aPoint2D) {
       // Create SolveSpace constraint structure
       Slvs_Constraint aConstraint = Slvs_MakeConstraint(
@@ -463,16 +463,16 @@ bool SketchSolver_ConstraintGroup::changeRigidConstraint(
       bool isCircle = false;
       if (aFeature) {
         if (aFeature->getKind() == SketchPlugin_Arc::ID()) {
-          boost::shared_ptr<GeomDataAPI_Point2D> aCenter =
-              boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+          std::shared_ptr<GeomDataAPI_Point2D> aCenter =
+              std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
               aFeature->data()->attribute(SketchPlugin_Arc::CENTER_ID()));
-          boost::shared_ptr<GeomDataAPI_Point2D> aStart =
-              boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+          std::shared_ptr<GeomDataAPI_Point2D> aStart =
+              std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
               aFeature->data()->attribute(SketchPlugin_Arc::START_ID()));
           aRadius = aStart->pnt()->distance(aCenter->pnt());
           isArc = true;
         } else if (aFeature->getKind() == SketchPlugin_Circle::ID()) {
-          aRadius = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+          aRadius = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
               aFeature->data()->attribute(SketchPlugin_Circle::RADIUS_ID()))->value();
           isCircle = true;
         }
@@ -544,10 +544,10 @@ bool SketchSolver_ConstraintGroup::changeRigidConstraint(
 //  Purpose:  create/update the element affected by any constraint
 // ============================================================================
 Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(
-    boost::shared_ptr<ModelAPI_Attribute> theEntity)
+    std::shared_ptr<ModelAPI_Attribute> theEntity)
 {
   // If the entity is already in the group, try to find it
-  std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aEntIter =
+  std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aEntIter =
       myEntityAttrMap.find(theEntity);
   int aEntPos;
   std::vector<Slvs_Param>::const_iterator aParamIter;  // looks at first parameter of already existent entity or at the end of vector otherwise
@@ -589,7 +589,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(
   aNewEntity.h = SLVS_E_UNKNOWN;
 
   // Point in 3D
-  boost::shared_ptr<GeomDataAPI_Point> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       theEntity);
   if (aPoint) {
     Slvs_hParam aX = changeParameter(aPoint->x(), aParamIter);
@@ -603,8 +603,8 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(
       return SLVS_E_UNKNOWN;
 
     // Point in 2D
-    boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D =
-        boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(theEntity);
+    std::shared_ptr<GeomDataAPI_Point2D> aPoint2D =
+        std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theEntity);
     if (aPoint2D) {
       Slvs_hParam aU = changeParameter(aPoint2D->x(), aParamIter);
       Slvs_hParam aV = changeParameter(aPoint2D->y(), aParamIter);
@@ -612,7 +612,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(
         aNewEntity = Slvs_MakePoint2d(++myEntityMaxID, myID, myWorkplane.h, aU, aV);
     } else {
       // Scalar value (used for the distance entities)
-      AttributeDoublePtr aScalar = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theEntity);
+      AttributeDoublePtr aScalar = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theEntity);
       if (aScalar) {
         Slvs_hParam aValue = changeParameter(aScalar->value(), aParamIter);
         if (!isEntExists) // New entity
@@ -659,7 +659,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(FeaturePtr theEntity)
   aNewEntity.h = SLVS_E_UNKNOWN;
 
   // SketchPlugin features
-  boost::shared_ptr<SketchPlugin_Feature> aFeature = boost::dynamic_pointer_cast<
+  std::shared_ptr<SketchPlugin_Feature> aFeature = std::dynamic_pointer_cast<
       SketchPlugin_Feature>(theEntity);
   if (aFeature) {  // Verify the feature by its kind
     const std::string& aFeatureKind = aFeature->getKind();
@@ -748,11 +748,11 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(FeaturePtr theEntity)
 //  Purpose:  create/update the normal of workplane
 // ============================================================================
 Slvs_hEntity SketchSolver_ConstraintGroup::changeNormal(
-    boost::shared_ptr<ModelAPI_Attribute> theDirX, boost::shared_ptr<ModelAPI_Attribute> theDirY,
-    boost::shared_ptr<ModelAPI_Attribute> theNorm)
+    std::shared_ptr<ModelAPI_Attribute> theDirX, std::shared_ptr<ModelAPI_Attribute> theDirY,
+    std::shared_ptr<ModelAPI_Attribute> theNorm)
 {
-  boost::shared_ptr<GeomDataAPI_Dir> aDirX = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(theDirX);
-  boost::shared_ptr<GeomDataAPI_Dir> aDirY = boost::dynamic_pointer_cast<GeomDataAPI_Dir>(theDirY);
+  std::shared_ptr<GeomDataAPI_Dir> aDirX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(theDirX);
+  std::shared_ptr<GeomDataAPI_Dir> aDirY = std::dynamic_pointer_cast<GeomDataAPI_Dir>(theDirY);
   if (!aDirX || !aDirY || (fabs(aDirX->x()) + fabs(aDirX->y()) + fabs(aDirX->z()) < tolerance)
       || (fabs(aDirY->x()) + fabs(aDirY->y()) + fabs(aDirY->z()) < tolerance))
     return SLVS_E_UNKNOWN;
@@ -764,7 +764,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeNormal(
   double aNormCoord[4] = { qw, qx, qy, qz };
 
   // Try to find existent normal
-  std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aEntIter =
+  std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aEntIter =
       myEntityAttrMap.find(theNorm);
   std::vector<Slvs_Param>::const_iterator aParamIter;  // looks to the first parameter of already existent entity or to the end of vector otherwise
   if (aEntIter == myEntityAttrMap.end())  // no such entity => should be created
@@ -797,7 +797,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeNormal(
 //  Class:    SketchSolver_ConstraintGroup
 //  Purpose:  create workplane for the group
 // ============================================================================
-bool SketchSolver_ConstraintGroup::addWorkplane(boost::shared_ptr<ModelAPI_CompositeFeature> theSketch)
+bool SketchSolver_ConstraintGroup::addWorkplane(std::shared_ptr<ModelAPI_CompositeFeature> theSketch)
 {
   if (myWorkplane.h || theSketch->getKind().compare(SketchPlugin_Sketch::ID()) != 0)
     return false;  // the workplane already exists or the function parameter is not Sketch
@@ -817,13 +817,13 @@ bool SketchSolver_ConstraintGroup::updateWorkplane()
   if (!mySketch->data())
     return false; // case sketch is deleted
   // Get parameters of workplane
-  boost::shared_ptr<ModelAPI_Attribute> aDirX = mySketch->data()->attribute(
+  std::shared_ptr<ModelAPI_Attribute> aDirX = mySketch->data()->attribute(
       SketchPlugin_Sketch::DIRX_ID());
-  boost::shared_ptr<ModelAPI_Attribute> aDirY = mySketch->data()->attribute(
+  std::shared_ptr<ModelAPI_Attribute> aDirY = mySketch->data()->attribute(
       SketchPlugin_Sketch::DIRY_ID());
-  boost::shared_ptr<ModelAPI_Attribute> aNorm = mySketch->data()->attribute(
+  std::shared_ptr<ModelAPI_Attribute> aNorm = mySketch->data()->attribute(
       SketchPlugin_Sketch::NORM_ID());
-  boost::shared_ptr<ModelAPI_Attribute> anOrigin = mySketch->data()->attribute(
+  std::shared_ptr<ModelAPI_Attribute> anOrigin = mySketch->data()->attribute(
       SketchPlugin_Sketch::ORIGIN_ID());
   // Transform them into SolveSpace format
   Slvs_hEntity aNormalWP = changeNormal(aDirX, aDirY, aNorm);
@@ -893,7 +893,7 @@ bool SketchSolver_ConstraintGroup::resolveConstraints()
       return true;
 
     // We should go through the attributes map, because only attributes have valued parameters
-    std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator anEntIter =
+    std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator anEntIter =
         myEntityAttrMap.begin();
     for (; anEntIter != myEntityAttrMap.end(); anEntIter++)
       if (updateAttribute(anEntIter->first, anEntIter->second))
@@ -938,7 +938,7 @@ void SketchSolver_ConstraintGroup::mergeGroups(const SketchSolver_ConstraintGrou
   if (myTempPointWhereDragged.empty())
     myTempPointWhereDragged = theGroup.myTempPointWhereDragged;
   else if (!theGroup.myTempPointWhereDragged.empty()) {  // Need to create additional transient constraint
-    std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aFeatureIter =
+    std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aFeatureIter =
         theGroup.myEntityAttrMap.begin();
     for (; aFeatureIter != theGroup.myEntityAttrMap.end(); aFeatureIter++)
       if (aFeatureIter->second == myTempPointWDrgdID) {
@@ -1106,13 +1106,13 @@ bool SketchSolver_ConstraintGroup::updateGroup()
 
   // Check if some entities are invalid too
   std::set<Slvs_hEntity> anEntToRemove;
-  std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator
+  std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator
       anAttrIter = myEntityAttrMap.begin();
   while (anAttrIter != myEntityAttrMap.end()) {
     if (!anAttrIter->first->owner() || !anAttrIter->first->owner()->data() ||
         !anAttrIter->first->owner()->data()->isValid()) {
       anEntToRemove.insert(anAttrIter->second);
-      std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator
+      std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator
           aRemovedIter = anAttrIter;
       anAttrIter++;
       myEntityAttrMap.erase(aRemovedIter);
@@ -1135,10 +1135,10 @@ bool SketchSolver_ConstraintGroup::updateGroup()
   // Probably, need to update coincidence constraints
   if (isCCRemoved && !myExtraCoincidence.empty()) {
     // Make a copy, because the new list of unused constrtaints will be generated
-    std::set<boost::shared_ptr<SketchPlugin_Constraint> > anExtraCopy = myExtraCoincidence;
+    std::set<std::shared_ptr<SketchPlugin_Constraint> > anExtraCopy = myExtraCoincidence;
     myExtraCoincidence.clear();
 
-    std::set<boost::shared_ptr<SketchPlugin_Constraint> >::iterator aCIter = anExtraCopy.begin();
+    std::set<std::shared_ptr<SketchPlugin_Constraint> >::iterator aCIter = anExtraCopy.begin();
     for (; aCIter != anExtraCopy.end(); aCIter++)
       if ((*aCIter)->data() && (*aCIter)->data()->isValid())
         changeConstraint(*aCIter);
@@ -1153,7 +1153,7 @@ bool SketchSolver_ConstraintGroup::updateGroup()
 //  Purpose:  update features of sketch after resolving constraints
 // ============================================================================
 bool SketchSolver_ConstraintGroup::updateAttribute(
-    boost::shared_ptr<ModelAPI_Attribute> theAttribute, const Slvs_hEntity& theEntityID)
+    std::shared_ptr<ModelAPI_Attribute> theAttribute, const Slvs_hEntity& theEntityID)
 {
   // Search the position of the first parameter of the entity
   int anEntPos = Search(theEntityID, myEntities);
@@ -1162,7 +1162,7 @@ bool SketchSolver_ConstraintGroup::updateAttribute(
   // Look over supported types of entities
 
   // Point in 3D
-  boost::shared_ptr<GeomDataAPI_Point> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+  std::shared_ptr<GeomDataAPI_Point> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point>(
       theAttribute);
   if (aPoint) {
     if (fabs(aPoint->x() - myParams[aFirstParamPos].val) > tolerance
@@ -1176,8 +1176,8 @@ bool SketchSolver_ConstraintGroup::updateAttribute(
   }
 
   // Point in 2D
-  boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D =
-      boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(theAttribute);
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint2D =
+      std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theAttribute);
   if (aPoint2D) {
     if (fabs(aPoint2D->x() - myParams[aFirstParamPos].val) > tolerance
         || fabs(aPoint2D->y() - myParams[aFirstParamPos + 1].val) > tolerance) {
@@ -1188,7 +1188,7 @@ bool SketchSolver_ConstraintGroup::updateAttribute(
   }
 
   // Scalar value
-  AttributeDoublePtr aScalar = boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
+  AttributeDoublePtr aScalar = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
   if (aScalar) {
     if (fabs(aScalar->value() - myParams[aFirstParamPos].val) > tolerance) {
       aScalar->setValue(myParams[aFirstParamPos].val);
@@ -1207,7 +1207,7 @@ bool SketchSolver_ConstraintGroup::updateAttribute(
 //  Purpose:  search the entity in this group and update it
 // ============================================================================
 void SketchSolver_ConstraintGroup::updateEntityIfPossible(
-    boost::shared_ptr<ModelAPI_Attribute> theEntity)
+    std::shared_ptr<ModelAPI_Attribute> theEntity)
 {
   if (myEntityAttrMap.find(theEntity) != myEntityAttrMap.end()) {
     // If the attribute is a point and it is changed (the group needs to rebuild),
@@ -1223,9 +1223,9 @@ void SketchSolver_ConstraintGroup::updateEntityIfPossible(
     if (myNeedToSolve)  // the entity is changed
     {
       // Verify the entity is a point and add temporary constraint of permanency
-      boost::shared_ptr<GeomDataAPI_Point> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
+      std::shared_ptr<GeomDataAPI_Point> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point>(
           theEntity);
-      boost::shared_ptr<GeomDataAPI_Point2D> aPoint2D = boost::dynamic_pointer_cast<
+      std::shared_ptr<GeomDataAPI_Point2D> aPoint2D = std::dynamic_pointer_cast<
           GeomDataAPI_Point2D>(theEntity);
       if (aPoint || aPoint2D)
         addTemporaryConstraintWhereDragged(theEntity);
@@ -1246,11 +1246,11 @@ void SketchSolver_ConstraintGroup::updateEntityIfPossible(
 //            which was moved by user
 // ============================================================================
 void SketchSolver_ConstraintGroup::addTemporaryConstraintWhereDragged(
-    boost::shared_ptr<ModelAPI_Attribute> theEntity,
+    std::shared_ptr<ModelAPI_Attribute> theEntity,
     bool theAllowToFit)
 {
   // Find identifier of the entity
-  std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator anEntIter =
+  std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator anEntIter =
       myEntityAttrMap.find(theEntity);
   if (anEntIter == myEntityAttrMap.end())
     return;
@@ -1338,7 +1338,7 @@ void SketchSolver_ConstraintGroup::removeTemporaryConstraints(
 //  Purpose:  remove constraint and all unused entities
 // ============================================================================
 void SketchSolver_ConstraintGroup::removeConstraint(
-    boost::shared_ptr<SketchPlugin_Constraint> theConstraint)
+    std::shared_ptr<SketchPlugin_Constraint> theConstraint)
 {
   ConstraintMap::iterator anIterToRemove = myConstraintMap.find(theConstraint);
   if (anIterToRemove == myConstraintMap.end())
@@ -1392,11 +1392,11 @@ void SketchSolver_ConstraintGroup::removeConstraint(
     return;
 
   // Remove unused entities
-  std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator anEntAttrIter =
+  std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator anEntAttrIter =
       myEntityAttrMap.begin();
   while (anEntAttrIter != myEntityAttrMap.end()) {
     if (anEntToRemove.find(anEntAttrIter->second) != anEntToRemove.end()) {
-      std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator aRemovedIter =
+      std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator aRemovedIter =
           anEntAttrIter;
       anEntAttrIter++;
       myEntityAttrMap.erase(aRemovedIter);
@@ -1503,17 +1503,17 @@ bool SketchSolver_ConstraintGroup::addCoincidentPoints(const Slvs_hEntity& thePo
 //  Purpose:  emit the signal to update constraints
 // ============================================================================
 void SketchSolver_ConstraintGroup::updateRelatedConstraints(
-    boost::shared_ptr<ModelAPI_Attribute> theEntity) const
+    std::shared_ptr<ModelAPI_Attribute> theEntity) const
 {
   ConstraintMap::const_iterator aConstrIter = myConstraintMap.begin();
   for (; aConstrIter != myConstraintMap.end(); aConstrIter++) {
-    std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttributes = aConstrIter->first->data()
+    std::list<std::shared_ptr<ModelAPI_Attribute> > anAttributes = aConstrIter->first->data()
         ->attributes(std::string());
 
-    std::list<boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttrIter = anAttributes.begin();
+    std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrIter = anAttributes.begin();
     for (; anAttrIter != anAttributes.end(); anAttrIter++) {
       bool isUpd = (*anAttrIter == theEntity);
-      boost::shared_ptr<ModelAPI_AttributeRefAttr> aRefAttr = boost::dynamic_pointer_cast<
+      std::shared_ptr<ModelAPI_AttributeRefAttr> aRefAttr = std::dynamic_pointer_cast<
           ModelAPI_AttributeRefAttr>(*anAttrIter);
       if (aRefAttr && !aRefAttr->isObject() && aRefAttr->attr() == theEntity)
         isUpd = true;
@@ -1528,16 +1528,16 @@ void SketchSolver_ConstraintGroup::updateRelatedConstraints(
 }
 
 void SketchSolver_ConstraintGroup::updateRelatedConstraints(
-    boost::shared_ptr<ModelAPI_Feature> theFeature) const
+    std::shared_ptr<ModelAPI_Feature> theFeature) const
 {
   ConstraintMap::const_iterator aConstrIter = myConstraintMap.begin();
   for (; aConstrIter != myConstraintMap.end(); aConstrIter++) {
-    std::list<boost::shared_ptr<ModelAPI_Attribute> > anAttributes = aConstrIter->first->data()
+    std::list<std::shared_ptr<ModelAPI_Attribute> > anAttributes = aConstrIter->first->data()
         ->attributes(std::string());
 
-    std::list<boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttrIter = anAttributes.begin();
+    std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrIter = anAttributes.begin();
     for (; anAttrIter != anAttributes.end(); anAttrIter++) {
-      boost::shared_ptr<ModelAPI_AttributeRefAttr> aRefAttr = boost::dynamic_pointer_cast<
+      std::shared_ptr<ModelAPI_AttributeRefAttr> aRefAttr = std::dynamic_pointer_cast<
           ModelAPI_AttributeRefAttr>(*anAttrIter);
       if (aRefAttr && aRefAttr->isObject() && aRefAttr->object() == theFeature) {
         static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
index c8a673029e2ce047589e971d17e7cdb2b132dd70..46dbd9e0e281024c599f5154ef1bf5a8e784eb09 100644 (file)
@@ -16,7 +16,7 @@
 #include <vector>
 #include <set>
 
-typedef std::map< boost::shared_ptr<SketchPlugin_Constraint>, std::vector<Slvs_hConstraint> >
+typedef std::map< std::shared_ptr<SketchPlugin_Constraint>, std::vector<Slvs_hConstraint> >
   ConstraintMap;
 
 /** \class   SketchSolver_ConstraintGroup
@@ -30,7 +30,7 @@ class SketchSolver_ConstraintGroup
    *         Throws an exception if theWorkplane is not an object of SketchPlugin_Sketch type
    *  \remark Type of theSketch is not verified inside
    */
-  SketchSolver_ConstraintGroup(boost::shared_ptr<ModelAPI_CompositeFeature> theWorkplane);
+  SketchSolver_ConstraintGroup(std::shared_ptr<ModelAPI_CompositeFeature> theWorkplane);
 
   ~SketchSolver_ConstraintGroup();
 
@@ -56,22 +56,22 @@ class SketchSolver_ConstraintGroup
    *  \param[in] theConstraint constraint to be changed
    *  \return \c true if the constraint added or updated successfully
    */
-  bool changeConstraint(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
-  bool changeRigidConstraint(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
+  bool changeConstraint(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
+  bool changeRigidConstraint(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
 
   /** \brief Verifies the feature attributes are used in this group
    *  \param[in] theFeature constraint or any other object for verification of interaction
    *  \return \c true if some of attributes are used in current group
    */
-  bool isInteract(boost::shared_ptr<SketchPlugin_Feature> theFeature) const;
+  bool isInteract(std::shared_ptr<SketchPlugin_Feature> theFeature) const;
 
   /** \brief Verifies the specified feature is equal to the base workplane for this group
    *  \param[in] theWorkplane the feature to be compared with base workplane
    *  \return \c true if workplanes are the same
    */
-  bool isBaseWorkplane(boost::shared_ptr<ModelAPI_CompositeFeature> theWorkplane) const;
+  bool isBaseWorkplane(std::shared_ptr<ModelAPI_CompositeFeature> theWorkplane) const;
 
-  boost::shared_ptr<ModelAPI_CompositeFeature> getWorkplane() const
+  std::shared_ptr<ModelAPI_CompositeFeature> getWorkplane() const
   {
     return mySketch;
   }
@@ -84,7 +84,7 @@ class SketchSolver_ConstraintGroup
   /** \brief If the entity is in this group it will updated
    *  \param[in] theEntity attribute, which values should update SolveSpace entity
    */
-  void updateEntityIfPossible(boost::shared_ptr<ModelAPI_Attribute> theEntity);
+  void updateEntityIfPossible(std::shared_ptr<ModelAPI_Attribute> theEntity);
 
   /** \brief Searches invalid features and constraints in the group and avoids them
    *  \return \c true if the group several constraints were removed
@@ -109,8 +109,8 @@ class SketchSolver_ConstraintGroup
   /** \brief Searches the constraints built on the entity and emit the signal to update them
    *  \param[in] theEntity attribute of the constraint
    */
-  void updateRelatedConstraints(boost::shared_ptr<ModelAPI_Attribute> theEntity) const;
-  void updateRelatedConstraints(boost::shared_ptr<ModelAPI_Feature> theFeature) const;
+  void updateRelatedConstraints(std::shared_ptr<ModelAPI_Attribute> theEntity) const;
+  void updateRelatedConstraints(std::shared_ptr<ModelAPI_Feature> theFeature) const;
 
   /** \brief Adds or updates an entity in the group
    *
@@ -120,7 +120,7 @@ class SketchSolver_ConstraintGroup
    *  \param[in] theEntity the object of constraint
    *  \return identifier of changed entity or 0 if entity could not be changed
    */
-  Slvs_hEntity changeEntity(boost::shared_ptr<ModelAPI_Attribute> theEntity);
+  Slvs_hEntity changeEntity(std::shared_ptr<ModelAPI_Attribute> theEntity);
   Slvs_hEntity changeEntity(FeaturePtr theEntity);
 
 protected:
@@ -137,9 +137,9 @@ protected:
    *  \param[in] theNorm attribute for the normal (used to identify newly created entity)
    *  \return identifier of created or updated normal
    */
-  Slvs_hEntity changeNormal(boost::shared_ptr<ModelAPI_Attribute> theDirX,
-                            boost::shared_ptr<ModelAPI_Attribute> theDirY,
-                            boost::shared_ptr<ModelAPI_Attribute> theNorm);
+  Slvs_hEntity changeNormal(std::shared_ptr<ModelAPI_Attribute> theDirX,
+                            std::shared_ptr<ModelAPI_Attribute> theDirY,
+                            std::shared_ptr<ModelAPI_Attribute> theNorm);
 
   /** \brief Adds or updates a parameter in the group
    *  \param[in] theParam   the value of parameter
@@ -158,14 +158,14 @@ protected:
   /** \brief Removes constraints from the group
    *  \param[in] theConstraint constraint to be removed
    */
-  void removeConstraint(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
+  void removeConstraint(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
 
   /** \brief Change values of attribute by parameters received from SolveSpace solver
    *  \param[in,out] theAttribute pointer to the attribute to be changed
    *  \param[in]     theEntityID  identifier of SolveSpace entity, which contains updated data
    *  \return \c true if the attribute's value has changed
    */
-  bool updateAttribute(boost::shared_ptr<ModelAPI_Attribute> theAttribute,
+  bool updateAttribute(std::shared_ptr<ModelAPI_Attribute> theAttribute,
                        const Slvs_hEntity& theEntityID);
 
   /** \brief Adds a constraint for a point which should not be changed during computations
@@ -174,7 +174,7 @@ protected:
    *                           the 'dragged' field of SolveSpace solver, so this entity 
    *                           may be changed a little during solution
    */
-  void addTemporaryConstraintWhereDragged(boost::shared_ptr<ModelAPI_Attribute> theEntity,
+  void addTemporaryConstraintWhereDragged(std::shared_ptr<ModelAPI_Attribute> theEntity,
                                           bool theAllowToFit = true);
 
   /** \brief Remove all temporary constraint after computation finished
@@ -188,7 +188,7 @@ protected:
    *  \param[in] theSketch parameters of workplane are the attributes of this sketch
    *  \return \c true if success, \c false if workplane parameters are not consistent
    */
-  bool addWorkplane(boost::shared_ptr<ModelAPI_CompositeFeature> theSketch);
+  bool addWorkplane(std::shared_ptr<ModelAPI_CompositeFeature> theSketch);
 
   /** \brief Add the entities of constraint for points coincidence into the appropriate list
    *  \param[in] thePoint1 identifier of the first point
@@ -224,14 +224,14 @@ protected:
   std::list<Slvs_hConstraint> myTempConstraints;  ///< The list of identifiers of temporary constraints (SLVS_C_WHERE_DRAGGED) applied for all other points moved by user
 
   // SketchPlugin entities
-  boost::shared_ptr<ModelAPI_CompositeFeature> mySketch;        ///< Equivalent to workplane
+  std::shared_ptr<ModelAPI_CompositeFeature> mySketch;        ///< Equivalent to workplane
   ConstraintMap myConstraintMap;  ///< The map between SketchPlugin and SolveSpace constraints
-  std::map<boost::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity> myEntityAttrMap;  ///< The map between "attribute" parameters of constraints and their equivalent SolveSpace entities
+  std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity> myEntityAttrMap;  ///< The map between "attribute" parameters of constraints and their equivalent SolveSpace entities
   std::map<FeaturePtr, Slvs_hEntity> myEntityFeatMap;  ///< The map between "feature" parameters of constraints and their equivalent SolveSpace entities
 
   // Conincident items
   std::vector<std::set<Slvs_hEntity> > myCoincidentPoints;  ///< Stores the lists of identifiers of coincident points (to avoid unnecessary coincidence constraints)
-  std::set<boost::shared_ptr<SketchPlugin_Constraint> > myExtraCoincidence;  ///< Additional coincidence constraints which are not necessary (coincidence between points already done
+  std::set<std::shared_ptr<SketchPlugin_Constraint> > myExtraCoincidence;  ///< Additional coincidence constraints which are not necessary (coincidence between points already done
                                                                              ///< by other constraints) but created by GUI tools. Useful when some coincidence constraints were removed
 };
 
index ef7420ab53aea6254dc9c78829c99c72dedea9e5..6cad183e4525abf4cba2cfb13a08b91d88fac7db 100644 (file)
@@ -61,15 +61,15 @@ SketchSolver_ConstraintManager::~SketchSolver_ConstraintManager()
 //  Purpose:  listen the event loop and process the message
 // ============================================================================
 void SketchSolver_ConstraintManager::processEvent(
-  const boost::shared_ptr<Events_Message>& theMessage)
+  const std::shared_ptr<Events_Message>& theMessage)
 {
   if (myIsComputed)
     return;
   if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)
       || theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)
       || theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_MOVED)) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     std::set<ObjectPtr> aFeatures = anUpdateMsg->objects();
 
     bool isMovedEvt = theMessage->eventID()
@@ -77,8 +77,8 @@ void SketchSolver_ConstraintManager::processEvent(
     if (isMovedEvt) {
       std::set<ObjectPtr>::iterator aFeatIter;
       for (aFeatIter = aFeatures.begin(); aFeatIter != aFeatures.end(); aFeatIter++) {
-        boost::shared_ptr<SketchPlugin_Feature> aSFeature = 
-            boost::dynamic_pointer_cast<SketchPlugin_Feature>(*aFeatIter);
+        std::shared_ptr<SketchPlugin_Feature> aSFeature = 
+            std::dynamic_pointer_cast<SketchPlugin_Feature>(*aFeatIter);
         if (aSFeature)
           updateEntity(aSFeature);
       }
@@ -86,20 +86,20 @@ void SketchSolver_ConstraintManager::processEvent(
       std::set<ObjectPtr>::iterator aFeatIter;
       // iterate sketchers fisrt to create all sketches before (on load may exist several sketches)
       for (aFeatIter = aFeatures.begin(); aFeatIter != aFeatures.end(); aFeatIter++) {
-        FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(*aFeatIter);
+        FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*aFeatIter);
         if (!aFeature)
           continue;
         const std::string& aFeatureKind = aFeature->getKind();
         if (aFeatureKind.compare(SketchPlugin_Sketch::ID()) == 0) {
-          boost::shared_ptr<ModelAPI_CompositeFeature> aSketch = boost::dynamic_pointer_cast<
+          std::shared_ptr<ModelAPI_CompositeFeature> aSketch = std::dynamic_pointer_cast<
               ModelAPI_CompositeFeature>(aFeature);
           changeWorkplane(aSketch);
         }
       }
       // then get anything but not the sketch
       for (aFeatIter = aFeatures.begin(); aFeatIter != aFeatures.end(); aFeatIter++) {
-        boost::shared_ptr<SketchPlugin_Feature> aFeature = 
-          boost::dynamic_pointer_cast<SketchPlugin_Feature>(*aFeatIter);
+        std::shared_ptr<SketchPlugin_Feature> aFeature = 
+          std::dynamic_pointer_cast<SketchPlugin_Feature>(*aFeatIter);
         if (!aFeature)
           continue;
           changeConstraintOrEntity(aFeature);
@@ -109,8 +109,8 @@ void SketchSolver_ConstraintManager::processEvent(
     // Solve the set of constraints
     resolveConstraints();
   } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)) {
-    boost::shared_ptr<ModelAPI_ObjectDeletedMessage> aDeleteMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectDeletedMessage> aDeleteMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
     const std::set<std::string>& aFeatureGroups = aDeleteMsg->groups();
 
     // Find SketchPlugin_Sketch::ID() in groups. The constraint groups should be updated when an object removed from Sketch
@@ -148,7 +148,7 @@ void SketchSolver_ConstraintManager::processEvent(
 //  Purpose:  update workplane by given parameters of the sketch
 // ============================================================================
 bool SketchSolver_ConstraintManager::changeWorkplane(
-    boost::shared_ptr<ModelAPI_CompositeFeature> theSketch)
+    std::shared_ptr<ModelAPI_CompositeFeature> theSketch)
 {
   bool aResult = true;  // changed when a workplane wrongly updated
   bool isUpdated = false;
@@ -179,21 +179,21 @@ bool SketchSolver_ConstraintManager::changeWorkplane(
 //  Purpose:  create/update the constraint or the feature and place it into appropriate group
 // ============================================================================
 bool SketchSolver_ConstraintManager::changeConstraintOrEntity(
-    boost::shared_ptr<SketchPlugin_Feature> theFeature)
+    std::shared_ptr<SketchPlugin_Feature> theFeature)
 {
   // Search the groups which this feature touches
   std::set<Slvs_hGroup> aGroups;
   findGroups(theFeature, aGroups);
 
-  boost::shared_ptr<SketchPlugin_Constraint> aConstraint = 
-      boost::dynamic_pointer_cast<SketchPlugin_Constraint>(theFeature);
+  std::shared_ptr<SketchPlugin_Constraint> aConstraint = 
+      std::dynamic_pointer_cast<SketchPlugin_Constraint>(theFeature);
 
   // Process the groups list
   if (aGroups.size() == 0) {
     // There are no groups applicable for this constraint => create new one
     // The group will be created only for constraints, not for features
     if (!aConstraint) return false;
-    boost::shared_ptr<ModelAPI_CompositeFeature> aWP = findWorkplane(aConstraint);
+    std::shared_ptr<ModelAPI_CompositeFeature> aWP = findWorkplane(aConstraint);
     if (!aWP)
       return false;
     SketchSolver_ConstraintGroup* aGroup = new SketchSolver_ConstraintGroup(aWP);
@@ -259,7 +259,7 @@ bool SketchSolver_ConstraintManager::changeConstraintOrEntity(
 //  Purpose:  update any element on the sketch, which is used by constraints
 // ============================================================================
 void SketchSolver_ConstraintManager::updateEntity(
-    boost::shared_ptr<SketchPlugin_Feature> theFeature)
+    std::shared_ptr<SketchPlugin_Feature> theFeature)
 {
   // Create list of attributes depending on type of the feature
   std::vector<std::string> anAttrList;
@@ -292,7 +292,7 @@ void SketchSolver_ConstraintManager::updateEntity(
     for (aGroupIter = myGroups.begin(); aGroupIter != myGroups.end(); aGroupIter++) {
       if ((*aGroupIter)->isEmpty())
         continue;
-      boost::shared_ptr<ModelAPI_Attribute> anAttribute = boost::dynamic_pointer_cast<
+      std::shared_ptr<ModelAPI_Attribute> anAttribute = std::dynamic_pointer_cast<
           ModelAPI_Attribute>(theFeature->data()->attribute(*anAttrIter));
       (*aGroupIter)->updateEntityIfPossible(anAttribute);
     }
@@ -310,10 +310,10 @@ void SketchSolver_ConstraintManager::updateEntity(
 //  Purpose:  search groups of entities interacting with given feature
 // ============================================================================
 void SketchSolver_ConstraintManager::findGroups(
-    boost::shared_ptr<SketchPlugin_Feature> theFeature,
+    std::shared_ptr<SketchPlugin_Feature> theFeature,
     std::set<Slvs_hGroup>& theGroupIDs) const
 {
-  boost::shared_ptr<ModelAPI_CompositeFeature> aWP = findWorkplane(theFeature);
+  std::shared_ptr<ModelAPI_CompositeFeature> aWP = findWorkplane(theFeature);
 
   SketchSolver_ConstraintGroup* anEmptyGroup = 0;  // appropriate empty group for specified constraint
   std::vector<SketchSolver_ConstraintGroup*>::const_iterator aGroupIter;
@@ -335,19 +335,19 @@ void SketchSolver_ConstraintManager::findGroups(
 //  Class:    SketchSolver_Session
 //  Purpose:  search workplane containing given feature
 // ============================================================================
-boost::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_ConstraintManager::findWorkplane(
-    boost::shared_ptr<SketchPlugin_Feature> theFeature) const
+std::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_ConstraintManager::findWorkplane(
+    std::shared_ptr<SketchPlugin_Feature> theFeature) const
 {
   // Already verified workplanes
-  std::set<boost::shared_ptr<ModelAPI_CompositeFeature> > aVerified;
+  std::set<std::shared_ptr<ModelAPI_CompositeFeature> > aVerified;
 
   std::vector<SketchSolver_ConstraintGroup*>::const_iterator aGroupIter;
   for (aGroupIter = myGroups.begin(); aGroupIter != myGroups.end(); aGroupIter++) {
-    boost::shared_ptr<ModelAPI_CompositeFeature> aWP = (*aGroupIter)->getWorkplane();
+    std::shared_ptr<ModelAPI_CompositeFeature> aWP = (*aGroupIter)->getWorkplane();
     if (aVerified.find(aWP) != aVerified.end())
       continue;
 
-    boost::shared_ptr<ModelAPI_AttributeRefList> aWPFeatures = boost::dynamic_pointer_cast<
+    std::shared_ptr<ModelAPI_AttributeRefList> aWPFeatures = std::dynamic_pointer_cast<
         ModelAPI_AttributeRefList>(aWP->data()->attribute(SketchPlugin_Sketch::FEATURES_ID()));
     std::list<ObjectPtr> aFeaturesList = aWPFeatures->list();
     std::list<ObjectPtr>::const_iterator anIter;
@@ -357,7 +357,7 @@ boost::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_ConstraintManager::fin
     aVerified.insert(aWP);
   }
 
-  return boost::shared_ptr<ModelAPI_CompositeFeature>();
+  return std::shared_ptr<ModelAPI_CompositeFeature>();
 }
 
 // ============================================================================
index 422ae03478af62197f2413d80c130b36e025e05b..c37637a3968fba3568ce5d8abbbd810218e2aa85 100644 (file)
@@ -42,7 +42,7 @@ class SketchSolver_ConstraintManager : public Events_Listener
   /** \brief Implementation of Event Listener method
    *  \param[in] theMessage the data of the event
    */
-  virtual void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
  protected:
   SketchSolver_ConstraintManager();
@@ -52,32 +52,32 @@ class SketchSolver_ConstraintManager : public Events_Listener
    *  \param[in] theFeature sketch feature to be changed
    *  \return \c true if the feature changed successfully
    */
-  bool changeConstraintOrEntity(boost::shared_ptr<SketchPlugin_Feature> theFeature);
+  bool changeConstraintOrEntity(std::shared_ptr<SketchPlugin_Feature> theFeature);
 
   /** \brief Removes a constraint from the manager
    *  \param[in] theConstraint constraint to be removed
    *  \return \c true if the constraint removed successfully
    */
-  bool removeConstraint(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
+  bool removeConstraint(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
 
   /** \brief Adds or updates a workplane in the manager
    *  \param[in] theSketch the feature to create or update workplane
    *  \return \c true if the workplane changed successfully
    *  \remark Type of theSketch is not verified inside
    */
-  bool changeWorkplane(boost::shared_ptr<ModelAPI_CompositeFeature> theSketch);
+  bool changeWorkplane(std::shared_ptr<ModelAPI_CompositeFeature> theSketch);
 
   /** \brief Removes a workplane from the manager.
    *         All groups based on such workplane will be removed too.
    *  \param[in] theSketch the feature to be removed
    *  \return \c true if the workplane removed successfully
    */
-  bool removeWorkplane(boost::shared_ptr<SketchPlugin_Sketch> theSketch);
+  bool removeWorkplane(std::shared_ptr<SketchPlugin_Sketch> theSketch);
 
   /** \brief Updates entity which is neither workplane nor constraint
    *  \param[in] theFeature entity to be updated
    */
-  void updateEntity(boost::shared_ptr<SketchPlugin_Feature> theFeature);
+  void updateEntity(std::shared_ptr<SketchPlugin_Feature> theFeature);
 
   /** \brief Goes through the list of groups and solve the constraints
    */
@@ -88,15 +88,15 @@ class SketchSolver_ConstraintManager : public Events_Listener
    *  \param[in]  theFeature  object to be found
    *  \param[out] theGroups   list of group indexes interacted with the feature
    */
-  void findGroups(boost::shared_ptr<SketchPlugin_Feature> theFeature,
+  void findGroups(std::shared_ptr<SketchPlugin_Feature> theFeature,
                   std::set<Slvs_hGroup>& theGroupIDs) const;
 
   /** \brief Searches in the list of groups the workplane which constains specified feature
    *  \param[in] theFeature object to be found
    *  \return workplane containing the feature
    */
-  boost::shared_ptr<ModelAPI_CompositeFeature> findWorkplane(
-      boost::shared_ptr<SketchPlugin_Feature> theFeature) const;
+  std::shared_ptr<ModelAPI_CompositeFeature> findWorkplane(
+      std::shared_ptr<SketchPlugin_Feature> theFeature) const;
 
  private:
   static SketchSolver_ConstraintManager* _self;  ///< Self pointer to implement singleton functionality
index 3063959fb5f66df1708e265e0dc9412d2324818a..73808b9af3530d9c62112014c008dc16a77ac57a 100644 (file)
@@ -123,8 +123,8 @@ QMenu* XGUI_ContextMenuMgr::objectBrowserMenu() const
     bool hasFeature = false;
     foreach(ObjectPtr aObj, aObjects)
     {
-      FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
-      ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(aObj);
+      FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
+      ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
       if (aResult)
         hasResult = true;
       if (aFeature)
@@ -136,7 +136,7 @@ QMenu* XGUI_ContextMenuMgr::objectBrowserMenu() const
     if (aSelected == 1) {
       ObjectPtr aObject = aObjects.first();
       if (aObject) {
-        ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
+        ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
         if (aPart) {
           if (aMgr->activeDocument() == aPart->partDoc())
             aMenu->addAction(action("DEACTIVATE_PART_CMD"));
@@ -205,7 +205,7 @@ void XGUI_ContextMenuMgr::addViewerItems(QMenu* theMenu) const
     bool isShading = false;
     foreach(ObjectPtr aObject, aObjects)
     {
-      ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(aObject);
+      ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObject);
       if (aRes && myWorkshop->displayer()->isVisible(aRes)) {
         isVisible = true;
         isShading = (myWorkshop->displayer()->displayMode(aObject) == XGUI_Displayer::Shading);      
index f209538917488ff6cf4d510eaf303e4432c78502..a37d228ebd5ec83e00ca454ed8d77348571789c6 100644 (file)
@@ -53,14 +53,14 @@ void XGUI_Displayer::display(ObjectPtr theObject, bool isUpdateViewer)
   } else {
     AISObjectPtr anAIS;
 
-    GeomPresentablePtr aPrs = boost::dynamic_pointer_cast<GeomAPI_IPresentable>(theObject);
+    GeomPresentablePtr aPrs = std::dynamic_pointer_cast<GeomAPI_IPresentable>(theObject);
     bool isShading = false;
     if (aPrs) {
       anAIS = aPrs->getAISObject(AISObjectPtr());
     } else {
-      ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+      ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
       if (aResult) {
-        boost::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
+        std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
         if (aShapePtr) {
           anAIS = AISObjectPtr(new GeomAPI_AISObject());
           anAIS->setImpl(new Handle(AIS_InteractiveObject)(new ModuleBase_ResultPrs(aResult)));
@@ -126,7 +126,7 @@ void XGUI_Displayer::redisplay(ObjectPtr theObject, bool isUpdateViewer)
   AISObjectPtr aAISObj = getAISObject(theObject);
   Handle(AIS_InteractiveObject) aAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
 
-  GeomPresentablePtr aPrs = boost::dynamic_pointer_cast<GeomAPI_IPresentable>(theObject);
+  GeomPresentablePtr aPrs = std::dynamic_pointer_cast<GeomAPI_IPresentable>(theObject);
   if (aPrs) {
     AISObjectPtr aAIS_Obj = aPrs->getAISObject(aAISObj);
     if (!aAIS_Obj) {
index 3bffe38a08b3660af58c2f876bbfb08523e84c83..575dba31f78f764ef7cbe72179d8e1575ad1676e 100644 (file)
@@ -8,7 +8,7 @@
 #include "XGUI.h"
 
 #include <QString>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <GeomAPI_AISObject.h>
 
index 42d96c8bebf2ccad848c317cdf8e2c8c679149ef..1ed348e1c3d0d3c2347661c529b9582b96de8122 100644 (file)
@@ -45,20 +45,20 @@ XGUI_DocumentDataModel::~XGUI_DocumentDataModel()
   clearSubModels();
 }
 
-void XGUI_DocumentDataModel::processEvent(const boost::shared_ptr<Events_Message>& theMessage)
+void XGUI_DocumentDataModel::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
   DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
 
   // Created object event *******************
   if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     std::set<ObjectPtr> aObjects = aUpdMsg->objects();
 
     std::set<ObjectPtr>::const_iterator aIt;
     for (aIt = aObjects.begin(); aIt != aObjects.end(); ++aIt) {
       ObjectPtr aObject = (*aIt);
-      FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aObject);
+      FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObject);
       if (aFeature && (!aFeature->isInHistory()))
         continue;
 
@@ -97,8 +97,8 @@ void XGUI_DocumentDataModel::processEvent(const boost::shared_ptr<Events_Message
     }
     // Deleted object event ***********************
   } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)) {
-    boost::shared_ptr<ModelAPI_ObjectDeletedMessage> aUpdMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectDeletedMessage> aUpdMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
     DocumentPtr aDoc = aUpdMsg->document();
     std::set<std::string> aGroups = aUpdMsg->groups();
 
@@ -141,7 +141,7 @@ void XGUI_DocumentDataModel::processEvent(const boost::shared_ptr<Events_Message
     }
     // Deleted object event ***********************
   } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
-    //boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg = boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    //std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg = std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     //ObjectPtr aFeature = aUpdMsg->feature();
     //DocumentPtr aDoc = aFeature->document();
 
@@ -204,7 +204,7 @@ QVariant XGUI_DocumentDataModel::data(const QModelIndex& theIndex, int theRole)
             int aOffset = historyOffset();
             DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
             ObjectPtr aObj = aRootDoc->object(ModelAPI_Feature::group(), theIndex.row() - aOffset);
-            FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
+            FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
             if (!aFeature)
             return QVariant();
             switch (theRole) {
@@ -541,7 +541,7 @@ QModelIndex XGUI_DocumentDataModel::objectIndex(const ObjectPtr theObject) const
   DocumentPtr aDoc = theObject->document();
   if (aDoc == aRootDoc) {
     // This feature belongs to histrory or top model
-    FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
+    FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
     if (aFeature) {
       int aId;
       int aNb = aRootDoc->size(ModelAPI_Feature::group());
index a7e9fc944cb6c99ecd0e03fb8131fa284aec0065..ac1466134bc21163ba2e3500e66c2894bae75a5f 100644 (file)
@@ -28,7 +28,7 @@ Q_OBJECT
   virtual ~XGUI_DocumentDataModel();
 
   // Event Listener method
-  virtual void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
   virtual QVariant data(const QModelIndex& theIndex, int theRole) const;
   virtual QVariant headerData(int theSection, Qt::Orientation theOrient, int theRole =
index 699d6e518e2dcd9b40810f1d0bd3970f7bd15c33..0f82445343ffe3cb6309731bd2b29cddb6efe98a 100644 (file)
@@ -58,7 +58,7 @@ void XGUI_DataTree::mouseDoubleClickEvent(QMouseEvent* theEvent)
     QModelIndex aIndex = currentIndex();
     XGUI_DocumentDataModel* aModel = dataModel();
     ObjectPtr aObject = aModel->object(aIndex);
-    ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
+    ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
     if (aPart) {
       aPart->activate();
     }
@@ -352,7 +352,7 @@ void XGUI_ObjectsBrowser::setObjectsSelected(const QList<ObjectPtr>& theObjects)
 }
 
 //***************************************************
-void XGUI_ObjectsBrowser::processEvent(const boost::shared_ptr<Events_Message>& theMessage)
+void XGUI_ObjectsBrowser::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 { 
   myDocModel->processEvent(theMessage); 
 }
index 9e7f901d75224c3d9782242cde3c288a30233b1a..15e5e3690673febfaddd22c21991b03667d8204c 100644 (file)
@@ -97,7 +97,7 @@ Q_OBJECT
 
   void rebuildDataTree();
 
-  void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+  void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
   // Resets the object browser into initial state
   void clearContent();
index 75b57303445d5a89c67ab9e1d1ba8c8066ac7dc4..c7f1b81a2e26fc70fc5a2a001ef5b915295b6e98 100644 (file)
@@ -19,7 +19,7 @@
 
 //ObjectPtr featureObj(const ObjectPtr& theFeature)
 //{
-//  ObjectPtr aObject = boost::dynamic_pointer_cast<ModelAPI_Object>(theFeature);
+//  ObjectPtr aObject = std::dynamic_pointer_cast<ModelAPI_Object>(theFeature);
 //  if (aObject)
 //    return aObject->featureRef();
 //  return theFeature;
@@ -259,7 +259,7 @@ QVariant XGUI_PartDataModel::data(const QModelIndex& theIndex, int theRole) cons
           DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
           ObjectPtr aObject = aRootDoc->object(ModelAPI_ResultPart::group(), myId);
           if (aObject)
-            return boost::dynamic_pointer_cast<ModelAPI_Object>(aObject)->data()->name().c_str();
+            return std::dynamic_pointer_cast<ModelAPI_Object>(aObject)->data()->name().c_str();
         }
         case ParamsFolder:
           return tr("Parameters") + QString(" (%1)").arg(rowCount(theIndex));
@@ -273,14 +273,14 @@ QVariant XGUI_PartDataModel::data(const QModelIndex& theIndex, int theRole) cons
           ObjectPtr aObject = partDocument()->object(ModelAPI_ResultParameters::group(),
                                                      theIndex.row());
           if (aObject)
-            return boost::dynamic_pointer_cast<ModelAPI_Object>(aObject)->data()->name().c_str();
+            return std::dynamic_pointer_cast<ModelAPI_Object>(aObject)->data()->name().c_str();
         }
           break;
         case ConstructObject: {
           ObjectPtr aObject = partDocument()->object(ModelAPI_ResultConstruction::group(),
                                                      theIndex.row());
           if (aObject)
-            return boost::dynamic_pointer_cast<ModelAPI_Object>(aObject)->data()->name().c_str();
+            return std::dynamic_pointer_cast<ModelAPI_Object>(aObject)->data()->name().c_str();
         }
           break;
         case BodiesObject: {
@@ -326,7 +326,7 @@ QVariant XGUI_PartDataModel::data(const QModelIndex& theIndex, int theRole) cons
         }
         case HistoryObject: {
           ObjectPtr aObject = partDocument()->object(ModelAPI_Feature::group(), theIndex.row() - 4);
-          FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aObject);
+          FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObject);
           if (aFeature)
             return QIcon(XGUI_Workshop::featureIcon(aFeature->getKind()));
         }
@@ -447,7 +447,7 @@ DocumentPtr XGUI_PartDataModel::partDocument() const
 {
   DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
   ObjectPtr aObject = aRootDoc->object(ModelAPI_ResultPart::group(), myId);
-  ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
+  ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
   if (aPart)
     return aPart->partDoc();
   return DocumentPtr(); // null if not found
@@ -507,7 +507,7 @@ ResultPartPtr XGUI_PartDataModel::part() const
 {
   DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
   ObjectPtr aObj = aRootDoc->object(ModelAPI_ResultPart::group(), myId);
-  return boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
+  return std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
 }
 
 QModelIndex XGUI_PartDataModel::objectIndex(const ObjectPtr& theObject) const
index a8e6201781f11e64f74b68f46ca90b39c7c74396..ac4f00e87fa2946ff616230ae2a44c3a090b17a3 100644 (file)
@@ -10,7 +10,7 @@
 QEvent::Type PostponeMessageQtEvent::PostponeMessageQtEventType = QEvent::Type(QEvent::registerEventType());
 
 
-boost::shared_ptr<Events_Message> PostponeMessageQtEvent::postponedMessage()
+std::shared_ptr<Events_Message> PostponeMessageQtEvent::postponedMessage()
 {
   return myMessage;
 }
index 4fdb3385744e7c20eb504db6ffc7f5acd3d3213e..5c389fade4036fe81a0926b68b98a6fc50900027 100644 (file)
@@ -21,7 +21,7 @@ class XGUI_EXPORT PostponeMessageQtEvent : public QEvent
  public:
   static QEvent::Type PostponeMessageQtEventType;
 
-  PostponeMessageQtEvent(const boost::shared_ptr<Events_Message>& theMessage)
+  PostponeMessageQtEvent(const std::shared_ptr<Events_Message>& theMessage)
       : QEvent(PostponeMessageQtEventType),
       myMessage(theMessage)
   {
@@ -31,10 +31,10 @@ class XGUI_EXPORT PostponeMessageQtEvent : public QEvent
     return PostponeMessageQtEventType;
   }
 
-  boost::shared_ptr<Events_Message> postponedMessage();
+  std::shared_ptr<Events_Message> postponedMessage();
 
  private:
-  boost::shared_ptr<Events_Message> myMessage;
+  std::shared_ptr<Events_Message> myMessage;
 };
 
 #endif /* XGUI_QEVENTS_H_ */
index 95a219c6ae9bd3b5bede0e4c26eb7b7c9139b026..84e43abf37a498af1a52a8c1a7e768d1747af2f4 100644 (file)
@@ -76,7 +76,7 @@ std::string featureInfo(FeaturePtr theFeature)
  if (theFeature->data()) {
  return theFeature;
  } else {
- ObjectPtr aObject = boost::dynamic_pointer_cast<ModelAPI_Object>(theFeature);
+ ObjectPtr aObject = std::dynamic_pointer_cast<ModelAPI_Object>(theFeature);
  return aObject->featureRef();
  }
  }*/
index 518d5e597f1da4c01ce8788164f6b4aaf108a40c..cc80b28be6408b9e2e15dda760bd5179cab6ccb1 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <ModelAPI_Feature.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 /*!
  \brief Return directory part of the file path.
index 12e6bb7b37eea54deb7d68da9449a2a487e27c58..12f3a4767fc4a1921fe71165269af02b57e70aed 100644 (file)
@@ -256,7 +256,7 @@ XGUI_Workbench* XGUI_Workshop::addWorkbench(const QString& theName)
 }
 
 //******************************************************
-void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMessage)
+void XGUI_Workshop::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
   if (QApplication::instance()->thread() != QThread::currentThread()) {
     #ifdef _DEBUG
@@ -270,8 +270,8 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
 
   //A message to start feature creation received.
   if (theMessage->eventID() == Events_Loop::loop()->eventByName(Config_FeatureMessage::GUI_EVENT())) {
-    boost::shared_ptr<Config_FeatureMessage> aFeatureMsg =
-       boost::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
+    std::shared_ptr<Config_FeatureMessage> aFeatureMsg =
+       std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
     if (!aFeatureMsg->isInternal()) {
       addFeature(aFeatureMsg);
     }
@@ -279,8 +279,8 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
 
   // Process creation of Part
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     onFeatureCreatedMsg(aUpdMsg);
     if (myUpdatePrefs) {
       if (mySalomeConnector)
@@ -294,22 +294,22 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
 
   // Redisplay feature
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     onFeatureRedisplayMsg(aUpdMsg);
   }
 
   //Update property panel on corresponding message. If there is no current operation (no
   //property panel), or received message has different feature to the current - do nothing.
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     onFeatureUpdatedMsg(anUpdateMsg);
   }
 
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)) {
-    boost::shared_ptr<ModelAPI_ObjectDeletedMessage> aDelMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectDeletedMessage> aDelMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
     onObjectDeletedMsg(aDelMsg);
   }
 
@@ -321,8 +321,8 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
   }
 
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TOSHOW)) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     const std::set<ObjectPtr>& aObjList = anUpdateMsg->objects();
     QList<ObjectPtr> aList;
     std::set<ObjectPtr>::const_iterator aIt;
@@ -332,8 +332,8 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
   }
 
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TOHIDE)) {
-    boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
-        boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+    std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
+        std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     const std::set<ObjectPtr>& aObjList = anUpdateMsg->objects();
     QList<ObjectPtr> aList;
     std::set<ObjectPtr>::const_iterator aIt;
@@ -344,8 +344,8 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
 
   //An operation passed by message. Start it, process and commit.
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OPERATION_LAUNCHED)) {
-    boost::shared_ptr<Config_PointerMessage> aPartSetMsg =
-        boost::dynamic_pointer_cast<Config_PointerMessage>(theMessage);
+    std::shared_ptr<Config_PointerMessage> aPartSetMsg =
+        std::dynamic_pointer_cast<Config_PointerMessage>(theMessage);
     //myPropertyPanel->cleanContent();
     ModuleBase_Operation* anOperation = (ModuleBase_Operation*) aPartSetMsg->pointer();
 
@@ -371,7 +371,7 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
     }
     std::string aGrpName = ModelAPI_ResultPart::group();
     for (int i = 0; i < aDoc->size(aGrpName); i++) {
-      ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aDoc->object(aGrpName, i));
+      ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aDoc->object(aGrpName, i));
       if (aPart->partDoc() == aActiveDoc) {
         activatePart(aPart); // Activate a part which corresponds to active Doc
         return;
@@ -382,7 +382,7 @@ void XGUI_Workshop::processEvent(const boost::shared_ptr<Events_Message>& theMes
 
   } else {
     //Show error dialog if error message received.
-    boost::shared_ptr<Events_Error> anAppError = boost::dynamic_pointer_cast<Events_Error>(theMessage);
+    std::shared_ptr<Events_Error> anAppError = std::dynamic_pointer_cast<Events_Error>(theMessage);
     if (anAppError) {
       emit errorOccurred(QString::fromLatin1(anAppError->description()));
     }
@@ -404,7 +404,7 @@ void XGUI_Workshop::onStartWaiting()
 }
 
 //******************************************************
-void XGUI_Workshop::onFeatureUpdatedMsg(const boost::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
+void XGUI_Workshop::onFeatureUpdatedMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
 {
   std::set<ObjectPtr> aFeatures = theMsg->objects();
   if (myOperationMgr->hasOperation()) {
@@ -424,7 +424,7 @@ void XGUI_Workshop::onFeatureUpdatedMsg(const boost::shared_ptr<ModelAPI_ObjectU
 }
 
 //******************************************************
-void XGUI_Workshop::onFeatureRedisplayMsg(const boost::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
+void XGUI_Workshop::onFeatureRedisplayMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
 {
   std::set<ObjectPtr> aObjects = theMsg->objects();
   std::set<ObjectPtr>::const_iterator aIt;
@@ -433,7 +433,7 @@ void XGUI_Workshop::onFeatureRedisplayMsg(const boost::shared_ptr<ModelAPI_Objec
     ObjectPtr aObj = (*aIt);
     bool aHide = !aObj->data() || !aObj->data()->isValid();
     if (!aHide) { // check that this is not hidden result
-      ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(aObj);
+      ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
       aHide = aRes && aRes->isConcealed();
     }
     if (aHide)
@@ -465,7 +465,7 @@ void XGUI_Workshop::onFeatureRedisplayMsg(const boost::shared_ptr<ModelAPI_Objec
 }
 
 //******************************************************
-void XGUI_Workshop::onFeatureCreatedMsg(const boost::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
+void XGUI_Workshop::onFeatureCreatedMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
 {
   std::set<ObjectPtr> aObjects = theMsg->objects();
 
@@ -473,7 +473,7 @@ void XGUI_Workshop::onFeatureCreatedMsg(const boost::shared_ptr<ModelAPI_ObjectU
   bool aHasPart = false;
   bool isDisplayed = false;
   for (aIt = aObjects.begin(); aIt != aObjects.end(); ++aIt) {
-    ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(*aIt);
+    ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aIt);
     if (aPart) {
       aHasPart = true;
       // If a feature is created from the aplication's python console  
@@ -496,7 +496,7 @@ void XGUI_Workshop::onFeatureCreatedMsg(const boost::shared_ptr<ModelAPI_ObjectU
 }
 
 //******************************************************
-void XGUI_Workshop::onObjectDeletedMsg(const boost::shared_ptr<ModelAPI_ObjectDeletedMessage>& theMsg)
+void XGUI_Workshop::onObjectDeletedMsg(const std::shared_ptr<ModelAPI_ObjectDeletedMessage>& theMsg)
 {
   if (myObjectBrowser)
     myObjectBrowser->processEvent(theMsg);
@@ -561,7 +561,7 @@ bool XGUI_Workshop::event(QEvent * theEvent)
 {
   PostponeMessageQtEvent* aPostponedEv = dynamic_cast<PostponeMessageQtEvent*>(theEvent);
   if (aPostponedEv) {
-    boost::shared_ptr<Events_Message> aEventPtr = aPostponedEv->postponedMessage();
+    std::shared_ptr<Events_Message> aEventPtr = aPostponedEv->postponedMessage();
     processEvent(aEventPtr);
     return true;
   }
@@ -571,7 +571,7 @@ bool XGUI_Workshop::event(QEvent * theEvent)
 /*
  *
  */
-void XGUI_Workshop::addFeature(const boost::shared_ptr<Config_FeatureMessage>& theMessage)
+void XGUI_Workshop::addFeature(const std::shared_ptr<Config_FeatureMessage>& theMessage)
 {
   if (!theMessage) {
 #ifdef _DEBUG
@@ -831,7 +831,7 @@ void XGUI_Workshop::onRebuild()
     aMgr->startOperation();
   }
   static const Events_ID aRebuildEvent = Events_Loop::loop()->eventByName("Rebuild");
-  Events_Loop::loop()->send(boost::shared_ptr<Events_Message>(
+  Events_Loop::loop()->send(std::shared_ptr<Events_Message>(
     new Events_Message(aRebuildEvent, this)));
   if (!aWasOperation) {
     aMgr->finishOperation();
@@ -1080,7 +1080,7 @@ void XGUI_Workshop::changeCurrentDocument(ObjectPtr theObj)
 {
   SessionPtr aMgr = ModelAPI_Session::get();
   if (theObj) {
-    ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(theObj);
+    ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(theObj);
     if (aPart) {
       DocumentPtr aPartDoc = aPart->partDoc();
       if (aPartDoc) {
@@ -1109,7 +1109,7 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked)
 {
   QList<ObjectPtr> aObjects = mySelector->selection()->selectedObjects();
   if ((theId == "ACTIVATE_PART_CMD") && (aObjects.size() > 0)) {
-    ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aObjects.first());
+    ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObjects.first());
     activatePart(aPart);
   } else if (theId == "DEACTIVATE_PART_CMD")
     activatePart(ResultPartPtr());
@@ -1170,7 +1170,7 @@ void XGUI_Workshop::activateLastPart()
   DocumentPtr aDoc = aMgr->moduleDocument();
   std::string aGrpName = ModelAPI_ResultPart::group();
   ObjectPtr aLastPart = aDoc->object(aGrpName, aDoc->size(aGrpName) - 1);
-  ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aLastPart);
+  ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aLastPart);
   if (aPart) {
     activatePart(aPart);
   }
@@ -1189,7 +1189,7 @@ void XGUI_Workshop::deleteObjects(const QList<ObjectPtr>& theList)
     aMgr->startOperation();
     foreach (ObjectPtr aObj, theList)
     {
-      ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
+      ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
       if (aPart) {
         DocumentPtr aDoc = aPart->document();
         if (aDoc == aMgr->activeDocument()) {
@@ -1197,7 +1197,7 @@ void XGUI_Workshop::deleteObjects(const QList<ObjectPtr>& theList)
         }
         //aMgr->moduleDocument()->removeFeature(aPart->owner());
       } else {
-        FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
+        FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
         if (aFeature)
           aObj->document()->removeFeature(aFeature);
       }
@@ -1212,7 +1212,7 @@ void XGUI_Workshop::showObjects(const QList<ObjectPtr>& theList, bool isVisible)
 {
   foreach (ObjectPtr aObj, theList)
   {
-    ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(aObj);
+    ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
     if (aRes) {
       if (isVisible) {
         myDisplayer->display(aRes, false);
@@ -1287,7 +1287,7 @@ void XGUI_Workshop::displayAllResults()
   displayDocumentResults(aRootDoc);
   for (int i = 0; i < aRootDoc->size(ModelAPI_ResultPart::group()); i++) {
     ObjectPtr aObject = aRootDoc->object(ModelAPI_ResultPart::group(), i);
-    ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
+    ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
     displayDocumentResults(aPart->partDoc());
   }
   myDisplayer->updateViewer();
index 764e19f2d626079bbe01ce7dffca429f9ddd32ba..43751c0dd17154f22097769b8a595f7126402529 100644 (file)
@@ -105,7 +105,7 @@ Q_OBJECT
   XGUI_Workbench* addWorkbench(const QString& theName);
 
   //! Redefinition of Events_Listener method
-  virtual void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
   //! Returns an object which provides interface to Salome Module (LightApp_Module)
   XGUI_SalomeConnector* salomeConnector() const
@@ -219,13 +219,13 @@ signals:
  protected:
   bool event(QEvent * theEvent);
   //Event-loop processing methods:
-  void addFeature(const boost::shared_ptr<Config_FeatureMessage>&);
+  void addFeature(const std::shared_ptr<Config_FeatureMessage>&);
   void connectWithOperation(ModuleBase_Operation* theOperation);
 
-  void onFeatureUpdatedMsg(const boost::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg);
-  void onFeatureCreatedMsg(const boost::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg);
-  void onFeatureRedisplayMsg(const boost::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg);
-  void onObjectDeletedMsg(const boost::shared_ptr<ModelAPI_ObjectDeletedMessage>& theMsg);
+  void onFeatureUpdatedMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg);
+  void onFeatureCreatedMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg);
+  void onFeatureRedisplayMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg);
+  void onObjectDeletedMsg(const std::shared_ptr<ModelAPI_ObjectDeletedMessage>& theMsg);
 
   void validateOperation(const QString& theOperationId);