1 #include <HYDROData_Object.h>
3 #include <TDataStd_Name.hxx>
4 #include <TDF_CopyLabel.hxx>
6 IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,MMgt_TShared)
7 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,MMgt_TShared)
9 // is equal function for unique object mapping
10 bool IsEqual(const Handle_HYDROData_Object& theObj1, const Handle_HYDROData_Object& theObj2)
12 return (theObj1->ID() == theObj2->ID());
15 QString HYDROData_Object::GetName() const
17 Handle(TDataStd_Name) aName;
18 if (myLab.FindAttribute(TDataStd_Name::GetID(), aName)) {
19 TCollection_AsciiString aStr(aName->Get());
20 return QString(aStr.ToCString());
25 void HYDROData_Object::SetName(const QString& theName)
27 TDataStd_Name::Set(myLab, TCollection_ExtendedString(theName.toLatin1().constData()));
30 bool HYDROData_Object::IsRemoved() const
32 return !myLab.HasAttribute();
35 void HYDROData_Object::Remove()
37 return myLab.ForgetAllAttributes(Standard_True);
40 HYDROData_Object::HYDROData_Object()
44 HYDROData_Object::~HYDROData_Object()
48 void HYDROData_Object::CopyTo(Handle_HYDROData_Object theDestination) const
50 TDF_CopyLabel aCopy(myLab, theDestination->Label());
54 void HYDROData_Object::SetLabel(TDF_Label theLabel)