#include "XGUI_ViewerPrs.h"
+#include "SelectMgr_EntityOwner.hxx"
+
XGUI_ViewerPrs::XGUI_ViewerPrs()
{
}
-XGUI_ViewerPrs::XGUI_ViewerPrs(boost::shared_ptr<ModelAPI_Feature> 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)
{
}
{
}
-void XGUI_ViewerPrs::setFeature(boost::shared_ptr<ModelAPI_Feature> 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<ModelAPI_Feature> 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;
+}