Salome HOME
export of 3D poly to SHP (lot 5)
[modules/hydro.git] / src / HYDROData / HYDROData_Iterator.cxx
index a52f932836fc2536b5be1dc6cba83c9ea9cc86c2..46212c31953d1c34354d63f8efa442fe52cddda1 100644 (file)
 #include "HYDROData_CalculationCase.h"
 #include "HYDROData_Channel.h"
 #include "HYDROData_Confluence.h"
-#include "HYDROData_DummyObject3D.h"
 #include "HYDROData_Digue.h"
-#include "HYDROData_ShapesGroup.h"
+#include "HYDROData_DummyObject3D.h"
 #include "HYDROData_Image.h"
 #include "HYDROData_ImmersibleZone.h"
+#include "HYDROData_LandCoverMap.h"
 #include "HYDROData_Obstacle.h"
 #include "HYDROData_ObstacleAltitude.h"
+#include "HYDROData_ChannelAltitude.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_SplittedShapesGroup.h"
+#include "HYDROData_ShapesGroup.h"
+#include "HYDROData_SplitShapesGroup.h"
 #include "HYDROData_Stream.h"
 #include "HYDROData_StreamAltitude.h"
+#include "HYDROData_VisualState.h"
 #include "HYDROData_Zone.h"
 #include "HYDROData_StricklerTable.h"
-#include "HYDROData_LandCover.h"
-
+#include "HYDROData_DTM.h"
+#include "HYDROData_BCPolygon.h"
 #include <TDataStd_Name.hxx>
 #include <TDataStd_NamedData.hxx>
 
 #include <NCollection_DataMap.hxx>
 
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
 //! Returns label by root objects kind and the kind of the object
 static TDF_Label GetLabelByKind(TDF_Label theRoot, ObjectKind theKind)
 {
@@ -101,7 +106,7 @@ Handle(HYDROData_Entity) HYDROData_Iterator::CreateObject( TDF_Label&        the
 
   Handle(TDataStd_NamedData) aNamedData;
   theNewLabel.FindAttribute( TDataStd_NamedData::GetID(), aNamedData );
-  aNamedData->SetInteger( "ObjectKind", theObjectKind );
+  aNamedData->SetInteger( "ObjectKind", theObjectKind ); //??CAF
 
   return Object( theNewLabel );
 }
@@ -128,6 +133,7 @@ Handle(HYDROData_Entity) HYDROData_Iterator::Object( const TDF_Label& theLabel )
   
   switch( aKind )
   {
+    DEBTRACE("HYDROData_Iterator::Object " << aKind);
     case KIND_IMAGE:              aResult = new HYDROData_Image();                break;
     case KIND_POLYLINE:           aResult = new HYDROData_Polyline3D();           break;
     case KIND_BATHYMETRY:         aResult = new HYDROData_Bathymetry();           break;
@@ -148,12 +154,16 @@ 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;
     case KIND_SHAPES_GROUP:       aResult = new HYDROData_ShapesGroup();          break;
-    case KIND_SPLITTED_GROUP:     aResult = new HYDROData_SplittedShapesGroup();  break;
+    case KIND_SPLIT_GROUP:        aResult = new HYDROData_SplitShapesGroup();     break;
     case KIND_STREAM_ALTITUDE:    aResult = new HYDROData_StreamAltitude();       break;
     case KIND_OBSTACLE_ALTITUDE:  aResult = new HYDROData_ObstacleAltitude();     break;
     case KIND_STRICKLER_TABLE:    aResult = new HYDROData_StricklerTable();       break;
-    case KIND_LAND_COVER:         aResult = new HYDROData_LandCover();            break;
-    default:                                                                      break;
+    case KIND_LAND_COVER_OBSOLETE: break;
+    case KIND_CHANNEL_ALTITUDE:   aResult = new HYDROData_ChannelAltitude();      break;
+    case KIND_LAND_COVER_MAP:     aResult = new HYDROData_LandCoverMap();         break;
+    case KIND_DTM:                aResult = new HYDROData_DTM();                  break;
+    case KIND_BC_POLYGON:         aResult = new HYDROData_BCPolygon();            break;
+    default:                       break;
   }
 
   if ( !aResult.IsNull() )