]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Common part of dump to python is moved to HYDROData_Entity.
authorrkv <rkv@opencascade.com>
Wed, 15 Jan 2014 10:46:23 +0000 (10:46 +0000)
committerrkv <rkv@opencascade.com>
Wed, 15 Jan 2014 10:46:23 +0000 (10:46 +0000)
20 files changed:
src/HYDROData/HYDROData_AltitudeObject.cxx
src/HYDROData/HYDROData_Bathymetry.cxx
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_Channel.cxx
src/HYDROData/HYDROData_Confluence.cxx
src/HYDROData/HYDROData_Digue.cxx
src/HYDROData/HYDROData_Entity.cxx
src/HYDROData/HYDROData_Entity.h
src/HYDROData/HYDROData_Image.cxx
src/HYDROData/HYDROData_ImmersibleZone.cxx
src/HYDROData/HYDROData_Obstacle.cxx
src/HYDROData/HYDROData_ObstacleAltitude.cxx
src/HYDROData/HYDROData_Polyline3D.cxx
src/HYDROData/HYDROData_PolylineXY.cxx
src/HYDROData/HYDROData_Profile.cxx
src/HYDROData/HYDROData_Region.cxx
src/HYDROData/HYDROData_River.cxx
src/HYDROData/HYDROData_Stream.cxx
src/HYDROData/HYDROData_StreamAltitude.cxx
src/HYDROData/HYDROData_Zone.cxx

index 8c140e43bce74ab3c0f67469b560a8b74df83646..941582f90dc12c569d0109cb427094331a8a643a 100644 (file)
@@ -18,7 +18,7 @@ HYDROData_AltitudeObject::~HYDROData_AltitudeObject()
 
 QStringList HYDROData_AltitudeObject::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
   QString anAltitudeName = GetName();
 
   // TODO
index 86f403fd3e51a1b679752f86866e794ea7dc93e2..7ac8a23762e49f32211bf8d08b93184cc35a0a45 100644 (file)
@@ -40,7 +40,7 @@ HYDROData_Bathymetry::~HYDROData_Bathymetry()
 
 QStringList HYDROData_Bathymetry::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
   QString aBathymetryName = GetName();
 
   aResList << QString( "%1.SetAltitudesInverted( %2 );" )
index eb3026c0e12c2efc5366d3ccf2838e1f66c812f6..a6bc84e7a9bc3bea726a8ca5867207bec517fe42 100644 (file)
@@ -102,7 +102,7 @@ void HYDROData_CalculationCase::SetName( const QString& theName )
 
 QStringList HYDROData_CalculationCase::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
   QString aCalculName = GetName();
 
   HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
index 9a564715193850561724737c056f47eb86fde99a..b2e9d1ccaf333e7b83f27ddb7d3063cfec7c894d 100644 (file)
@@ -45,7 +45,7 @@ HYDROData_Channel::~HYDROData_Channel()
 
 QStringList HYDROData_Channel::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index fd2535e537cf9d63fd3617b5592758adb5d0c1d0..5d20481c3a822ecada5e24b8146a55304ccfb6b7 100644 (file)
@@ -22,7 +22,7 @@ HYDROData_Confluence::~HYDROData_Confluence()
 
 QStringList HYDROData_Confluence::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index f63247e1125525c94bc99dcba0cc686387680f78..8fb46694a37b6f4f9b7db6bbcdbf52d8b5e529f0 100644 (file)
@@ -23,7 +23,7 @@ HYDROData_Digue::~HYDROData_Digue()
 
 QStringList HYDROData_Digue::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index 8931dfe61fa3faeda3d7c24ea0a7eab1944cf30b..2e194aa976d180cc95e89397ead2a637bf803a7f 100644 (file)
@@ -49,6 +49,12 @@ void HYDROData_Entity::SetName(const QString& theName)
 }
 
 QStringList HYDROData_Entity::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
+{
+  QStringList anEmptyList;
+  return anEmptyList;
+}
+
+QStringList HYDROData_Entity::dumpObjectCreation( MapOfTreatedObjects& theTreatedObjects ) const
 {
   QStringList aResList;
 
index d0a9088dbd1e62fc4c0e455ddfb841f48f3aac71..a0af6b11e1d2a50d979411cb7aec74a9fa856ca6 100644 (file)
@@ -328,6 +328,16 @@ protected:
                                  const Handle(HYDROData_Entity)& theRefObject,
                                  const QString&                  theMethod ) const;
 
