Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYVegetation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program 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.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
16 /*
17  *
18  */
19 
20 #ifndef __TY_VEGETATION__
21 #define __TY_VEGETATION__
22 
23 #include <qstring.h>
26 
30 class TYVegetation : public TYElement
31 {
34 
35  // Methodes
36 public:
40  TYVegetation();
44  TYVegetation(const TYVegetation& other);
48  virtual ~TYVegetation();
49 
51  TYVegetation& operator=(const TYVegetation& other);
53  bool operator==(const TYVegetation& other) const;
55  bool operator!=(const TYVegetation& other) const;
56 
65  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
66 
67  virtual std::string toString() const;
68 
69  virtual DOM_Element toXML(DOM_Element& domElement);
70  virtual int fromXML(DOM_Element domElement);
71 
75  void setFoliageStatus(bool bStatus)
76  {
77  _bFoliage = bStatus;
78  }
79  bool getFoliageStatus() const
80  {
81  return _bFoliage;
82  }
83 
87  double getHauteur() const
88  {
89  return _hauteur;
90  }
94  void setHauteur(double haut)
95  {
96  _hauteur = haut;
97  }
98 
103  {
104  return _pSpectreAtt;
105  }
109  const TYSpectre* getSpectreAtt() const
110  {
111  return _pSpectreAtt;
112  }
116  void setSpectreAtt(TYSpectre* pAtt);
117 
118 public:
119  static QString _vegeName[];
120  static unsigned int getIndexVegetation(const QString& vegeName);
121 
122  // Membres
123 protected:
125  bool _bFoliage;
127  double _hauteur;
130 };
131 
132 #endif // __TY_VEGETATION__
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
bool operator!=(const TYVegetation &other) const
Operateur !=.
virtual ~TYVegetation()
TYSpectre * _pSpectreAtt
Spectre d'attenuation.
Definition: TYVegetation.h:129
bool _bFoliage
Foliage.
Definition: TYVegetation.h:125
double _hauteur
Hauteur.
Definition: TYVegetation.h:127
static QString _vegeName[]
Definition: TYVegetation.h:119
virtual int fromXML(DOM_Element domElement)
bool operator==(const TYVegetation &other) const
Operateur ==.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
const TYSpectre * getSpectreAtt() const
Definition: TYVegetation.h:109
void setSpectreAtt(TYSpectre *pAtt)
bool getFoliageStatus() const
Definition: TYVegetation.h:79
virtual DOM_Element toXML(DOM_Element &domElement)
void setHauteur(double haut)
Definition: TYVegetation.h:94
virtual std::string toString() const
double getHauteur() const
Definition: TYVegetation.h:87
TYSpectre * getSpectreAtt()
Definition: TYVegetation.h:102
static unsigned int getIndexVegetation(const QString &vegeName)
void setFoliageStatus(bool bStatus)
Get/Set de l'existence de feuillage.
Definition: TYVegetation.h:75
TYVegetation & operator=(const TYVegetation &other)
Operateur =.