void HYDROData_Entity::SetLabel( const TDF_Label& theLabel )
{
- myLab = theLabel;
+ myLab = theLabel;
}
void HYDROData_Entity::SaveByteArray( const int theTag,
return anAttr->Get();
}
+
+bool HYDROData_Entity::CompareLabels(const Handle(HYDROData_Entity)& theOtherObj)
+{
+ if ( !theOtherObj.IsNull() )
+ return this->Label() == theOtherObj->Label();
+ return false;
+}
+
* \param theTag tag of a label that keeps the attribute (for 0 this is myLab)
*/
void ClearReferenceObjects( const int theTag = 0 );
+
+public:
+
+ virtual bool CompareLabels(const Handle(HYDROData_Entity)& theOtherObj);
protected:
#include <TopoDS_Shape.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_Real.hxx>
-#include <TDF_Tool.hxx>
#include <QColor>
{
Handle(HYDROData_ShapesGroup) aGroup =
Handle(HYDROData_ShapesGroup)::DownCast( aGroups.Value( i ) );
-
- TCollection_AsciiString entry1;
- TDF_Tool::Entry(aGroup->Label(),entry1);
-
- TCollection_AsciiString entry2;
- TDF_Tool::Entry(theGroup->Label(),entry2);
-
- if ( entry1.IsEqual (entry2)/*IsEqual( theGroup, aGroup )*/ ) {
+ if ( theGroup->CompareLabels ( aGroup ) )
+ {
aRes = i - 1;
break;
}