X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ViewerPrs.cpp;h=f280905a7bcc43887875fcac30154e019c74238b;hb=5b8faa76d601d5dace07f2184378cc85b9e52438;hp=4ab8801aa1f124151bff9b5aa9edbc13267e57af;hpb=507f658f34fc6c42f48fb83a8fa916c6f0e33fd3;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ViewerPrs.cpp b/src/XGUI/XGUI_ViewerPrs.cpp index 4ab8801aa..f280905a7 100644 --- a/src/XGUI/XGUI_ViewerPrs.cpp +++ b/src/XGUI/XGUI_ViewerPrs.cpp @@ -4,13 +4,16 @@ #include "XGUI_ViewerPrs.h" +#include "SelectMgr_EntityOwner.hxx" + XGUI_ViewerPrs::XGUI_ViewerPrs() { } -XGUI_ViewerPrs::XGUI_ViewerPrs(boost::shared_ptr theFeature, - const TopoDS_Shape& theShape) -: myFeature(theFeature), myShape(theShape) +XGUI_ViewerPrs::XGUI_ViewerPrs(FeaturePtr theFeature, + const TopoDS_Shape& theShape, + Handle(SelectMgr_EntityOwner) theOwner) +: myFeature(theFeature), myShape(theShape), myOwner(theOwner) { } @@ -18,22 +21,40 @@ XGUI_ViewerPrs::~XGUI_ViewerPrs() { } -void XGUI_ViewerPrs::setFeature(boost::shared_ptr theFeature) +void XGUI_ViewerPrs::setFeature(FeaturePtr theFeature) { myFeature = theFeature; } -void XGUI_ViewerPrs::setShape(const TopoDS_Shape& theShape) +FeaturePtr XGUI_ViewerPrs::feature() const { - myShape = theShape; + return myFeature; } -boost::shared_ptr XGUI_ViewerPrs::feature() const +void XGUI_ViewerPrs::setOwner(Handle(SelectMgr_EntityOwner) theOwner) { - return myFeature; + myOwner = theOwner; +} + +Handle(SelectMgr_EntityOwner) XGUI_ViewerPrs::owner() const +{ + return myOwner; +} + +void XGUI_ViewerPrs::setShape(const TopoDS_Shape& theShape) +{ + myShape = theShape; } const TopoDS_Shape& XGUI_ViewerPrs::shape() const { return myShape; } + +bool XGUI_ViewerPrs::operator==(const XGUI_ViewerPrs& thePrs) +{ + bool aFeature = (myFeature.get() == thePrs.feature().get()); + bool aOwner = (myOwner.Access() == thePrs.owner().Access()); + bool aShape = myShape.IsEqual(thePrs.shape()); + return aFeature && aOwner && aShape; +}