Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSourceSurfacic.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_SOURCESURFACIC__
21 #define __TY_SOURCESURFACIC__
22 
23 #include "TYSource.h"
24 #include "TYSourcePonctuelle.h"
25 
29 class TYSourceSurfacic : public TYSource
30 {
34 
35  // Methodes
36 public:
44  TYSourceSurfacic(const TYSourceSurfacic& other);
48  virtual ~TYSourceSurfacic();
49 
53  bool operator==(const TYSourceSurfacic& other) const;
55  bool operator!=(const TYSourceSurfacic& 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 purge()
76  {
77  remAllSrc();
78  }
79 
83  double getDensiteSrcsH() const
84  {
85  return _densiteSrcsH;
86  }
90  void setDensiteSrcsH(const double& densite)
91  {
92  _densiteSrcsH = densite;
93  }
94 
98  double getDensiteSrcsV() const
99  {
100  return _densiteSrcsV;
101  }
105  void setDensiteSrcsV(const double& densite)
106  {
107  _densiteSrcsV = densite;
108  }
109 
113  double getDensiteSrcs() const;
117  void setDensiteSrcs(double densite);
118 
122  bool getSrcsCorr() const
123  {
124  return _srcsCorr;
125  }
129  void setSrcsCorr(bool corr)
130  {
131  _srcsCorr = corr;
132  }
133 
137  size_t getNbSrcs() const
138  {
139  return _listSrcPonct.size();
140  }
141 
150  bool addSrc(LPTYSourcePonctuelle pSrcPonct);
151 
160  bool remSrc(const LPTYSourcePonctuelle pSrcPonct);
161 
171  bool remSrc(QString idSrc);
172 
176  void remAllSrc();
177 
182  {
183  return _listSrcPonct.at(index);
184  }
188  const LPTYSourcePonctuelle getSrc(int index) const
189  {
190  return _listSrcPonct.at(index);
191  }
192 
198  void setSrcs(const TYTabLPSourcePonctuelle& listSrcPonct)
199  {
200  _listSrcPonct = listSrcPonct;
201  }
208  {
209  return _listSrcPonct;
210  }
217  {
218  return _listSrcPonct;
219  }
220 
221  // Membres
222 protected:
225 
228 
230  bool _srcsCorr;
231 
234 };
235 
236 #endif // __TY_SOURCESURFACIC__
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< LPTYSourcePonctuelle > TYTabLPSourcePonctuelle
Collection de pointeurs de TYSourcePonctuelle.
Definition: TYDefines.h:355
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:432
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
TYSourceSurfacic & operator=(const TYSourceSurfacic &other)
Operateur =.
bool operator!=(const TYSourceSurfacic &other) const
Operateur !=.
void setDensiteSrcsH(const double &densite)
virtual ~TYSourceSurfacic()
bool operator==(const TYSourceSurfacic &other) const
Operateur ==.
TYTabLPSourcePonctuelle _listSrcPonct
Liste des sources ponctuelles.
void setSrcsCorr(bool corr)
void setDensiteSrcsV(const double &densite)
bool getSrcsCorr() const
bool remSrc(const LPTYSourcePonctuelle pSrcPonct)
virtual std::string toString() const
double getDensiteSrcsH() const
size_t getNbSrcs() const
void setDensiteSrcs(double densite)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
double _densiteSrcsH
Densite horizontale des sources ponctuelles.
virtual DOM_Element toXML(DOM_Element &domElement)
LPTYSourcePonctuelle getSrc(int index)
double _densiteSrcsV
Densite verticale des sources ponctuelles.
double getDensiteSrcs() const
void setSrcs(const TYTabLPSourcePonctuelle &listSrcPonct)
const LPTYSourcePonctuelle getSrc(int index) const
bool addSrc(LPTYSourcePonctuelle pSrcPonct)
bool _srcsCorr
Indiquateur de correlation des sources ponctuelles.
virtual int fromXML(DOM_Element domElement)
const TYTabLPSourcePonctuelle & getSrcs() const
double getDensiteSrcsV() const
TYTabLPSourcePonctuelle & getSrcs()