From: sbh Date: Tue, 13 May 2014 11:40:42 +0000 (+0400) Subject: Merge branch 'master' of newgeom:newgeom.git X-Git-Tag: V_0.2~65^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef0c6c6af8bec0578a0e8f7f12871e02988d4374;hp=c1383b05a42a6c61259e0cd847587c02e4a6fbbd;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom.git --- diff --git a/src/GeomData/GeomData_Dir.cpp b/src/GeomData/GeomData_Dir.cpp index 5090a0626..070e94562 100644 --- a/src/GeomData/GeomData_Dir.cpp +++ b/src/GeomData/GeomData_Dir.cpp @@ -17,7 +17,7 @@ void GeomData_Dir::setValue(const double theX, const double theY, const double t myCoords->SetValue(1, theY); myCoords->SetValue(2, theZ); static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } } diff --git a/src/GeomData/GeomData_Point.cpp b/src/GeomData/GeomData_Point.cpp index faf24fe99..6ad2ac564 100644 --- a/src/GeomData/GeomData_Point.cpp +++ b/src/GeomData/GeomData_Point.cpp @@ -16,7 +16,7 @@ void GeomData_Point::setValue(const double theX, const double theY, const double myCoords->SetValue(1, theY); myCoords->SetValue(2, theZ); static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } } diff --git a/src/GeomData/GeomData_Point2D.cpp b/src/GeomData/GeomData_Point2D.cpp index bbf3e55fb..8af702953 100644 --- a/src/GeomData/GeomData_Point2D.cpp +++ b/src/GeomData/GeomData_Point2D.cpp @@ -14,7 +14,7 @@ void GeomData_Point2D::setValue(const double theX, const double theY) myCoords->SetValue(0, theX); myCoords->SetValue(1, theY); static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } } diff --git a/src/Model/Model_AttributeDocRef.cpp b/src/Model/Model_AttributeDocRef.cpp index 82492e2d6..93c8af713 100644 --- a/src/Model/Model_AttributeDocRef.cpp +++ b/src/Model/Model_AttributeDocRef.cpp @@ -16,7 +16,7 @@ void Model_AttributeDocRef::setValue(boost::shared_ptr theDoc myComment->Set(TCollection_ExtendedString(theDoc->id().c_str())); static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } } diff --git a/src/Model/Model_AttributeDouble.cpp b/src/Model/Model_AttributeDouble.cpp index 13b4c97c6..88b4352a5 100644 --- a/src/Model/Model_AttributeDouble.cpp +++ b/src/Model/Model_AttributeDouble.cpp @@ -13,7 +13,7 @@ void Model_AttributeDouble::setValue(const double theValue) if (myReal->Get() != theValue) { myReal->Set(theValue); static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } } diff --git a/src/Model/Model_AttributeRefAttr.cpp b/src/Model/Model_AttributeRefAttr.cpp index a74bb11ba..2d7a1bd5e 100644 --- a/src/Model/Model_AttributeRefAttr.cpp +++ b/src/Model/Model_AttributeRefAttr.cpp @@ -19,9 +19,9 @@ bool Model_AttributeRefAttr::isFeature() void Model_AttributeRefAttr::setAttr(boost::shared_ptr theAttr) { boost::shared_ptr aData = - boost::dynamic_pointer_cast(theAttr->feature()->data()); + boost::dynamic_pointer_cast(theAttr->owner()->data()); string anID = aData->id(theAttr); - if (feature() == theAttr->feature() && myID->Get().IsEqual(anID.c_str())) + if (feature() == theAttr->owner() && myID->Get().IsEqual(anID.c_str())) return; // nothing is changed myRef->Set(aData->label()); @@ -53,7 +53,7 @@ void Model_AttributeRefAttr::setFeature(boost::shared_ptr theF myID->Set(""); // feature is identified by the empty ID static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } } @@ -62,7 +62,7 @@ boost::shared_ptr Model_AttributeRefAttr::feature() { if (myRef->Get() != myRef->Label()) { // initialized boost::shared_ptr aDoc = - boost::dynamic_pointer_cast(feature()->document()); + boost::dynamic_pointer_cast(owner()->document()); if (aDoc) { TDF_Label aRefLab = myRef->Get(); TDF_Label aFeatureLab = aRefLab.Father(); diff --git a/src/Model/Model_AttributeRefList.cpp b/src/Model/Model_AttributeRefList.cpp index 0366e0a77..f6520fce8 100644 --- a/src/Model/Model_AttributeRefList.cpp +++ b/src/Model/Model_AttributeRefList.cpp @@ -19,7 +19,7 @@ void Model_AttributeRefList::append(boost::shared_ptr theFeatu myRef->Append(aData->label()); static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } @@ -40,7 +40,7 @@ list > Model_AttributeRefList::list() { std::list< boost::shared_ptr > aResult; boost::shared_ptr aDoc = - boost::dynamic_pointer_cast(feature()->document()); + boost::dynamic_pointer_cast(owner()->document()); if (aDoc) { const TDF_LabelList& aList = myRef->List(); for(TDF_ListIteratorOfLabelList aLIter(aList); aLIter.More(); aLIter.Next()) { diff --git a/src/Model/Model_AttributeReference.cpp b/src/Model/Model_AttributeReference.cpp index ab247fdc9..105639b74 100644 --- a/src/Model/Model_AttributeReference.cpp +++ b/src/Model/Model_AttributeReference.cpp @@ -18,14 +18,14 @@ void Model_AttributeReference::setValue(boost::shared_ptr theF boost::dynamic_pointer_cast(theFeature->data()); if (myRef.IsNull()) { boost::shared_ptr aMyData = - boost::dynamic_pointer_cast(feature()->data()); + boost::dynamic_pointer_cast(owner()->data()); TDF_Reference::Set(aMyData->label(), aData->label()); } else { myRef->Set(aData->label()); } static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED); - Model_FeatureUpdatedMessage aMsg(feature(), anEvent); + Model_FeatureUpdatedMessage aMsg(owner(), anEvent); Events_Loop::loop()->send(aMsg); } } @@ -34,7 +34,7 @@ boost::shared_ptr Model_AttributeReference::value() { if (!myRef.IsNull()) { boost::shared_ptr aDoc = - boost::dynamic_pointer_cast(feature()->document()); + boost::dynamic_pointer_cast(owner()->document()); if (aDoc) { TDF_Label aRefLab = myRef->Get(); return aDoc->feature(aRefLab); diff --git a/src/ModelAPI/ModelAPI_Attribute.h b/src/ModelAPI/ModelAPI_Attribute.h index d00bbc76a..acea353df 100644 --- a/src/ModelAPI/ModelAPI_Attribute.h +++ b/src/ModelAPI/ModelAPI_Attribute.h @@ -32,7 +32,7 @@ public: {myFeature = theFeature;} /// Returns the owner of this attribute - MODELAPI_EXPORT const boost::shared_ptr& feature() + MODELAPI_EXPORT const boost::shared_ptr& owner() {return myFeature;} protected: /// Objects are created for features automatically