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.
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.
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
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #include "HYDROData_LandCoverMap.h"
20 #include <TDataStd_ExtStringArray.hxx>
21 #include <TopoDS_Face.hxx>
22 #include <TopoDS_Shell.hxx>
25 IMPLEMENT_STANDARD_HANDLE(HYDROData_LandCoverMap, HYDROData_Entity)
26 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_LandCoverMap, HYDROData_Entity)
28 HYDROData_LandCoverMap::HYDROData_LandCoverMap()
32 HYDROData_LandCoverMap::~HYDROData_LandCoverMap()
36 int HYDROData_LandCoverMap::GetNbFaces() const
42 TopoDS_Face HYDROData_LandCoverMap::GetFace( int theIndex ) const
48 QString HYDROData_LandCoverMap::GetStricklerType( int theIndex ) const
50 Handle(TDataStd_ExtStringArray) aTypesArray;
51 if( !myLab.FindChild( DataTag_Types ).FindAttribute( TDataStd_ExtStringArray::GetID(), aTypesArray ) )
54 TCollection_ExtendedString aType = aTypesArray->Value( theIndex );
55 TCollection_AsciiString anAscii = aType;
56 return anAscii.ToCString();
59 void HYDROData_LandCoverMap::SetStricklerType( int theIndex, const QString& theType )
61 Handle(TDataStd_ExtStringArray) aTypesArray;
62 if( !myLab.FindChild( DataTag_Types ).FindAttribute( TDataStd_ExtStringArray::GetID(), aTypesArray ) )
65 std::string aType = theType.toStdString();
66 aTypesArray->SetValue( theIndex, aType.c_str() );
69 bool HYDROData_LandCoverMap::ImportQGIS( const QString& theFileName )
75 bool HYDROData_LandCoverMap::ExportQGIS( const QString& theFileName ) const
81 bool HYDROData_LandCoverMap::ExportTelemac( const QString& theFileName ) const
87 bool HYDROData_LandCoverMap::Add( const Handle( HYDROData_Object )&, const QString& theType )
93 bool HYDROData_LandCoverMap::Add( const Handle( HYDROData_Polyline )&, const QString& theType )
99 bool HYDROData_LandCoverMap::Add( const TopoDS_Face&, const QString& theType )
105 bool HYDROData_LandCoverMap::Remove( int theIndex )
111 bool HYDROData_LandCoverMap::Split( const Handle( HYDROData_Polyline )& )
117 bool HYDROData_LandCoverMap::Merge( const QList<int>&, const QString& theType )
123 TopoDS_Shell HYDROData_LandCoverMap::GetShape() const
126 return TopoDS_Shell();
129 void HYDROData_LandCoverMap::SetShape( const TopoDS_Shell& )