Salome HOME
Comments moved.
[modules/hydro.git] / src / HYDROData / HYDROData_Iterator.cxx
index 43ab980c2160ac02064a835ec6eaabb96588caa1..4d61c1508263c44df27d31b156bc3c198548cee5 100644 (file)
@@ -3,12 +3,22 @@
 
 #include "HYDROData_AltitudeObject.h"
 #include "HYDROData_Bathymetry.h"
-#include "HYDROData_Calculation.h"
+#include "HYDROData_CalculationCase.h"
+#include "HYDROData_Channel.h"
+#include "HYDROData_Confluence.h"
+#include "HYDROData_DummyObject3D.h"
+#include "HYDROData_Digue.h"
 #include "HYDROData_Image.h"
 #include "HYDROData_ImmersibleZone.h"
-#include "HYDROData_Polyline.h"
+#include "HYDROData_Obstacle.h"
+#include "HYDROData_Polyline3D.h"
+#include "HYDROData_PolylineXY.h"
+#include "HYDROData_Profile.h"
+#include "HYDROData_ProfileUZ.h"
 #include "HYDROData_VisualState.h"
 #include "HYDROData_Region.h"
+#include "HYDROData_River.h"
+#include "HYDROData_Stream.h"
 #include "HYDROData_Zone.h"
 
 #include <TDataStd_Name.hxx>
@@ -23,9 +33,10 @@ static TDF_Label GetLabelByKind(TDF_Label theRoot, ObjectKind theKind)
   return theRoot.FindChild(theKind);
 }
 
-HYDROData_Iterator::HYDROData_Iterator(Handle(HYDROData_Document) theDoc, ObjectKind theKind)
-  : myIter(GetLabelByKind(theDoc->LabelOfObjects(), theKind), 
-           TDataStd_Name::GetID(), theKind == KIND_UNKNOWN) // iterate all sub-objects for unknown kind
+HYDROData_Iterator::HYDROData_Iterator( const Handle(HYDROData_Document)& theDoc,
+                                        const ObjectKind                  theKind )
+: myIter( GetLabelByKind( theDoc->LabelOfObjects(), theKind ), 
+          TDataStd_Name::GetID(), theKind == KIND_UNKNOWN ) // iterate all sub-objects for unknown kind
 {
 }
 
@@ -98,7 +109,7 @@ Handle(HYDROData_Entity) HYDROData_Iterator::Object( const TDF_Label& theLabel )
       aResult = new HYDROData_Image();
       break;
     case KIND_POLYLINE:
-      aResult = new HYDROData_Polyline();
+      aResult = new HYDROData_Polyline3D();
       break;
     case KIND_BATHYMETRY:
       aResult = new HYDROData_Bathymetry();
@@ -109,8 +120,35 @@ Handle(HYDROData_Entity) HYDROData_Iterator::Object( const TDF_Label& theLabel )
     case KIND_IMMERSIBLE_ZONE:
       aResult = new HYDROData_ImmersibleZone();
       break;
+    case KIND_RIVER:
+      aResult = new HYDROData_River();
+      break;
+    case KIND_STREAM:
+      aResult = new HYDROData_Stream();
+      break;
+    case KIND_CONFLUENCE:
+      aResult = new HYDROData_Confluence();
+      break;
+    case KIND_CHANNEL:
+      aResult = new HYDROData_Channel();
+      break;
+    case KIND_OBSTACLE:
+      aResult = new HYDROData_Obstacle();
+      break;
+    case KIND_DIGUE:
+      aResult = new HYDROData_Digue();
+      break;
+    case KIND_PROFILE:
+      aResult = new HYDROData_Profile();
+      break;
+    case KIND_PROFILEUZ:
+      aResult = new HYDROData_ProfileUZ();
+      break;
+    case KIND_POLYLINEXY:
+      aResult = new HYDROData_PolylineXY();
+      break;
     case KIND_CALCULATION:
-      aResult = new HYDROData_Calculation();
+      aResult = new HYDROData_CalculationCase();
       break;
     case KIND_REGION:
       aResult = new HYDROData_Region();
@@ -121,6 +159,9 @@ Handle(HYDROData_Entity) HYDROData_Iterator::Object( const TDF_Label& theLabel )
     case KIND_VISUAL_STATE:
       aResult = new HYDROData_VisualState();
       break;
+    case KIND_DUMMY_3D:
+      aResult = new HYDROData_DummyObject3D();
+      break;
     default:
       break;
   }