]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_LandCover.h
Salome HOME
refs #567: further implementation of the data object.
[modules/hydro.git] / src / HYDROData / HYDROData_LandCover.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_HeaderFile
20 #define HYDROData_LANDCOVER_HeaderFile
21
22 #include <HYDROData_Entity.h>
23
24 DEFINE_STANDARD_HANDLE( HYDROData_LandCover, HYDROData_Entity )
25
26 class TopoDS_Shape;
27
28 class HYDROData_LandCover : public HYDROData_Entity
29 {
30 protected:
31   friend class HYDROData_Iterator;
32
33   enum DataTag
34   {
35     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
36     DataTag_Shape,                                         ///< the shape presentation of the land cover   
37     DataTag_StricklerType,                                 ///< the type corresponding to types in the Strickler tables 
38     DataTag_Polylines                                      ///< the set of reference polylines
39   };
40
41   HYDRODATA_EXPORT HYDROData_LandCover();
42   HYDRODATA_EXPORT ~HYDROData_LandCover();
43
44 public:
45   DEFINE_STANDARD_RTTI( HYDROData_LandCover );
46
47   /**
48    */
49   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const;
50
51   /**
52    * Dump object to Python script representation.
53    */
54   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
55
56   /**
57    * Returns the list of all reference objects of this object.
58    */
59   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
60
61   /**
62    * Update the shape presentation of the land cover.
63    * Call this method whenever you made changes for land cover polylines.
64    */
65   HYDRODATA_EXPORT virtual void Update();
66
67   /**
68    * Checks that object has 2D presentation. Reimlemented to return true.
69    */
70   HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
71
72   /**
73    * Set Strickler type for the land cover.
74    */
75   HYDRODATA_EXPORT virtual void SetStricklerType( const QString& theType );
76
77   /**
78    * Returns Strickler type for the land cover.
79    */
80   HYDRODATA_EXPORT virtual QString GetStricklerType() const;
81
82   /**
83    * Set reference polyline objects for the land cover.
84    */
85   HYDRODATA_EXPORT virtual void SetPolylines( const HYDROData_SequenceOfObjects& thePolylines );
86
87   /**
88    * Returns all reference polyline objects of the land cover.
89    */
90   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetPolylines() const;
91
92 protected:
93   /**
94    * Sets shape presentation of the land cover.
95    */
96   HYDRODATA_EXPORT virtual void setShape( const TopoDS_Shape& theShape );
97
98   /**
99    * Removes the shape from data label of the land cover object.
100    */
101   HYDRODATA_EXPORT virtual void removeShape();
102
103   /**
104    * Build the shape presentation of the land cover.
105    */
106   HYDRODATA_EXPORT virtual TopoDS_Shape buildShape() const;
107 };
108
109 #endif