#include <OSD_Timer.hxx>
#endif
-#define PYTHON_BATHYMETRY_ID "KIND_BATHYMETRY"
-
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Bathymetry, HYDROData_IAltitudeObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Bathymetry, HYDROData_IAltitudeObject)
QStringList HYDROData_Bathymetry::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aBathymetryName = GetName();
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aBathymetryName ).arg( aDocName ).arg( PYTHON_BATHYMETRY_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aBathymetryName ).arg( aBathymetryName );
-
aResList << QString( "%1.SetAltitudesInverted( %2 );" )
.arg( aBathymetryName ).arg( IsAltitudesInverted() );
TCollection_AsciiString aFilePath = GetFilePath();
- if ( !aFilePath.IsEmpty() )
- {
- aResList << QString( "%1.ImportFromFile( \"%2\" );" )
- .arg( aBathymetryName ).arg( aFilePath.ToCString() );
- }
- else
- {
- // TODO : bathymetry is composed from other bathymetry(ies)
- }
+ aResList << QString( "%1.ImportFromFile( \"%2\" );" )
+ .arg( aBathymetryName ).arg( aFilePath.ToCString() );
return aResList;
}