+  /**
+   * Dump the initial object creation to a Python script.
+   * You should call it from DumpToPython implementation before 
+   * dumping fields of the object.
+   */
+  QStringList dumpObjectCreation( MapOfTreatedObjects& theTreatedObjects ) const;
+
+  /**
+   * Returns an object type name as a string for dumping to Python.
+   */
   QString HYDROData_Entity::getPyTypeID() const;
 
 protected:
index 88e1a3b0bea3c9ca21fe8606582f576ed017aa85..108ba6423376de5e85fe0770c329df86571a041e 100644 (file)
@@ -39,7 +39,7 @@ HYDROData_Image::~HYDROData_Image()
 
 QStringList HYDROData_Image::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
   QString anImageName = GetName();
 
   QString aFilePath = GetFilePath();
index 20424a3351674971733bc47a193319448912fd67..69cfebddb62a427bf78febfa141b28d78ef53c7f 100644 (file)
@@ -42,7 +42,7 @@ HYDROData_ImmersibleZone::~HYDROData_ImmersibleZone()
 
 QStringList HYDROData_ImmersibleZone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
   QString aZoneName = GetName();
 
   QColor aFillingColor = GetFillingColor();
index 370b80c7deafbc2b55ff3e69fbf417382663208b..5572a892024d6d53856251a2b60da0396d277f24 100644 (file)
@@ -52,7 +52,7 @@ HYDROData_Obstacle::~HYDROData_Obstacle()
 
 QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index d74ea473e034c42ac0d28f2340a594823c359009..0b62773b7ad4f7d374835652bab6647433f51137 100644 (file)
@@ -18,7 +18,7 @@ HYDROData_ObstacleAltitude::~HYDROData_ObstacleAltitude()
 
 QStringList HYDROData_ObstacleAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index 2cc3e3af4869104e00421585c82663cc6ff8c6c6..3931be8f1bd8a1544054836b3d7975b90e79a018 100644 (file)
@@ -33,7 +33,7 @@ HYDROData_Polyline3D::~HYDROData_Polyline3D()
 
 QStringList HYDROData_Polyline3D::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index 65cd2e00625cac57b5e25a161ec1c6c6ec3a66eb..f462bff3e378a59f308e24c76cecb83f5c9863b6 100755 (executable)
@@ -106,7 +106,7 @@ HYDROData_PolylineXY::~HYDROData_PolylineXY()
 
 QStringList HYDROData_PolylineXY::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
   QString aPolylineName = GetName();
 
   // Set polilyne data
index 50228619b33228a2464f82713bf4fa669ba11087..03c6ba856d899438800d28680cc2ddc9b5ee8e71 100755 (executable)
@@ -42,7 +42,7 @@ HYDROData_Profile::~HYDROData_Profile()
 
 QStringList HYDROData_Profile::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   //TODO
 
index 8c19d65e635fe91b4d1b4298a7871752b3048d53..b5e05cb7e779dc7403f9303924f987c6d0190f5e 100644 (file)
@@ -43,7 +43,7 @@ HYDROData_Region::~HYDROData_Region()
 
 QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
   QString aRegionName = GetName();
 
   HYDROData_SequenceOfObjects aZones = GetZones();
index 851b5322a13f8e2b32e7a2730dfe7e6de5692e79..27be9ea99109af1c31da2b0da07c1be0ba51b113 100644 (file)
@@ -22,7 +22,7 @@ HYDROData_River::~HYDROData_River()
 
 QStringList HYDROData_River::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index d01c043d7f5e5479cb0941d7b3dfff3fab6e9852..07bf9971d8766716400f9259232a658b484eab71 100644 (file)
@@ -85,7 +85,7 @@ HYDROData_Stream::~HYDROData_Stream()
 
 QStringList HYDROData_Stream::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index dc51dbe17cceca24207276c81e2bc911cdadd192..bbcbb566e4f26ac0848811878b90f3d5f9f25d5b 100644 (file)
@@ -46,7 +46,7 @@ HYDROData_StreamAltitude::~HYDROData_StreamAltitude()
 
 QStringList HYDROData_StreamAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   // TODO
 
index 752af3af858b3432b20e140cc550194a1f55bb4c..f90f02873d021154215d5a7f5f194dbea5b8a0df 100644 (file)
@@ -30,7 +30,7 @@ HYDROData_Zone::~HYDROData_Zone()
 
 QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
 
   HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
   HYDROData_SequenceOfObjects::Iterator aGeomObjsIter( aGeomObjects );