#include <QStringList>
-#define PYTHON_ALTITUDE_ID "KIND_ALTITUDE"
-
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_AltitudeObject, HYDROData_IAltitudeObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_AltitudeObject, HYDROData_IAltitudeObject)
QStringList HYDROData_AltitudeObject::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 = HYDROData_Entity::DumpToPython( theTreatedObjects );
QString anAltitudeName = GetName();
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( anAltitudeName ).arg( aDocName ).arg( PYTHON_ALTITUDE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( anAltitudeName ).arg( anAltitudeName );
-
// TODO
return aResList;
#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 = HYDROData_Entity::DumpToPython( 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;
}
#define CALCULATION_ZONES_PREF GetName() + "_Zone"
#define CALCULATION_GROUPS_PREF GetName() + "_"
-#define PYTHON_CALCULATION_ID "KIND_CALCULATION"
-
#define EXPORT_NAME "HYDRO_" + GetName()
IMPLEMENT_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
QStringList HYDROData_CalculationCase::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 = HYDROData_Entity::DumpToPython( theTreatedObjects );
QString aCalculName = GetName();
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aCalculName ).arg( aDocName ).arg( PYTHON_CALCULATION_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aCalculName ).arg( aCalculName );
- aResList << QString( "" );
-
HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
HYDROData_SequenceOfObjects::Iterator anIter( aGeomObjects );
for ( ; anIter.More(); anIter.Next() )
#include <QColor>
#include <QStringList>
-#define PYTHON_CHANNEL_ID "KIND_CHANNEL"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Channel,HYDROData_ArtificialObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Channel,HYDROData_ArtificialObject)
QStringList HYDROData_Channel::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aChannelName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aChannelName ).arg( aDocName ).arg( PYTHON_CHANNEL_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aChannelName ).arg( aChannelName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
#include <QStringList>
-#define PYTHON_CONFLUENCE_ID "KIND_CONFLUENCE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Confluence,HYDROData_NaturalObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Confluence,HYDROData_NaturalObject)
QStringList HYDROData_Confluence::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aConfluenceName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aConfluenceName ).arg( aDocName ).arg( PYTHON_CONFLUENCE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aConfluenceName ).arg( aConfluenceName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
#include <QColor>
#include <QStringList>
-#define PYTHON_DIGUE_ID "KIND_DIGUE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Digue,HYDROData_Channel)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Digue,HYDROData_Channel)
QStringList HYDROData_Digue::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aDigueName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aDigueName ).arg( aDocName ).arg( PYTHON_DIGUE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aDigueName ).arg( aDigueName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
QStringList HYDROData_Entity::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList anEmptyList;
- return anEmptyList;
+ QStringList aResList;
+
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ if ( aDocument.IsNull() )
+ return aResList;
+
+ QString aDocName = aDocument->GetDocPyName();
+ QString aName = GetName();
+
+ aResList << QString( "%1 = %2.CreateObject( %3 );" )
+ .arg( aName ).arg( aDocName ).arg( getPyTypeID() );
+ aResList << QString( "%1.SetName( \"%2\" );" )
+ .arg( aName ).arg( aName );
+ aResList << QString( "" );
+
+ return aResList;
}
void HYDROData_Entity::Update()
SetToUpdate( false );
}
+QString HYDROData_Entity::getPyTypeID() const
+{
+ switch( GetKind() )
+ {
+ case KIND_IMAGE: return "KIND_IMAGE";
+ case KIND_POLYLINE: return "KIND_POLYLINE";
+ case KIND_BATHYMETRY: return "KIND_BATHYMETRY";
+ case KIND_ALTITUDE: return "KIND_ALTITUDE";
+ case KIND_IMMERSIBLE_ZONE: return "KIND_IMMERSIBLE_ZONE";
+ case KIND_RIVER: return "KIND_RIVER";
+ case KIND_STREAM: return "KIND_STREAM";
+ case KIND_CONFLUENCE: return "KIND_CONFLUENCE";
+ case KIND_CHANNEL: return "KIND_CHANNEL";
+ case KIND_OBSTACLE: return "KIND_OBSTACLE";
+ case KIND_DIGUE: return "KIND_DIGUE";
+ case KIND_PROFILE: return "KIND_PROFILE";
+ case KIND_PROFILEUZ: return "KIND_PROFILEUZ";
+ case KIND_POLYLINEXY: return "KIND_POLYLINEXY";
+ case KIND_CALCULATION: return "KIND_CALCULATION";
+ case KIND_ZONE: return "KIND_ZONE";
+ case KIND_REGION: return "KIND_REGION";
+ case KIND_VISUAL_STATE: return "KIND_VISUAL_STATE";
+ case KIND_ARTIFICIAL_OBJECT: return "KIND_ARTIFICIAL_OBJECT";
+ case KIND_NATURAL_OBJECT: return "KIND_NATURAL_OBJECT";
+ case KIND_DUMMY_3D: return "KIND_DUMMY_3D";
+ case KIND_SHAPES_GROUP: return "KIND_SHAPES_GROUP";
+ case KIND_SPLITTED_GROUP: return "KIND_SPLITTED_GROUP";
+ case KIND_STREAM_ALTITUDE: return "KIND_STREAM_ALTITUDE";
+ case KIND_OBSTACLE_ALTITUDE: return "KIND_OBSTACLE_ALTITUDE";
+ default: return "KIND_UNKNOWN"; ///! Unrecognized object
+ }
+}
+
QVariant HYDROData_Entity::GetDataVariant()
{
return QVariant();
QStringList& theScript,
const Handle(HYDROData_Entity)& theRefObject,
const QString& theMethod ) const;
+
+ QString HYDROData_Entity::getPyTypeID() const;
+
protected:
Handle(TDataStd_ReferenceList) getReferenceList( const int theTag,
static const Standard_GUID GUID_HAS_LOCAL_POINTS("FD8841AA-FC44-42fa-B6A7-0F682CCC6F27");
static const Standard_GUID GUID_HAS_GLOBAL_POINTS("330D0E81-742D-4ea3-92D4-484877CFA7C1");
-#define PYTHON_IMAGE_ID "KIND_IMAGE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Image, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Image, HYDROData_Entity)
QStringList HYDROData_Image::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 = HYDROData_Entity::DumpToPython( theTreatedObjects );
QString anImageName = GetName();
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( anImageName ).arg( aDocName ).arg( PYTHON_IMAGE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( anImageName ).arg( anImageName );
-
QString aFilePath = GetFilePath();
if ( !aFilePath.isEmpty() )
{
#include <QColor>
#include <QStringList>
-#define PYTHON_IMMERSIBLE_ZONE_ID "KIND_IMMERSIBLE_ZONE"
//#define HYDRODATA_IMZONE_DEB 1
IMPLEMENT_STANDARD_HANDLE(HYDROData_ImmersibleZone,HYDROData_NaturalObject)
QStringList HYDROData_ImmersibleZone::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 = HYDROData_Entity::DumpToPython( theTreatedObjects );
QString aZoneName = GetName();
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aZoneName ).arg( aDocName ).arg( PYTHON_IMMERSIBLE_ZONE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aZoneName ).arg( aZoneName );
- aResList << QString( "" );
-
QColor aFillingColor = GetFillingColor();
aResList << QString( "filling_color = QColor( %1, %2, %3, %4 );" )
.arg( aFillingColor.red() ).arg( aFillingColor.green() )
#include <HYDROData_Projection.h>
-#define PYTHON_OBSTACLE_ID "KIND_OBSTACLE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Obstacle,HYDROData_ArtificialObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Obstacle,HYDROData_ArtificialObject)
QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString anObstacleName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( anObstacleName ).arg( aDocName ).arg( PYTHON_OBSTACLE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( anObstacleName ).arg( anObstacleName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
#include <QStringList>
-#define PYTHON_OBSTACLE_ALTITUDE_ID "KIND_OBSTACLE_ALTITUDE"
-
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject)
QStringList HYDROData_ObstacleAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString anAltitudeName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( anAltitudeName ).arg( aDocName ).arg( PYTHON_OBSTACLE_ALTITUDE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( anAltitudeName ).arg( anAltitudeName );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
#include <QColor>
#include <QStringList>
-#define PYTHON_POLYLINE_ID "KIND_POLYLINE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Polyline3D,HYDROData_Object)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Polyline3D,HYDROData_Object)
QStringList HYDROData_Polyline3D::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aPolylineName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aPolylineName ).arg( aDocName ).arg( PYTHON_POLYLINE_ID );
- aResList << QString( "%1.SetName( \"%1\" );" ).arg( aPolylineName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
static const Standard_GUID GUID_IS_UNEDITABLE("e5799736-9030-4051-91a4-2e58321fa153");
-#define PYTHON_POLYLINEXY_ID "KIND_POLYLINEXY"
-
const double LOCAL_SELECTION_TOLERANCE = 0.0001;
TCollection_AsciiString getUniqueSectionName( const NCollection_Sequence<TCollection_AsciiString>& theNamesSeq )
QStringList HYDROData_PolylineXY::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 = HYDROData_Entity::DumpToPython( theTreatedObjects );
QString aPolylineName = GetName();
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aPolylineName ).arg( aDocName ).arg( PYTHON_POLYLINEXY_ID );
- aResList << QString( "%1.SetName( \"%1\" );" ).arg( aPolylineName );
-
// Set polilyne data
NCollection_Sequence<TCollection_AsciiString> aSectNames;
NCollection_Sequence<HYDROData_PolylineXY::SectionType> aSectTypes;
#include <QColor>
#include <QStringList>
-#define PYTHON_PROFILE_ID "KIND_PROFILE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Profile, HYDROData_Object)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Profile, HYDROData_Object)
QStringList HYDROData_Profile::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aProfileName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aProfileName ).arg( aDocName ).arg( PYTHON_PROFILE_ID );
- aResList << QString( "%1.SetName( \"%1\" );" ).arg( aProfileName );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+
+ //TODO
return aResList;
}
#include <QStringList>
-#define PYTHON_REGION_ID "KIND_REGION"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity)
QStringList HYDROData_Region::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 = HYDROData_Entity::DumpToPython( theTreatedObjects );
QString aRegionName = GetName();
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aRegionName ).arg( aDocName ).arg( PYTHON_REGION_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aRegionName ).arg( aRegionName );
- aResList << QString( "" );
-
HYDROData_SequenceOfObjects aZones = GetZones();
HYDROData_SequenceOfObjects::Iterator anIter( aZones );
for ( ; anIter.More(); anIter.Next() )
#include <QStringList>
-#define PYTHON_RIVER_ID "KIND_RIVER"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_River,HYDROData_NaturalObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_River,HYDROData_NaturalObject)
QStringList HYDROData_River::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aRiverName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aRiverName ).arg( aDocName ).arg( PYTHON_RIVER_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aRiverName ).arg( aRiverName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
#include <TCollection_AsciiString.hxx>
#endif
-#define PYTHON_STREAM_ID "KIND_STREAM"
-
typedef NCollection_DataMap<Standard_Real, Handle(HYDROData_Profile)> HYDROData_DataMapOfRealOfHDProfile;
IMPLEMENT_STANDARD_HANDLE(HYDROData_Stream,HYDROData_NaturalObject)
QStringList HYDROData_Stream::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aStreamName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aStreamName ).arg( aDocName ).arg( PYTHON_STREAM_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aStreamName ).arg( aStreamName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
#include <QStringList>
-#define PYTHON_STREAM_ALTITUDE_ID "KIND_STREAM_ALTITUDE"
-
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_StreamAltitude, HYDROData_IAltitudeObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_StreamAltitude, HYDROData_IAltitudeObject)
QStringList HYDROData_StreamAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString anAltitudeName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( anAltitudeName ).arg( aDocName ).arg( PYTHON_STREAM_ALTITUDE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( anAltitudeName ).arg( anAltitudeName );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
// TODO
#include <TDataStd_Integer.hxx>
-#define PYTHON_ZONE_ID "KIND_ZONE"
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity)
QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return aResList;
-
- QString aDocName = aDocument->GetDocPyName();
- QString aZoneName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aZoneName ).arg( aDocName ).arg( PYTHON_ZONE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aZoneName ).arg( aZoneName );
- aResList << QString( "" );
+ QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
HYDROData_SequenceOfObjects::Iterator aGeomObjsIter( aGeomObjects );