#define HYDROData_LANDCOVER_MAP_HeaderFile
#include <HYDROData_Entity.h>
+#include <TDataStd_ExtStringArray.hxx>
DEFINE_STANDARD_HANDLE( HYDROData_LandCoverMap, HYDROData_Entity )
class TopoDS_Face;
-class TopoDS_Shell;
-class Handle( HYDROData_Polyline );
+class TopoDS_Shape;
+class TopoDS_Iterator;
+class TopTools_ListOfShape;
+class Handle( HYDROData_PolylineXY );
class Handle( HYDROData_Object );
+class HYDROData_MapOfFaceToStricklerType;
class HYDROData_LandCoverMap : public HYDROData_Entity
{
DataTag_Types,
};
+public:
+ class Iterator
+ {
+ public:
+ Iterator( const HYDROData_LandCoverMap& );
+ Iterator( const Handle( HYDROData_LandCoverMap )& );
+ ~Iterator();
+
+ void Init( const HYDROData_LandCoverMap& );
+ bool More() const;
+ void Next();
+
+ TopoDS_Face Face() const;
+ QString StricklerType() const;
+
+ private:
+ TopoDS_Iterator* myIterator;
+ int myIndex;
+ Handle(TDataStd_ExtStringArray) myArray;
+ };
+
HYDROData_LandCoverMap();
~HYDROData_LandCoverMap();
- int GetNbFaces() const;
- TopoDS_Face GetFace( int theIndex ) const;
-
- QString GetStricklerType( int theIndex ) const;
- void SetStricklerType( int theIndex, const QString& theType );
+ virtual const ObjectKind GetKind() const;
bool ImportQGIS( const QString& theFileName );
bool ExportQGIS( const QString& theFileName ) const;
bool ExportTelemac( const QString& theFileName ) const;
bool Add( const Handle( HYDROData_Object )&, const QString& theType );
- bool Add( const Handle( HYDROData_Polyline )&, const QString& theType );
+ bool Add( const Handle( HYDROData_PolylineXY )&, const QString& theType );
- bool Remove( int theIndex );
+ bool Remove( const TopoDS_Face& );
+ bool Remove( const TopTools_ListOfShape& );
- bool Split( const Handle( HYDROData_Polyline )& );
- bool Merge( const QList<int>&, const QString& theType );
+ bool Split( const Handle( HYDROData_PolylineXY )& );
+ bool Merge( const TopTools_ListOfShape&, const QString& theType );
protected:
- TopoDS_Shell GetShape() const;
- void SetShape( const TopoDS_Shell& );
+ TopoDS_Shape GetShape() const;
+ void SetShape( const TopoDS_Shape& );
+
+ bool LocalPartition( const TopoDS_Shape&, const QString& theNewType );
+ void StoreLandCovers( const HYDROData_MapOfFaceToStricklerType& );
public:
DEFINE_STANDARD_RTTI( HYDROData_LandCoverMap );
+
+private:
+ friend class Iterator;
+ friend class test_HYDROData_LandCoverMap;
};
#endif