From: sbh Date: Tue, 25 Nov 2014 09:10:42 +0000 (+0300) Subject: Merge branch 'master' of newgeom:newgeom.git into BR_PYTHON_PLUGIN X-Git-Tag: V_0.7.0_rc1~57^2~3^2~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=35a88fdd724349275bbff32b9596a44e7cd422e2;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom.git into BR_PYTHON_PLUGIN Conflicts: src/ModelAPI/ModelAPI.i src/ModelAPI/ModelAPI_Session.cpp --- 35a88fdd724349275bbff32b9596a44e7cd422e2 diff --cc src/Events/Events_Loop.cpp index 189516ae0,9447c376b..f9ccd81ec --- a/src/Events/Events_Loop.cpp +++ b/src/Events/Events_Loop.cpp @@@ -119,12 -119,10 +119,12 @@@ void Events_Loop::flush(const Events_ID myGroups.find(theID.eventText()); if (aMyGroup != myGroups.end()) { // really sends myFlushed.insert(theID.myID); - boost::shared_ptr aGroup = aMyGroup->second; + std::shared_ptr aGroup = aMyGroup->second; myGroups.erase(aMyGroup); send(aGroup, false); - myFlushed.erase(myFlushed.find(theID.myID)); + std::set::iterator anIt = myFlushed.find(theID.myID); + if (anIt != myFlushed.end()) + myFlushed.erase(myFlushed.find(theID.myID)); } } diff --cc src/ModelAPI/ModelAPI.i index cc31faa0f,3017bac28..d1ffd5643 --- a/src/ModelAPI/ModelAPI.i +++ b/src/ModelAPI/ModelAPI.i @@@ -52,14 -48,9 +57,14 @@@ %include "typemaps.i" %include "std_string.i" %include "std_list.i" + %include "std_shared_ptr.i" +// directors +%feature("director") ModelAPI_Plugin; +%feature("director") ModelAPI_Object; +%feature("director") ModelAPI_Feature; + - // boost pointers - %include "boost_shared_ptr.i" + // shared pointers // For ModelAPI_ResultConstruction.shape() %shared_ptr(GeomAPI_Interface) %shared_ptr(GeomAPI_Shape) @@@ -112,29 -108,17 +124,37 @@@ %include "ModelAPI_ResultConstruction.h" %include "ModelAPI_ResultBody.h" %include "ModelAPI_ResultPart.h" + %include "ModelAPI_ResultGroup.h" + %include "ModelAPI_ResultParameters.h" + %include "ModelAPI_Tools.h" - %template(ObjectList) std::list >; - %template(ResultList) std::list >; + %template(ObjectList) std::list >; + %template(ResultList) std::list >; +template boost::shared_ptr boost_cast(boost::shared_ptr theObject); + +// Feature casts - %template(modelAPI_Feature) boost_cast; - %template(modelAPI_CompositeFeature) boost_cast; ++%template(modelAPI_Feature) shared_ptr_cast; ++%template(modelAPI_CompositeFeature) shared_ptr_cast; + template std::shared_ptr shared_ptr_cast(std::shared_ptr theObject); + %template(modelAPI_CompositeFeature) shared_ptr_cast; + %template(modelAPI_ResultConstruction) shared_ptr_cast; + %template(modelAPI_ResultBody) shared_ptr_cast; + %template(modelAPI_ResultPart) shared_ptr_cast; +// Result casts +%template(modelAPI_ResultConstruction) boost_cast; +%template(modelAPI_ResultBody) boost_cast; +%template(modelAPI_ResultPart) boost_cast; +// Attribute casts +%template(modelAPI_AttributeDocRef) boost_cast; +%template(modelAPI_AttributeDouble) boost_cast; +%template(modelAPI_AttributeInteger) boost_cast; +%template(modelAPI_AttributeString) boost_cast; +%template(modelAPI_AttributeReference) boost_cast; +%template(modelAPI_AttributeRefAttr) boost_cast; +%template(modelAPI_AttributeBoolean) boost_cast; +%template(modelAPI_AttributeSelection) boost_cast; +%template(modelAPI_AttributeSelectionList) boost_cast; +%template(modelAPI_AttributeRefList) boost_cast; diff --cc src/ModelAPI/ModelAPI_Session.cpp index ccb0c8f52,c7b784d3a..29c251031 --- a/src/ModelAPI/ModelAPI_Session.cpp +++ b/src/ModelAPI/ModelAPI_Session.cpp @@@ -42,9 -42,13 +42,9 @@@ using namespace std #endif /// Manager that will be initialized from Model package, one per application - boost::shared_ptr MY_MANAGER; + std::shared_ptr MY_MANAGER; - void ModelAPI_Session::setSession(boost::shared_ptr theManager) -ModelAPI_Session::ModelAPI_Session() -{ -} - + void ModelAPI_Session::setSession(std::shared_ptr theManager) { MY_MANAGER = theManager; }