Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticLine.cpp
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 #if TY_USE_IHM
19 #endif
20 #include "TYAcousticLine.h"
21 
24 
25 TYAcousticLine::TYAcousticLine() : _typeDistribution(TY_PUISSANCE_IMPOSEE)
26 {
28 
29  _curRegime = 0;
30  _nextRegime = 0;
31  _useAtt = false;
32  _isRayonnant = true;
33  _regimeChangeAble = true;
34 
35  _pAtt = NULL;
36 
37  _largeur = 1;
38 
40  _pSrcLineic->setParent(this);
41 
43 }
44 
46 {
47  *this = other;
48 }
49 
51 {
52  _tabPoint.clear();
53 }
54 
56 {
57  if (this != &other)
58  {
59  TYElement::operator=(other);
60  _curRegime = other._curRegime;
61  _nextRegime = other._nextRegime;
62  _isRayonnant = other._isRayonnant;
64  _largeur = other._largeur;
65 
66  _useAtt = other._useAtt;
67  if (other._useAtt && (other._pAtt != NULL))
68  {
69  _pAtt = new TYAttenuateur(*other._pAtt);
70  }
71  else
72  {
73  _pAtt = NULL;
74  }
75 
76  if (other._pSrcLineic != NULL)
77  {
79  }
80 
81  _tabPoint = other._tabPoint;
82  _tabRegimes = other._tabRegimes;
83  }
84  return *this;
85 }
86 
88 {
89  if (this != &other)
90  {
91  // TODO See ticket https://extranet.logilab.fr/ticket/1522889
92  if (_largeur != other._largeur)
93  {
94  return false;
95  }
96  if (_pSrcLineic != other._pSrcLineic)
97  {
98  return false;
99  }
100  if (!(_tabPoint == other._tabPoint))
101  {
102  return false;
103  }
104  if (!(_tabRegimes == other._tabRegimes))
105  {
106  return false;
107  }
108  if (_curRegime != other._curRegime)
109  {
110  return false;
111  }
112  if (_nextRegime != other._nextRegime)
113  {
114  return false;
115  }
116  if (_isRayonnant != other._isRayonnant)
117  {
118  return false;
119  }
121  {
122  return false;
123  }
124  if (_useAtt != other._useAtt)
125  {
126  return false;
127  }
128  if (_pAtt != other._pAtt)
129  {
130  return false;
131  }
132  }
133 
134  return true;
135 }
136 
138 {
139  return !operator==(other);
140 }
141 
142 bool TYAcousticLine::deepCopy(const TYElement* pOther, bool copyId /*=true*/, bool pUseCopyTag /*=false*/)
143 {
144 
145  unsigned int i = 0;
146  if (!TYSource::deepCopy(pOther, copyId))
147  {
148  return false;
149  }
150 
151  TYAcousticLine* pOtherLine = (TYAcousticLine*)pOther;
152 
153  _largeur = pOtherLine->_largeur;
154 
155  _pSrcLineic->deepCopy(pOtherLine->_pSrcLineic, copyId);
156 
157  _tabPoint.clear();
158  for (i = 0; i < pOtherLine->getTabPoint().size(); i++)
159  {
160  TYPoint pt;
161  pt.deepCopy(&pOtherLine->getTabPoint()[i], copyId);
162  _tabPoint.push_back(pt);
163  }
164 
165  _curRegime = pOtherLine->_curRegime;
166  _nextRegime = pOtherLine->_nextRegime;
167  _isRayonnant = pOtherLine->_isRayonnant;
168  _regimeChangeAble = pOtherLine->_regimeChangeAble;
169  _largeur = pOtherLine->_largeur;
170 
171  _useAtt = pOtherLine->_useAtt;
172  if (pOtherLine->_useAtt && (pOtherLine->_pAtt != NULL))
173  {
174  _pAtt = new TYAttenuateur();
175  _pAtt->deepCopy(pOtherLine->_pAtt);
176  }
177  else
178  {
179  _pAtt = NULL;
180  }
181 
182  _tabRegimes.clear();
183  for (i = 0; i < _tabRegimes.size(); i++)
184  {
185  TYRegime regime;
186  regime.deepCopy(&pOtherLine->_tabRegimes[i], copyId);
187  _tabRegimes.push_back(regime);
188  }
189 
190  return true;
191 }
192 
193 std::string TYAcousticLine::toString() const
194 {
195  return "TYAcousticLine";
196 }
197 
199 {
200  unsigned int i = 0;
201 
202  DOM_Element domNewElem = TYSource::toXML(domElement);
203 
204  TYXMLTools::addElementDoubleValue(domNewElem, "largeur", _largeur);
205 
206  _pSrcLineic->toXML(domNewElem);
207 
208  TYXMLTools::addElementUIntValue(domNewElem, "nbPoints", _tabPoint.size());
209 
210  for (i = 0; i < _tabPoint.size(); i++)
211  {
212  _tabPoint.at(i).toXML(domNewElem);
213  }
214 
215  TYXMLTools::addElementIntValue(domNewElem, "isRayonnant", _isRayonnant);
216  TYXMLTools::addElementIntValue(domNewElem, "useAtt", _useAtt);
217 
218  if ((_useAtt) && (_pAtt != NULL))
219  {
220  _pAtt->toXML(domNewElem);
221  }
222 
223  TYXMLTools::addElementIntValue(domNewElem, "curRegime", _curRegime);
224  TYXMLTools::addElementUIntValue(domNewElem, "nbRegimes", getNbRegimes());
225 
226  // Sauvegarde du numero d'ordre du prochain regime
227  TYXMLTools::addElementIntValue(domNewElem, "nextRegime", _nextRegime);
228 
229  // Ensuite on sauve tous les regimes
230  for (i = 0; i < _tabRegimes.size(); i++)
231  {
232  _tabRegimes[i].toXML(domNewElem);
233  }
234 
235  return domNewElem;
236 }
237 
239 {
240  TYSource::fromXML(domElement);
241 
242  // Reset
243  _tabPoint.clear();
244  _tabRegimes.clear();
245 
246  bool largeurOk = false;
247  bool nbPointsOk = false;
248  bool useAttOk = false;
249  bool isRayonnantOk = false;
250  bool curRegimeOk = false;
251  bool regimeFound = false;
252  bool nextRegimeFound = false;
253 
254  TYPoint point;
255  int nbPoints = 0;
256 
257  LPTYAttenuateur pTempAtt = new TYAttenuateur();
258 
259  // On efface le tableau des regimes car au moins un a ete cree a la construction de l'objet
260  _tabRegimes.clear();
261  _curRegime = 0;
262  _nextRegime = 0;
263 
264  DOM_Element elemCur;
265 
266  QDomNodeList childs = domElement.childNodes();
267  for (unsigned int i = 0; i < childs.length(); i++)
268  {
269  elemCur = childs.item(i).toElement();
270 
271  TYXMLTools::getElementDoubleValue(elemCur, "largeur", _largeur, largeurOk);
272  TYXMLTools::getElementBoolValue(elemCur, "isRayonnant", _isRayonnant, isRayonnantOk);
273  TYXMLTools::getElementBoolValue(elemCur, "useAtt", _useAtt, useAttOk);
274  TYXMLTools::getElementIntValue(elemCur, "curRegime", _curRegime, curRegimeOk);
275  TYXMLTools::getElementIntValue(elemCur, "nextRegime", _nextRegime, nextRegimeFound);
276 
278 
279  TYXMLTools::getElementIntValue(elemCur, "nbPoints", nbPoints, nbPointsOk);
280 
281  if (point.callFromXMLIfEqual(elemCur))
282  {
283  _tabPoint.push_back(point);
284  }
285 
286  // Relecture attenuateur
287  if (pTempAtt->callFromXMLIfEqual(elemCur))
288  {
289  _pAtt = pTempAtt;
290  }
291 
292  // Ensuite il devrait y avoir la liste des regimes de la machine
293  TYRegime regime;
294  if (regime.callFromXMLIfEqual(elemCur))
295  {
296  regimeFound = true; // On a trouve au moins un regime
297  _tabRegimes.push_back(regime);
298  }
299  }
300 
301  if (regimeFound) // Si au moins un regime a ete trouve, on recharge le regime courant
302  {
304  }
305  else // Sinon on construit un "regime 0"
306  {
308  }
309 
310  // Si on ne connait pas le numero du dernier regime, on le "numerote" en fonction de la taille du tableau
311  if (!nextRegimeFound)
312  {
313  _nextRegime = static_cast<int>(_tabRegimes.size()) + 2;
314  }
315 
316  return 1;
317 }
318 
319 /*virtual*/ void TYAcousticLine::computeSpectre() {}
320 
322 {
323  _pSrcLineic->purge();
324 }
325 
327 {
328  double densite = 1.0 / _pSrcLineic->getDensiteSrcs();
329  double distance = 0.0;
330  double x = 0.0, y = 0.0, z = 0.0; // Coordonnees du point courant
331  int nbSources = 1;
332  int i = 0, is = 0;
333  LPTYPoint pos;
334  LPTYSourcePonctuelle pSource = NULL; // Source ponctuelle courante
335  LPTYSpectre Spectre = new TYSpectre(); // Spectre courant
336 
337  // On commence par supprimer les anciennes sources
338  remAllSrcs();
339 
340  // nombre d'iterations (_tabPoint.size()-2 * _pSrcLineic->getNbRegimes());
341 
342  // Pour tous les points definissant la TYAcousticLine
343  for (i = 1; i < (int)_tabPoint.size(); i++)
344  {
345  distance = _tabPoint[i].distFrom(_tabPoint[i - 1]);
346  nbSources = (int)(distance * densite);
347  nbSources = (int)(nbSources > 0 ? nbSources : 1.0); // Au minimum une source par segment
348 
349  double distanceX = _tabPoint[i]._x - _tabPoint[i - 1]._x;
350  double distanceY = _tabPoint[i]._y - _tabPoint[i - 1]._y;
351  double distanceZ = _tabPoint[i]._z - _tabPoint[i - 1]._z;
352 
353  double deltaSourcesX = distanceX / nbSources;
354  double deltaSourcesY = distanceY / nbSources;
355  double deltaSourcesZ = distanceZ / nbSources;
356 
357  // Position de la premiere source
358  x = _tabPoint[i - 1]._x + deltaSourcesX / 2;
359  y = _tabPoint[i - 1]._y + deltaSourcesY / 2;
360  z = _tabPoint[i - 1]._z + deltaSourcesZ / 2;
361 
362  pos = new TYPoint(x, y, z);
363 
364  for (is = 0; is < nbSources; is++)
365  {
366  pSource = new TYSourcePonctuelle();
367  pSource->setParent(this);
368  pSource->setDirectivity(new TYDirectivity());
369 
370  // Positionnement de la source
371  pSource->getPos()->set(pos->_x, pos->_y, pos->_z);
372 
373  pSource->setSpectre(Spectre);
374  _pSrcLineic->addSrc(pSource); // Ajout de la source ponctuelle a la source lineique
375 
376  pos->_x += deltaSourcesX;
377  pos->_y += deltaSourcesY;
378  pos->_z += deltaSourcesZ;
379  }
380  }
381 }
382 
383 bool TYAcousticLine::updateAcoustic(const bool& force) // force = false
384 {
385  distriSrcs();
386  // Affectation de la puissance aux sources
387  setSrcsLw();
388 
389  return true;
390 }
391 
393 {
396 
397  for (unsigned int i = 0; i < tab.size(); i++)
398  {
399  tabRet.push_back(new TYSourcePonctuelleGeoNode((LPTYElement)tab[i]));
400  }
401 
402  return tabRet;
403 }
404 
406 {
407  double densite = 1.0 / _pSrcLineic->getDensiteSrcs(); // nb sources/metre
408  double deltaSources = 0.0; // Ecart entre chaque sources
409 
411 
412  TYSpectre s = getSpectre()->toGPhy().div(tabSrcs.size());
413 
414  unsigned int indexTab = 0; // Permet de parcourir le tableau des sources
415  int i = 0, nbSources = 0;
416  double distance = 0.0;
417 
418  // Pour tous les points definissant la TYAcousticLine
419  for (i = 1; i < (int)_tabPoint.size(); i++)
420  {
421  // Longueur du segment
422  distance = _tabPoint[i].distFrom(_tabPoint[i - 1]);
423 
424  // Nombre de sources sur le segment
425  nbSources = (int)(distance * densite);
426  nbSources = (int)(nbSources > 0 ? nbSources : 1.0); // Au minimum une source par segment
427 
428  // Longueur associee a la source
429  deltaSources = distance / nbSources;
430 
431  // LW(source) = LW/metre * longueur associee a la source
432  LPTYSpectre s = new TYSpectre(getSpectre()->toGPhy().mult(deltaSources));
433  s->setType(SPECTRE_TYPE_LW);
434 
435  // Saisie du spectre pour chacune des sources du segment
436  for (unsigned int is = 0; is < nbSources; is++, indexTab++)
437  {
438  if (indexTab >= tabSrcs.size())
439  {
440  break;
441  } // Securite
442 
443  tabSrcs[indexTab]->setSpectre(s);
444  }
445  }
446 
447  return true;
448 }
449 
450 void TYAcousticLine::setRegime(TYSpectre& Spectre, int regime /*=-1*/, bool recursif /*=false*/)
451 {
452  // Type Puissance
453  Spectre.setType(SPECTRE_TYPE_LW);
454 
455  _pSpectre = new TYSpectre(Spectre);
457 }
458 
460 {
461  _tabRegimes.push_back(regime);
462 
463  return static_cast<int>(_tabRegimes.size());
464 }
465 
466 bool TYAcousticLine::remRegime(int regimeNumber)
467 {
468  // Il doit exister au moins un regime
469  if (_tabRegimes.size() == 1)
470  {
471  return false;
472  }
473 
474  if (regimeNumber > (int)_tabRegimes.size() - 1)
475  {
476  return false;
477  }
478 
479  TYTabRegimes::iterator it; // Iterateur sur le tableau
480  it = _tabRegimes.begin() + regimeNumber; // On le fait pointer sur l'element a supprimer
481 
482  _tabRegimes.erase(it); // On efface l'element pointe
483 
484  // On charge le premier regime
485  if (_curRegime == regimeNumber)
486  {
487  _curRegime = 0;
488  loadRegime();
489  }
490 
491  return true; // Tout s'est bien passe du moins on l'espere
492 }
493 
494 void TYAcousticLine::setCurRegime(int regimeNumber)
495 {
496  if (regimeNumber > (int)_tabRegimes.size() - 1)
497  {
498  return;
499  }
500  if (regimeNumber < 0)
501  {
502  regimeNumber = (int)_tabRegimes.size() - 1;
503  }
504 
505  TYRegime& regime = _tabRegimes[regimeNumber];
506 
507  _isRayonnant = regime._isRayonnant;
508  _useAtt = regime._useAtt;
509  _pSpectre = new TYSpectre(regime._spectre);
510  _pAtt = regime._pAtt;
512 
513  _curRegime = regimeNumber;
514 
515  setSrcsLw();
516 
517  setIsAcousticModified(true);
518 }
519 
521 {
522  char buf[3];
523  sprintf_s(buf, "%d", _nextRegime);
524 
525  QString temp = buf;
526 
527  TYRegime regime;
528  regime.setName("regime" + temp);
529  regime._isRayonnant = _isRayonnant;
530  regime._useAtt = _useAtt;
532  regime._spectre = *_pSpectre;
533  regime._pAtt = _pAtt;
534 
535  // Pour eviter de depasser 999 regimes dans ce cas on revient a 0 et l'utilisateur se demerde !
536  if (_nextRegime == 999)
537  {
538  _nextRegime = 0;
539  }
540  else
541  {
542  _nextRegime++; // Incremente le numero d'ordre pour le prochain regime
543  }
544 
545  return regime;
546 }
547 
549 {
550  TYRegime& regime = _tabRegimes[_curRegime];
551 
552  regime._isRayonnant = _isRayonnant;
553  regime._useAtt = _useAtt;
555  regime._spectre = *_pSpectre;
556 
557  if (_useAtt)
558  {
559  regime._pAtt = new TYAttenuateur();
560  regime._pAtt->deepCopy(_pAtt, false);
561  }
562 }
563 void TYAcousticLine::loadRegime(int regimeNb)
564 {
565  if (regimeNb == -1)
566  {
567  regimeNb = _curRegime;
568  }
569  else if ((regimeNb < 0) || (regimeNb > (int)_tabRegimes.size() - 1))
570  {
571  regimeNb = 0;
572  }
573 
574  TYRegime& regime = _tabRegimes[regimeNb];
575 
576  _isRayonnant = regime._isRayonnant;
577  _useAtt = regime._useAtt;
578  *_pSpectre = regime._spectre;
580 
581  if (_useAtt && (regime._pAtt != NULL))
582  {
583  _pAtt = new TYAttenuateur();
584  _pAtt->deepCopy(regime._pAtt, false);
585  }
586 }
587 
589 {
591  reg.setRegimeName(name);
592 }
593 
595 {
596  _typeDistribution = typeDistri;
597  _tabRegimes[_curRegime]._typeDistribution = typeDistri;
598 }
599 
601 {
602  _pAtt = pAtt;
603 
604  _tabRegimes[_curRegime]._pAtt = pAtt;
605 
606  if (_pAtt)
607  {
608  setUseAtt(true);
609  } // En associant un attenuateur on dit qu'on va utiliser celui-ci
610 }
611 
613 {
614  // on prend en compte l'eventuel attenuateur
615  if (_useAtt && (_pAtt != NULL))
616  {
618  return new TYSpectre(temp);
619  }
620 
621  return _pSpectre;
622 }
623 
624 void TYAcousticLine::exportCSV(std::ofstream& ofs)
625 {
626  // Mise a jour acoustique
627  updateAcoustic();
628 
629  // Export du nom de l'objet
630  ofs << getName().toLatin1().data() << '\n';
631 
632  // Export du type de l'objet
633  ofs << toString() << '\n';
634  // Largeur de la ligne
635  ofs << "Largeur : " << _largeur << " m\n";
636 
637  // Export des proprietes acoustiques
639  ofs << getRegimeName().toLatin1().data() << '\n';
640 
641  // Densite de sources
642  ofs << "Densite de sources : " << _pSrcLineic->getDensiteSrcs() << " source(s)/metre\n";
643 
644  if (_useAtt)
645  {
646  ofs << "Attenuateur : OUI\n";
647  if (_pAtt)
648  {
649  _pAtt->getSpectreAtt().exportCSV(ofs);
650  }
651  else
652  {
653  ofs << "ATTENUATEUR NON DEFINI !!!\n";
654  }
655  }
656  else
657  {
658  ofs << "Attenuateur : NON\n";
659  }
660 
661  _pSpectre->exportCSV(ofs);
662 
663  ofs << '\n';
664 }
NxReal s
Definition: NxVec3.cpp:317
QDomElement DOM_Element
Definition: QT2DOM.h:30
Representation graphique d'une ligne acoustique (fichier header)
Outil IHM pour une ligne acoustique (fichier header)
TY_EXTENSION_INST(TYAcousticLine)
TY_EXT_GRAPHIC_INST(TYAcousticLine)
std::vector< LPTYSourcePonctuelle > TYTabLPSourcePonctuelle
Collection de pointeurs de TYSourcePonctuelle.
Definition: TYDefines.h:355
const char * name
TYGeometryNode TYSourcePonctuelleGeoNode
Noeud geometrique de type TYSourcePonctuelle.
std::vector< LPTYSourcePonctuelleGeoNode > TYTabSourcePonctuelleGeoNode
Collection de noeuds geometriques de type TYSourcePonctuelle.
double _y
y coordinate of OCoord3D
Definition: 3d.h:283
double _z
z coordinate of OCoord3D
Definition: 3d.h:284
double _x
x coordinate of OCoord3D
Definition: 3d.h:282
virtual void set(double x, double y, double z)
Definition: 3d.cpp:381
virtual const char * getClassName() const
Definition: TYElement.h:249
OSpectreAbstract & subst(const OSpectreAbstract &spectre) const
Arithmetic subtraction of two spectrums in one-third Octave.
Definition: spectre.cpp:316
OSpectreAbstract & toGPhy() const
Converts to physical quantity.
Definition: spectre.cpp:634
OSpectreAbstract & div(const OSpectreAbstract &spectre) const
Division of two spectrums.
Definition: spectre.cpp:273
Spectrum class.
Definition: Spectre.h:25
TYTabPoint & getTabPoint()
bool _isRayonnant
Mise en fonctionnement.
virtual int addRegime(TYRegime regime)
TYRegime & getRegimeNb(const int &nb)
virtual void setCurRegime(int regimeNumber)
void setUseAtt(const bool &useAtt)
QString getRegimeName()
virtual std::string toString() const
TYTabRegimes _tabRegimes
Tableau des regimes.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
bool _useAtt
Utilisation d'un attenuateur.
TYSpectre * getSpectre(int regime=-1) const
virtual void computeSpectre()
virtual int fromXML(DOM_Element domElement)
size_t getNbRegimes() const
LPTYSourceLineic _pSrcLineic
Source Lineique.
virtual bool setSrcsLw()
int _curRegime
Regime de fonctionnement courant.
bool operator==(const TYAcousticLine &other) const
Operateur ==.
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
virtual void setRegime(TYSpectre &Spectre, int regime=-1, bool recursif=false)
virtual LPTYSpectre getRealPowerSpectrum()
virtual ~TYAcousticLine()
virtual TYRegime buildRegime()
virtual void updateCurrentRegime()
void setAtt(LPTYAttenuateur pAtt)
virtual bool updateAcoustic(const bool &force=false)
double _largeur
Largeur.
void setRegimeName(const QString &name)
void exportCSV(std::ofstream &ofs)
Export au format csv sur un flux transmis.
virtual void remAllSrcs()
bool operator!=(const TYAcousticLine &other) const
Operateur !=.
virtual bool remRegime(int regime)
virtual void loadRegime(int regimeNb=-1)
void setTypeDistribution(int typeDistri)
LPTYAttenuateur _pAtt
Attenuateur associe a l'element;.
bool _regimeChangeAble
Indique si on peut ajouter un regime a un element (cas des routes)
TYAcousticLine & operator=(const TYAcousticLine &other)
Operateur =.
int _typeDistribution
Indique le type de distribution a utiliser. pour l'etat courant.
int _nextRegime
Numero d'ordre du regime suivant.
virtual void distriSrcs()
virtual DOM_Element toXML(DOM_Element &domElement)
TYTabPoint _tabPoint
Tableau des points.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
TYSpectre & getSpectreAtt()
Definition: TYAttenuateur.h:99
virtual DOM_Element toXML(DOM_Element &domElement)
void setName(QString name)
Definition: TYElement.h:671
QString _name
Nom courant de l'element.
Definition: TYElement.h:966
TYElement & operator=(const TYElement &other)
Definition: TYElement.cpp:265
bool callFromXMLIfEqual(DOM_Element &domElement, int *pRetVal=NULL)
Definition: TYElement.cpp:544
virtual QString getName() const
Definition: TYElement.h:684
void setParent(TYElement *pParent)
Definition: TYElement.h:692
virtual void setIsAcousticModified(bool isModified)
Definition: TYElement.cpp:248
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
static TYNameManager * get()
Retourne l'instance singleton.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYPoint.cpp:92
bool _useAtt
Definition: TYRegime.h:197
bool _isRayonnant
Definition: TYRegime.h:196
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYRegime.cpp:99
TYSpectre _spectre
Definition: TYRegime.h:199
int _typeDistribution
Definition: TYRegime.h:198
void setRegimeName(const QString &nom)
Definition: TYRegime.h:78
LPTYAttenuateur _pAtt
Definition: TYRegime.h:200
double getDensiteSrcs() const
bool addSrc(LPTYSourcePonctuelle pSrcPonct)
virtual DOM_Element toXML(DOM_Element &domElement)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
TYTabLPSourcePonctuelle & getSrcs()
void setDirectivity(TYDirectivity *directivity_)
: Get/Set directivity to source
virtual int fromXML(DOM_Element domElement)
Definition: TYSource.cpp:97
virtual void setSpectre(LPTYSpectre pSpectre)
Definition: TYSource.h:89
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYSource.cpp:71
LPTYSpectre _pSpectre
Definition: TYSource.h:96
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYSource.cpp:90
virtual void exportCSV(const std::string &filename)
Export du spectre au format csv en creant le fichier.
Definition: TYSpectre.cpp:385
static void addElementDoubleValue(DOM_Element &parentElem, DOMString nodeName, double nodeValue)
Definition: TYXMLTools.cpp:87
static bool getElementBoolValue(DOM_Element parentElem, DOMString nodeName, bool &nodeValue)
Definition: TYXMLTools.cpp:179
static void addElementIntValue(DOM_Element &parentElem, DOMString nodeName, int nodeValue)
Definition: TYXMLTools.cpp:72
static bool getElementIntValue(DOM_Element parentElem, DOMString nodeName, int &nodeValue)
Definition: TYXMLTools.cpp:129
static bool getElementDoubleValue(DOM_Element parentElem, DOMString nodeName, double &nodeValue)
Definition: TYXMLTools.cpp:243
static void addElementUIntValue(DOM_Element &parentElem, DOMString nodeName, unsigned int nodeValue)
Definition: TYXMLTools.cpp:42
@ SPECTRE_TYPE_LW
Definition: spectre.h:30