#include <TDataStd_Integer.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <TDataStd_ReferenceList.hxx>
-#include <TDataStd_Name.hxx>
#include <TDataStd_UAttribute.hxx>
#include <TDataStd_AsciiString.hxx>
{
QString aRes;
- Handle(TDataStd_AsciiString) anAsciiStr;
- if ( myLab.FindChild( DataTag_FilePath ).FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) )
- aRes = QString( anAsciiStr->Get().ToCString() );
+ TDF_Label aLabel = myLab.FindChild( DataTag_FilePath, false );
+ if ( !aLabel.IsNull() )
+ {
+ Handle(TDataStd_AsciiString) anAsciiStr;
+ if ( aLabel.FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) )
+ aRes = QString( anAsciiStr->Get().ToCString() );
+ }
return aRes;
}
ClearReferenceObjects( 0 );
}
-void HYDROData_Image::SetOperatorName(const QString theOpName)
+void HYDROData_Image::SetOperatorName( const QString theOpName )
{
- TDataStd_Name::Set(myLab.FindChild(DataTag_Operator),
- TCollection_ExtendedString(theOpName.toLatin1().constData()));
+ TCollection_AsciiString anAsciiStr( theOpName.toStdString().c_str() );
+ TDataStd_AsciiString::Set( myLab.FindChild( DataTag_Operator ), anAsciiStr );
}
QString HYDROData_Image::OperatorName() const
{
- Handle(TDataStd_Name) aName;
- if (myLab.FindChild(DataTag_Operator).
- FindAttribute(TDataStd_Name::GetID(), aName)) {
- TCollection_AsciiString aStr(aName->Get());
- return QString(aStr.ToCString());
+ QString aRes;
+
+ TDF_Label aLabel = myLab.FindChild( DataTag_Operator, false );
+ if ( !aLabel.IsNull() )
+ {
+ Handle(TDataStd_AsciiString) anAsciiStr;
+ if ( aLabel.FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) )
+ aRes = QString( anAsciiStr->Get().ToCString() );
}
- return QString();
+
+ return aRes;
}
void HYDROData_Image::SetArgs(const QByteArray& theArgs)