Salome HOME
55783a21d1556bc5af17b4c736b06cc0f59f63a4
[modules/hydro.git] / src / HYDROData / HYDROData_LandCoverMap.cxx
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 #include "HYDROData_LandCoverMap.h"
20 #include <TDataStd_ExtStringArray.hxx>
21 #include <TopoDS_Face.hxx>
22 #include <TopoDS_Shell.hxx>
23 #include <QString>
24
25 IMPLEMENT_STANDARD_HANDLE(HYDROData_LandCoverMap, HYDROData_Entity)
26 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_LandCoverMap, HYDROData_Entity)
27
28 HYDROData_LandCoverMap::HYDROData_LandCoverMap()
29 {
30 }
31
32 HYDROData_LandCoverMap::~HYDROData_LandCoverMap()
33 {
34 }
35
36 int HYDROData_LandCoverMap::GetNbFaces() const
37 {
38   //TODO
39   return 0;
40 }
41
42 TopoDS_Face HYDROData_LandCoverMap::GetFace( int theIndex ) const
43 {
44   //TODO
45   return TopoDS_Face();
46 }
47
48 QString HYDROData_LandCoverMap::GetStricklerType( int theIndex ) const
49 {
50   Handle(TDataStd_ExtStringArray) aTypesArray;
51   if( !myLab.FindChild( DataTag_Types ).FindAttribute( TDataStd_ExtStringArray::GetID(), aTypesArray ) )
52     return "";
53
54   TCollection_ExtendedString aType = aTypesArray->Value( theIndex );
55   TCollection_AsciiString anAscii = aType;
56   return anAscii.ToCString();
57 }
58
59 void HYDROData_LandCoverMap::SetStricklerType( int theIndex, const QString& theType )
60 {
61   Handle(TDataStd_ExtStringArray) aTypesArray;
62   if( !myLab.FindChild( DataTag_Types ).FindAttribute( TDataStd_ExtStringArray::GetID(), aTypesArray ) )
63     return;
64
65   std::string aType = theType.toStdString();
66   aTypesArray->SetValue( theIndex, aType.c_str() );
67 }
68
69 bool HYDROData_LandCoverMap::ImportQGIS( const QString& theFileName )
70 {
71   //TODO
72   return false;
73 }
74
75 bool HYDROData_LandCoverMap::ExportQGIS( const QString& theFileName ) const
76 {
77   //TODO
78   return false;
79 }
80
81 bool HYDROData_LandCoverMap::ExportTelemac( const QString& theFileName ) const
82 {
83   //TODO
84   return false;
85 }
86
87 bool HYDROData_LandCoverMap::Add( const Handle( HYDROData_Object )&, const QString& theType )
88 {
89   //TODO
90   return false;
91 }
92
93 bool HYDROData_LandCoverMap::Add( const Handle( HYDROData_Polyline )&, const QString& theType )
94 {
95   //TODO
96   return false;
97 }
98
99 bool HYDROData_LandCoverMap::Add( const TopoDS_Face&, const QString& theType )
100 {
101   //TODO
102   return false;
103 }
104
105 bool HYDROData_LandCoverMap::Remove( int theIndex )
106 {
107   //TODO
108   return false;
109 }
110
111 bool HYDROData_LandCoverMap::Split( const Handle( HYDROData_Polyline )& )
112 {
113   //TODO
114   return false;
115 }
116
117 bool HYDROData_LandCoverMap::Merge( const QList<int>&, const QString& theType )
118 {
119   //TODO
120   return false;
121 }
122
123 TopoDS_Shell HYDROData_LandCoverMap::GetShape() const
124 {
125   //TODO
126   return TopoDS_Shell();
127 }
128
129 void HYDROData_LandCoverMap::SetShape( const TopoDS_Shell& )
130 {
131   //TODO
132 }