Salome HOME
new attributes in the Strickler table
[modules/hydro.git] / src / HYDROData / HYDROData_LandCoverMap.h
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 #ifndef HYDROData_LANDCOVER_MAP_HeaderFile
20 #define HYDROData_LANDCOVER_MAP_HeaderFile
21
22 #include <HYDROData_Entity.h>
23
24 DEFINE_STANDARD_HANDLE( HYDROData_LandCoverMap, HYDROData_Entity )
25
26 class TopoDS_Face;
27 class TopoDS_Shell;
28 class Handle( HYDROData_Polyline );
29 class Handle( HYDROData_Object );
30
31 class HYDROData_LandCoverMap : public HYDROData_Entity
32 {
33 protected:
34   friend class HYDROData_Iterator;
35
36   enum DataTag
37   {
38     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
39     DataTag_Shape,                                         ///< the shape presentation of the land cover map
40     DataTag_Types,
41   };
42
43   HYDROData_LandCoverMap();
44   ~HYDROData_LandCoverMap();
45
46   int GetNbFaces() const;
47   TopoDS_Face GetFace( int theIndex ) const;
48
49   QString GetStricklerType( int theIndex ) const;
50   void SetStricklerType( int theIndex, const QString& theType );
51
52   bool ImportQGIS( const QString& theFileName );
53   bool ExportQGIS( const QString& theFileName ) const;
54   bool ExportTelemac( const QString& theFileName ) const;
55
56   bool Add( const Handle( HYDROData_Object )&, const QString& theType );
57   bool Add( const Handle( HYDROData_Polyline )&, const QString& theType );
58
59   bool Remove( int theIndex );
60
61   bool Split( const Handle( HYDROData_Polyline )& );
62   bool Merge( const QList<int>&, const QString& theType );
63
64 protected:
65   TopoDS_Shell GetShape() const;
66   void SetShape( const TopoDS_Shell& );
67   bool Add( const TopoDS_Face&, const QString& theType );
68
69 public:
70   DEFINE_STANDARD_RTTI( HYDROData_LandCoverMap );
71 };
72
73 #endif