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