Salome HOME
Dump to python corrected.
[modules/hydro.git] / src / HYDROData / HYDROData_Stream.cxx
index d01c043d7f5e5479cb0941d7b3dfff3fab6e9852..f06f4c29b8473b035d61a65be9ae4f43f28c9ee8 100644 (file)
@@ -85,9 +85,22 @@ HYDROData_Stream::~HYDROData_Stream()
 
 QStringList HYDROData_Stream::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
-  QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+  QStringList aResList = dumpObjectCreation( theTreatedObjects );
+  QString aName = GetObjPyName();
 
-  // TODO
+  Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
+  setPythonReferenceObject( theTreatedObjects, aResList, aHydAxis, "SetHydraulicAxis" );
+
+  HYDROData_SequenceOfObjects aSeqOfProfiles = GetProfiles();
+  for ( int i = 1, aNb = aSeqOfProfiles.Size(); i <= aNb; ++i )
+  {
+    const Handle(HYDROData_Entity) aProfile = aSeqOfProfiles.Value( i );
+    setPythonReferenceObject( theTreatedObjects, aResList, aProfile, "AddProfile" );
+  }
+
+  aResList << QString( "" );
+  aResList << QString( "%1.Update();" ).arg( aName );
+  aResList << QString( "" );
 
   return aResList;
 }