Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYVegetation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
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:64
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:385
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 =.