Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYProjet.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 #include "Tympan/core/logging.h"
22 
23 #include "TYProjet.h"
24 
25 #if TY_USE_IHM
28 #endif
29 
32 
33 #define TR(id) OLocalizator::getString("OMessageManager", (id))
34 
35 bool TYProjet::gSaveValues = true;
36 
38  : _auteur(""), _dateCreation("2001-10-01"), _dateModif("2001-10-01"), _comment(""),
39  _pSite(new TYSiteNode()), _pCurrentCalcul(new TYCalcul()), _delaunayTolerance(0.0001),
40  _maxDistBetweenPoints(200.0), _useDefaultGeomVal(true), _bStatusSolver(true)
41 {
43 
44  _pSite->setParent(this);
45  _pSite->setRoot(true);
47  _pSite->setProjet(this); // Definit le projet courant
48 
50  _listCalcul.push_back(_pCurrentCalcul);
51 
52  // Ajout du site au calcul courant
54 
55  // first step, force spectre form to Octave Form
57 
58  // first step, force spectre pond to dB(Z) Pond
59  _spectrePond = "dB(Z)";
60 
62 }
63 
65 {
66  *this = other;
67 }
68 
70 {
71  remAllCalcul();
72 }
73 
75 {
76  if (this != &other)
77  {
78  TYElement::operator=(other);
79  _auteur = other._auteur;
81  _dateModif = other._dateModif;
82  _comment = other._comment;
83  _pSite = other._pSite;
86  _listCalcul = other._listCalcul;
90  _spectreForm = other._spectreForm;
91  _spectrePond = other._spectrePond;
92  }
93 
95 
96  return *this;
97 }
98 
99 bool TYProjet::operator==(const TYProjet& other) const
100 {
101  if (this != &other)
102  {
103  if (TYElement::operator!=(other))
104  {
105  return false;
106  }
107  if (_auteur != other._auteur)
108  {
109  return false;
110  }
111  if (_dateCreation != other._dateCreation)
112  {
113  return false;
114  }
115  if (_dateModif != other._dateModif)
116  {
117  return false;
118  }
119  if (_comment != other._comment)
120  {
121  return false;
122  }
123  if (_pSite != other._pSite)
124  {
125  return false;
126  }
127  if (_pointsControl != other._pointsControl)
128  {
129  return false;
130  }
131  if (_pCurrentCalcul != other._pCurrentCalcul)
132  {
133  return false;
134  }
135  if (!(_listCalcul == other._listCalcul))
136  {
137  return false;
138  }
140  {
141  return false;
142  }
144  {
145  return false;
146  }
148  {
149  return false;
150  }
151  if (_spectreForm != other._spectreForm)
152  {
153  return false;
154  }
155  if (_spectrePond != other._spectrePond)
156  {
157  return false;
158  }
159  }
160  return true;
161 }
162 
163 bool TYProjet::operator!=(const TYProjet& other) const
164 {
165  return !operator==(other);
166 }
167 
168 std::string TYProjet::toString() const
169 {
170  return "TYProjet";
171 }
172 
174 {
175  DOM_Element domNewElem = TYElement::toXML(domElement);
176 
177  TYXMLTools::addElementStringValue(domNewElem, "auteur", _auteur);
178  TYXMLTools::addElementStringValue(domNewElem, "dateCreation", _dateCreation);
179  TYXMLTools::addElementStringValue(domNewElem, "dateModif", _dateModif);
180  TYXMLTools::addElementStringValue(domNewElem, "comment", _comment);
181  TYXMLTools::addElementDoubleValue(domNewElem, "delaunayTolerence", _delaunayTolerance);
182  TYXMLTools::addElementDoubleValue(domNewElem, "distMaxBetweenPoints", _maxDistBetweenPoints);
183  TYXMLTools::addElementBoolValue(domNewElem, "useDefGeomVal", _useDefaultGeomVal);
184  // Sauvegarde de la forme et de la pondération d'affichage du spectre
185  TYXMLTools::addElementIntValue(domNewElem, "spectreForm", static_cast<int>(_spectreForm));
186  TYXMLTools::addElementStringValue(domNewElem, "spectrePond", _spectrePond);
187 
188  if (_pCurrentCalcul)
189  {
190  TYXMLTools::addElementStringValue(domNewElem, "currentCalculID", _pCurrentCalcul->getID().toString());
191  }
192 
193  // Ajout du site node sur lequel s'effectue le calcul
194  DOM_Document domDoc = domElement.ownerDocument();
195 
196  // Site
197  _pSite->toXML(domNewElem);
198 
199  // Points de controle
200  DOM_Element pointsControlNode = domDoc.createElement("PointsControl");
201  domNewElem.appendChild(pointsControlNode);
202  for (unsigned int i = 0; i < _pointsControl.size(); i++)
203  {
204  _pointsControl[i]->toXML(pointsControlNode);
205  }
206 
207  // Noise Maps
208  DOM_Element noiseMapsNode = domDoc.createElement("NoiseMaps");
209  domNewElem.appendChild(noiseMapsNode);
210  for (unsigned int i = 0; i < _maillages.size(); i++)
211  {
212  _maillages[i]->toXML(noiseMapsNode);
213  }
214 
215  // Calculs
216  for (unsigned int i = 0; i < _listCalcul.size(); i++)
217  {
218  _listCalcul.at(i)->toXML(domNewElem);
219  }
220 
221  return domNewElem;
222 }
223 
225 {
226  TYElement::fromXML(domElement);
227 
228  _pCurrentCalcul = nullptr;
229 
230  remAllCalcul();
231 
232  bool auteurOk = false;
233  bool dateCreationOk = false;
234  bool dateModifOk = false;
235  bool commentOk = false;
236  bool currentCalculIDOk = false;
237  bool delaunayOk = false;
238  bool dMaxOk = false;
239  bool useDefaultOk = false;
240  bool keepAltiUpTodate = false;
241  bool spectreFormOk = false;
242  int spectreFormInt = static_cast<int>(_spectreForm); // default current
243  bool spectrePondOk = false;
244 
245  QString currentCalculID;
246  LPTYCalcul pCalcul = new TYCalcul();
247  int readOk = 0; // Indicateur de bonne relecture du calcul
248  int i = 0;
249 
250  DOM_Element elemCur;
251 
252  QDomNodeList childs = domElement.childNodes();
253  int childcount = childs.length();
254  for (i = 0; i < childcount; i++)
255  {
256  elemCur = childs.item(i).toElement();
257  OMessageManager::get()->info("Charge element du projet %d/%d.", i + 1, childcount);
258 
259  TYXMLTools::getElementStringValue(elemCur, "auteur", _auteur, auteurOk);
260  TYXMLTools::getElementStringValue(elemCur, "dateCreation", _dateCreation, dateCreationOk);
261  TYXMLTools::getElementStringValue(elemCur, "dateModif", _dateModif, dateModifOk);
262  TYXMLTools::getElementStringValue(elemCur, "comment", _comment, commentOk);
263  TYXMLTools::getElementStringValue(elemCur, "currentCalculID", currentCalculID, currentCalculIDOk);
264 
265  TYXMLTools::getElementDoubleValue(elemCur, "delaunayTolerence", _delaunayTolerance, delaunayOk);
266  TYXMLTools::getElementDoubleValue(elemCur, "distMaxBetweenPoints", _maxDistBetweenPoints, dMaxOk);
267  TYXMLTools::getElementBoolValue(elemCur, "useDefGeomVal", _useDefaultGeomVal, useDefaultOk);
268  TYXMLTools::getElementIntValue(elemCur, "spectreForm", spectreFormInt, spectreFormOk);
269  TYXMLTools::getElementStringValue(elemCur, "spectrePond", _spectrePond, spectrePondOk);
270 
271  if (_pSite->callFromXMLIfEqual(elemCur))
272  {
274  }
275  // On sauvegarde l'information de mise à jour de l'altimétrie
276  keepAltiUpTodate = _pSite->getAltimetry()->isUpToDate();
277 
278  // Points de controle
279  LPTYPointControl pPointControl = new TYPointControl();
280  if (elemCur.nodeName() == "PointsControl")
281  {
282  DOM_Element elemCur2;
283  QDomNodeList childs2 = elemCur.childNodes();
284 
285  for (unsigned int j = 0; j < childs2.length(); j++)
286  {
287  elemCur2 = childs2.item(j).toElement();
288  if (pPointControl->callFromXMLIfEqual(elemCur2))
289  {
290  addPointControl(pPointControl);
291  pPointControl = new TYPointControl();
292  }
293  }
294  }
295 
296  // Noise maps
297  LPTYGeometryNode pGeoNode = new TYGeometryNode();
298  if (elemCur.nodeName() == "NoiseMaps")
299  {
300  DOM_Element elemCur2;
301  QDomNodeList childs2 = elemCur.childNodes();
302 
303  for (unsigned int j = 0; j < childs2.length(); j++)
304  {
305  elemCur2 = childs2.item(j).toElement();
306  if (pGeoNode->callFromXMLIfEqual(elemCur2))
307  {
308  addMaillage(pGeoNode);
309  pGeoNode = new TYGeometryNode();
310  }
311  }
312  }
313 
314  // Calculs
315  pCalcul->setParent(this);
316  if (pCalcul->callFromXMLIfEqual(elemCur, &readOk))
317  {
318  // Insure compatibility when loading Code_TYMPAN T310 projects
319  // Enforce pCalcul->_mapPointCtrlSpectre consistency
320  if (pCalcul->getMapPointCtrlSpectre().empty() && !pCalcul->hasResuCtrlPoints())
321  {
322  OMessageManager::get()->info("T310 project migration : enforce receptors configuration "
323  "consistency in calculation settings");
324  for (unsigned int i = 0; i < _pointsControl.size(); i++)
325  {
326  pCalcul->addPtCtrlToResult(_pointsControl[i]);
327  }
328  }
329  addCalcul(pCalcul);
330  pCalcul = new TYCalcul();
331  }
332  }
333 
334  // Mise a jour des parametre pour la triangulation du site
336 
337  // Update TYCalcul control point spectrum if needed
338  // --> compatibility with previous TYPointControl management paradigm (see CS 0a6aab520874@EDF_RD)
339  for (unsigned int i = 0; i < _pointsControl.size(); i++)
340  {
341  if (_pointsControl[i].getRealPointer()->getAllUses() != nullptr)
342  {
343  std::map<TYUUID, LPTYSpectre>* compatibilityVector =
344  static_cast<std::map<TYUUID, LPTYSpectre>*>(_pointsControl[i].getRealPointer()->getAllUses());
345  std::map<TYUUID, LPTYSpectre>::iterator it;
346  for (it = compatibilityVector->begin(); it != compatibilityVector->end(); it++)
347  {
348  TYCalcul* pCalc = dynamic_cast<TYCalcul*>(getInstance((*it).first));
349  if (pCalc == nullptr)
350  {
351  continue;
352  }
353 
354  TYSpectre* pSpectre = (*it).second;
356  pCalc->setSpectre(_pointsControl[i].getRealPointer(), pSpectre);
357  }
358 
359  // Cleaning map after use
360  compatibilityVector->clear();
361  _pointsControl[i].getRealPointer()->cleanAllUses();
362  compatibilityVector = nullptr;
363  }
364  }
365 
366  // update TYCalcul noise map spectrums if needed
367  // --> compatibility with previous TYMaillage management paradigm
368  for (unsigned int i = 0; i < _maillages.size(); i++)
369  {
370  TYMaillage* pMaillage = dynamic_cast<TYMaillage*>(_maillages[i]->getElement());
371  if (pMaillage->getAllUses() != nullptr)
372  {
373  TYTabLPSpectre* compatibilityVector = static_cast<TYTabLPSpectre*>(pMaillage->getAllUses());
374 
375  // Balayage de tous les calculs
376  for (unsigned j = 0; j < _listCalcul.size(); j++)
377  {
378  if (pMaillage->etat(_listCalcul[j]) == true)
379  {
380  _listCalcul[j]->setNoiseMapSpectrums(pMaillage, *compatibilityVector);
381  }
382  }
383 
384  // Cleaning map after use
385  compatibilityVector->clear();
386  pMaillage->cleanAllUses();
387  compatibilityVector = nullptr;
388  }
389  }
390 
391  // Identification du calcul courant
392  bool bCurrentCalculFound = false;
393  for (i = 0; i < (int)_listCalcul.size(); i++)
394  {
395  if (_listCalcul[i]->getID().toString() == currentCalculID)
396  {
398  bCurrentCalculFound = true;
399  break;
400  }
401  }
402 
403  if (!bCurrentCalculFound && (_listCalcul.size() > 0))
404  {
406  }
407 
408  if (spectreFormOk)
409  {
410  switch (static_cast<TYSpectreForm>(spectreFormInt))
411  {
412  case SPECTRE_FORM_TIERS:
413  case SPECTRE_FORM_OCT:
414  case SPECTRE_FORM_CST_DF:
416  _spectreForm = static_cast<TYSpectreForm>(spectreFormInt);
417  break;
418  default:
419  // Rétro-compat / valeur invalide -> garder le défaut (_spectreForm inchangé)
420  break;
421  }
422  }
423 
424  if (readOk == -1)
425  {
426  return readOk;
427  }
428 
429  // A REVOIR _pElement ne devrait pas renvoyer le projet dans showsources/TYModelerFrame...
430  if (_pSite)
431  {
432  _pSite->update(_pSite);
433  _pSite->getAltimetry()->setIsUpToDate(keepAltiUpTodate);
434  }
435  return 1;
436 }
437 
439 {
440  assert(pPointControl);
441 
442  pPointControl->setParent(this);
443  _pointsControl.push_back(pPointControl);
444 
445  if (getCurrentCalcul()) // Uniquement pour la creation depuis un modeleur
446  {
448  pPointControl); // Le point de controle est actif dans le calcul courant
449  }
450 
451  setIsGeometryModified(true);
452 
453  return true;
454 }
455 
457 {
458  bool ret = false;
459  assert(pPointControl);
460  TYTabLPPointControl::iterator ite;
461 
462  for (ite = _pointsControl.begin(); ite != _pointsControl.end(); ite++)
463  {
464  if ((*ite) == pPointControl)
465  {
466  // Nettoyage des calculs concernes
467  for (unsigned int i = 0; i < this->_listCalcul.size(); i++)
468  {
469  if ((*ite)->etat(_listCalcul[i]) == true)
470  {
471  _listCalcul[i]->remPtCtrlFromResult((*ite));
472  }
473  }
474  _pointsControl.erase(ite);
475  ret = true;
476  setIsGeometryModified(true);
477  break;
478  }
479  }
480 
481  return ret;
482 }
483 
485 {
486  assert(pPoint);
487 
488  // Duplication du point
489  LPTYPointControl pPointCopy = new TYPointControl(*pPoint);
490 
491  // Ajout a la liste des points du projet
492  addPointControl(pPointCopy);
493 
494  return pPointCopy;
495 }
496 
498 {
499  _pointsControl.clear();
500  setIsGeometryModified(true);
501 
502  return true;
503 }
504 
506 {
507  assert(pCalcul);
508 
509  pCalcul->setParent(this);
510  _listCalcul.push_back(pCalcul);
511 
512  return true;
513 }
514 
515 bool TYProjet::remCalcul(const LPTYCalcul pCalcul)
516 {
517  assert(pCalcul);
518  bool ret = false;
519 
520  // On ne peut detruire le calcul courant
521  if (pCalcul == getCurrentCalcul())
522  {
523  return false;
524  }
525 
526  TYTabLPCalcul::iterator ite;
527 
528  for (ite = _listCalcul.begin(); ite != _listCalcul.end(); ite++)
529  {
530  if ((*ite) == pCalcul)
531  {
532  // remove calcul from noise map and control point status list
533  cleanReceptorsStatus((*ite));
534 
535  // Remove calcul from list
536  _listCalcul.erase(ite);
537  ret = true;
538  break;
539  }
540  }
541 
542  return ret;
543 }
544 
545 bool TYProjet::remCalcul(QString idCalcul)
546 {
547  bool ret = false;
548  TYTabLPCalcul::iterator ite;
549 
550  for (ite = _listCalcul.begin(); ite != _listCalcul.end(); ite++)
551  {
552  if ((*ite)->getID().toString() == idCalcul)
553  {
554  return remCalcul((*ite));
555  }
556  }
557 
558  return ret;
559 }
560 
562 {
563  _listCalcul.clear();
564 }
565 
567 {
568  _pSite = NULL;
569 }
570 
572 {
573  assert(pCurCalcul);
574 
575  // On test si le calcul est present dans la liste
576 
577  // Statut solveur ok par defaut
578  _bStatusSolver = true;
579 
580  // Calcul courant
581  _pCurrentCalcul = pCurCalcul;
582 
583  // Test si le solveur du calcul est bien disponible
585  {
586  _bStatusSolver = false;
587  }
588 
589  if (_pSite)
590  {
591  // Le site root associe au projet est obligatoirement actif dans le calcul courant
593  _pSite->setInCurrentCalcul(true, false);
595  _pSite->updateCurrentCalcul(aTYListID, true);
596  }
597 
598  // Mise jour des maillages
599  for (unsigned int i = 0; i < _maillages.size(); i++)
600  {
601  dynamic_cast<TYMaillage*>(_maillages.at(i)->getElement())->updateFromCalcul(_pCurrentCalcul);
602  }
603 
604 #if TY_USE_IHM
605  updateGraphic();
606 #endif
607  setIsGeometryModified(true);
608  setIsAcousticModified(true);
609 }
610 
612 {
613  assert(pPtControl);
614  assert(pAlti);
615 
616  bool modified = true;
617 
618  // On va modifier le point de contrele (l'altitude seulement)
619  // (Utile pour l'update du GraphicObject du maillage)
620  pPtControl->setIsGeometryModified(true);
621 
622  // Init
623  OPoint3D pt;
624 
625  pt._x = pPtControl->_x;
626  pt._y = pPtControl->_y;
627  pt._z = 0.0;
628 
629  // Recherche de l'altitude
630  modified = pAlti->updateAltitude(pt);
631 
632  // Ajout de l'offset en Z
633  pt._z += pPtControl->getHauteur();
634 
635  pPtControl->_z = pt._z;
636 
637  // Le point est maintenant up to date
638  pPtControl->setIsGeometryModified(false);
639 
640  return modified;
641 }
642 
644 {
645  TYAltimetrie* pAlti = getSite()->getAltimetry()._pObj;
646  return updateAltiRecepteurs(pAlti);
647 }
648 
650 {
651  assert(pAlti);
652  bool bNoPbAlti = true;
653  bool modified = false;
654 
655  // Mise a jour de l'altitude pour les points de controle
656  unsigned int i = 0;
657  for (i = 0; i < _pointsControl.size(); i++)
658  {
659  // XXX See ticket https://extranet.logilab.fr/ticket/1484180
660  // The coordinates of the problematic point need to be properly reported
661  // or idealy an exception should be thrown.
662  modified |= updateAltiPointControle(getPointControl(i), pAlti);
663  bNoPbAlti &= modified;
664  }
665 
666  // XXX See ticket https://extranet.logilab.fr/ticket/1484180:
667  // Why handling of PointControle and Recepteur are so different ?
668 
669  // Mise a jour de l'altitude pour les recepteurs du calcul
670  for (unsigned int i = 0; i < _maillages.size(); i++)
671  {
672  updateAltiMaillage(_maillages.at(i), pAlti);
673  }
674 
675  // Done
676  if (!bNoPbAlti)
677  {
678  OMessageManager::get()->info(TR("msg_pbalti"));
679  }
680 
681  setIsGeometryModified(modified);
682  return bNoPbAlti;
683 }
684 
686 {
687  assert(pCalcul);
688 
689  LPTYCalcul pCalculCopy = new TYCalcul();
690 
691  // Duplication
692  // On dit qu'on copie aussi l'ID pour que les ID des elements
693  // composant le calcul soit copiees
694  pCalculCopy->deepCopy(pCalcul, false);
695 
696  // On incremente aussi le numero du calcul
697  pCalculCopy->setNumero(pCalculCopy->getNumero() + 1);
698 
699  // Duplication de l'etat des points de controle
700  duplicatePtCalcState(pCalcul, pCalculCopy);
701 
702  // Duplication de l'tat des cartographies
703  duplicateNoiseMapState(pCalcul, pCalculCopy);
704 
705  // Ajout
706  addCalcul(pCalculCopy);
707 
708  return pCalculCopy;
709 }
710 
711 void TYProjet::duplicatePtCalcState(const TYCalcul* pCalculRef, TYCalcul* pCalculNew)
712 {
713  QString idCalculRef = pCalculRef->getID().toString();
714  QString idCalculNew = pCalculNew->getID().toString();
715 
716  for (unsigned int i = 0; i < _pointsControl.size(); i++)
717  {
718  _pointsControl[i]->duplicateEtat(idCalculRef, idCalculNew);
719  }
720 }
721 
722 void TYProjet::duplicateNoiseMapState(const TYCalcul* pCalculRef, TYCalcul* pCalculNew)
723 {
724  QString idCalculRef = pCalculRef->getID().toString();
725  QString idCalculNew = pCalculNew->getID().toString();
726 
727  for (unsigned int i = 0; i < _maillages.size(); i++)
728  {
729  dynamic_cast<TYMaillage*>(_maillages[i]->getElement())->duplicateEtat(idCalculRef, idCalculNew);
730  }
731 }
732 
734 {
735  for (unsigned int i = 0; i < _listCalcul.size(); i++)
736  {
737  _listCalcul[i]->remToSelection(pElement);
738  }
739 }
740 
741 void TYProjet::remTabElmtFromCalculs(std::vector<LPTYGeometryNode> tabGeoNode)
742 {
743  for (unsigned int i = 0; i < tabGeoNode.size(); i++)
744  {
745  remElmtFromCalculs(tabGeoNode[i]->getElement());
746  }
747 }
748 
750 {
751 
755 
757 }
758 
760 {
764 }
765 
767 {
768  double delaunay = 0.0001;
769 
770 #if TY_USE_IHM
771  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "DelaunayTolerance"))
772  {
773  delaunay = TYPreferenceManager::getDouble(TYDIRPREFERENCEMANAGER, "DelaunayTolerance");
774  }
775  else
776  {
777  TYPreferenceManager::setDouble(TYDIRPREFERENCEMANAGER, "DelaunayTolerance", delaunay);
778  }
779 #endif
780 
781  return delaunay;
782 }
783 
784 const double TYProjet::getDefaultDMax() const
785 {
786  double DMax = 100.0;
787 
788 #if TY_USE_IHM
789  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "DistMinPtCrbNiv"))
790  {
791  DMax = TYPreferenceManager::getDouble(TYDIRPREFERENCEMANAGER, "DistMinPtCrbNiv");
792  }
793  else
794  {
795  TYPreferenceManager::setDouble(TYDIRPREFERENCEMANAGER, "DistMinPtCrbNiv", DMax);
796  }
797 #endif
798 
799  return DMax;
800 }
801 
802 void TYProjet::setDMax(const double& val)
803 {
804  _maxDistBetweenPoints = val;
806 }
807 
809 {
810  assert(pSite);
811  _pSite = pSite;
812  _pSite->setParent(this);
813  _pSite->setProjet(this);
814  _pSite->setRoot(true); // Ce site est forcemment le site racine
815  _pSite->addToCalcul();
816  setIsGeometryModified(true);
817 }
818 
820 {
821  for (unsigned int i = 0; i < _listCalcul.size(); i++)
822  {
823  _listCalcul[i]->updateMaillage(pMaillage);
824  }
825 }
826 
828 {
829  assert(pMaillageGeoNode);
830  assert(pMaillageGeoNode->getElement());
831 
832  pMaillageGeoNode->setParent(this);
833  pMaillageGeoNode->getElement()->setParent(this);
834 
835  _maillages.push_back(pMaillageGeoNode);
836 
837  // Set in current calcul
838  if (getCurrentCalcul() != nullptr)
839  {
840  getCurrentCalcul()->addMaillage(dynamic_cast<TYMaillage*>(pMaillageGeoNode->getElement()));
841  }
842 
843  setIsGeometryModified(true);
844 
845  return true;
846 }
847 
849 {
850  return addMaillage(new TYMaillageGeoNode((LPTYElement)pMaillage));
851 }
852 
853 bool TYProjet::remMaillage(const LPTYMaillage pMaillage)
854 {
855  assert(pMaillage);
856 
857  TYGeometryNode* pNode = TYGeometryNode::GetGeoNode(dynamic_cast<TYElement*>(pMaillage._pObj));
858 
859  return remMaillage(pNode);
860 }
861 
862 bool TYProjet::remMaillage(const LPTYMaillageGeoNode pMaillageGeoNode)
863 {
864  assert(pMaillageGeoNode);
865  bool ret = false;
866 
867  // Suppression dans tous les calculs
868  for (unsigned int i = 0; i < _listCalcul.size(); i++)
869  {
870  _listCalcul.at(i)->remMaillage(dynamic_cast<TYMaillage*>(pMaillageGeoNode->getElement()));
871  }
872 
873  // Suppression de la liste des maillages du projet
874  TYTabMaillageGeoNode::iterator ite;
875 
876  for (ite = _maillages.begin(); ite != _maillages.end(); ite++)
877  {
878  if ((*ite) == pMaillageGeoNode)
879  {
880  _maillages.erase(ite);
881  ret = true;
882  setIsGeometryModified(true);
883  break;
884  }
885  }
886 
887  return ret;
888 }
889 
890 bool TYProjet::remMaillage(QString idMaillage)
891 {
892  bool ret = false;
893  TYTabMaillageGeoNode::iterator ite;
894 
895  for (ite = _maillages.begin(); ite != _maillages.end(); ite++)
896  {
897  if ((*ite)->getElement()->getID().toString() == idMaillage)
898  {
899  _maillages.erase(ite);
900  ret = true;
901  setIsGeometryModified(true);
902  break;
903  }
904  }
905 
906  return ret;
907 }
908 
910 {
911  _maillages.clear();
912  setIsGeometryModified(true);
913 
914  return true;
915 }
916 
918 {
919  assert(pMaillage);
920  TYTabMaillageGeoNode::iterator ite;
921 
922  for (ite = _maillages.begin(); ite != _maillages.end(); ite++)
923  {
924  if (TYMaillage::safeDownCast((*ite)->getElement()) == pMaillage)
925  {
926  return (*ite);
927  }
928  }
929 
930  return NULL;
931 }
932 
934 {
935 #if TY_USE_IHM
936  for (unsigned int i = 0; i < getMaillages().size(); i++)
937  {
938  TYMaillage* pMaillage = getMaillage(i);
939  pMaillage->getGraphicObject()->update();
940  }
941 #endif
942 }
943 
945 {
946  TYAltimetrie* pAlti = getSite()->getAltimetry()._pObj;
947  return updateAltiMaillage(pMaillageGeoNode, pAlti);
948 }
949 
950 bool TYProjet::updateAltiMaillage(TYMaillageGeoNode* pMaillageGeoNode, const TYAltimetrie* pAlti)
951 {
952  assert(pMaillageGeoNode);
953  assert(pAlti);
954 
955  bool modified = true;
956 
957  if (pMaillageGeoNode == NULL)
958  {
959  return false;
960  }
961 
962  TYPoint pt;
963  TYMaillage* pMaillage = TYMaillage::safeDownCast(pMaillageGeoNode->getElement());
964 
965  if (pMaillage == NULL)
966  {
967  return false;
968  }
969 
970  OMatrix matrix = pMaillageGeoNode->getMatrix();
971  OMatrix matrixinv = matrix.getInvert();
972  TYTabLPPointCalcul& tabpoint = pMaillage->getPtsCalcul();
973 
974  bool bNoPbAlti = true; // Permet de tester si tous les points sont altimtriss correctement.
975 
976  if (pMaillage->getComputeAlti()) // Cas des maillages rectangulaires et lineaires horizontaux
977  {
978 
979 #if TY_USE_IHM
980  TYProgressManager::setMessage("Calcul des altitudes des points de maillage");
981  TYProgressManager::set(static_cast<uint32>(tabpoint.size()));
982 #endif // TY_USE_IHM
983 
984  for (unsigned int i = 0; i < tabpoint.size(); i++)
985  {
986 
987 #if TY_USE_IHM
988  bool cancel = false;
989  TYProgressManager::step(cancel);
990  if (cancel)
991  {
992  break;
993  }
994 #endif // TY_USE_IHM
995 
996  pt = *tabpoint[i];
997  // Passage au repere du site
998  pt = matrix * pt;
999  pt._z = 0;
1000 
1001  // Recherche de l'altitude
1002  bNoPbAlti &= pAlti->updateAltitude(pt);
1003 
1004  // Retour au repere d'origine
1005  pt = matrixinv * pt;
1006 
1007  // Ajout de l'offset en Z
1008  pt._z += pMaillage->getHauteur();
1009 
1010  // Application du calcul
1011  tabpoint[i]->_x = pt._x;
1012  tabpoint[i]->_y = pt._y;
1013  tabpoint[i]->_z = pt._z;
1014  }
1015 
1016 #if TY_USE_IHM
1018 #endif // TY_USE_IHM
1019  }
1020  else // Cas des maillages verticaux
1021  {
1022  // Init
1023  pt = pMaillageGeoNode->getORepere3D()._origin;
1024  pt._z = 0.0;
1025 
1026  // Recherche de l'altitude
1027  bNoPbAlti &= pAlti->updateAltitude(pt);
1028 
1029  // Ajout de l'offset en Z
1030  pt._z += pMaillage->getHauteur();
1031 
1032  if (pMaillage->isA("TYRectangularMaillage"))
1033  {
1034  // Ajout d'un offset de la demi-hauteur (maillages verticaux)
1035  pt._z += ((TYRectangularMaillage*)pMaillage)->getRectangle()->getSizeY() / 2.0;
1036  }
1037 
1038  pMaillageGeoNode->getORepere3D()._origin._z = pt._z;
1039 
1040  modified = true;
1041  }
1042 
1043  if (!bNoPbAlti) // Certains point pas altimetrises
1044  {
1045  OMessageManager::get()->info(TR("msg_pbalti"));
1046  }
1047 
1048  // Done
1049  if (modified)
1050  {
1051 #if TY_USE_IHM
1052  pMaillage->updateGraphicTree();
1053 #endif
1054  setIsGeometryModified(true);
1055  }
1056 
1057  return modified;
1058 }
1059 
1061 {
1062  int i = 0, j = 0;
1063 
1064  // Recuperation des volumes
1065  TYInfrastructure* pInfra = pSite->getInfrastructure();
1066  TYTabAcousticVolumeNodeGeoNode tabVolNodeGeoNode;
1067 
1068  // On commence par recuperer la liste des machines et des btiments
1069  // Batiments
1070  for (j = 0; j < static_cast<int>(pInfra->getListBatiment().size()); j++)
1071  {
1072  // Si ce batiment est actif pour le calcul
1073  if (TYBatiment::safeDownCast(pInfra->getBatiment(j)->getElement())->isInCurrentCalcul())
1074  {
1075  tabVolNodeGeoNode.push_back((LPTYAcousticVolumeNodeGeoNode&)pInfra->getListBatiment()[j]);
1076  }
1077  }
1078 
1079  // Machines
1080  for (j = 0; j < static_cast<int>(pInfra->getListMachine().size()); j++)
1081  {
1082  // Si cette machine est active pour le calcul
1083  if (TYMachine::safeDownCast(pInfra->getMachine(j)->getElement())->isInCurrentCalcul())
1084  {
1085  tabVolNodeGeoNode.push_back((LPTYAcousticVolumeNodeGeoNode&)pInfra->getListMachine()[j]);
1086  }
1087  }
1088 
1089  // Ensuite, on verifie si des points du maillage ne sont pas a l'interieur
1090  std::vector<OPoint3D> tabPts;
1091 
1092  for (i = 0; i < static_cast<int>(getMaillages().size()); i++)
1093  {
1094  TYMaillage* pMaillage = getMaillage(i);
1095  TYMaillageGeoNode* pMaillageGeoNode = getMaillages()[i];
1096 
1097  // Matrice pour la position de ce maillage
1098  OMatrix matrixMaillage = pMaillageGeoNode->getMatrix();
1099  // Nb de points de calcul dans ce maillage
1100  size_t nbPtsCalcul = pMaillage->getPtsCalcul().size();
1101 
1102  tabPts.reserve(nbPtsCalcul); // Reservation du nombre de points pour eviter les mouvements memoire
1103 
1104  for (j = 0; (int)j < nbPtsCalcul; j++)
1105  {
1106  pMaillage->getPtsCalcul()[j]->setEtat(true);
1107  tabPts.push_back(matrixMaillage * (*(pMaillage->getPtsCalcul()[j])));
1108  }
1109 
1110  // Detection des points a l'interieur de volumes
1111  OPoint3D pt;
1112  for (j = 0; j < tabVolNodeGeoNode.size(); j++)
1113  {
1114  OMatrix matrixVolNode = tabVolNodeGeoNode[j]->getMatrix();
1115  matrixVolNode.invert();
1116 
1117  LPTYAcousticVolumeNode pVolumeNode =
1118  TYAcousticVolumeNode::safeDownCast(tabVolNodeGeoNode[j]->getElement());
1119  for (int k = 0; k < nbPtsCalcul; k++)
1120  {
1121  // Passage au repere du volume
1122  pt = matrixVolNode * tabPts[k];
1123 
1124  // Si le point se trouve a l'interieur de ce volume
1125  if (pVolumeNode->isInside(pt))
1126  {
1127  // Desactivation de ce point de calcul
1128  pMaillage->getPtsCalcul()[k]->setEtat(false);
1129  }
1130  }
1131  }
1132 
1133  // Le maillage et son GeoNode sont maintenant up to date
1134  pMaillage->setIsGeometryModified(false);
1135  pMaillageGeoNode->setIsGeometryModified(false);
1136 
1137  // Vidage du tableau de points
1138  tabPts.clear();
1139  }
1140 
1141  tabVolNodeGeoNode.clear();
1142 }
1143 
1145 {
1146  for (unsigned int i = 0; i < _pointsControl.size(); i++)
1147  {
1148  _pointsControl[i]->remEtat(pCalcul);
1149  }
1150 
1151  for (unsigned int i = 0; i < _maillages.size(); i++)
1152  {
1153  dynamic_cast<TYMaillage*>(_maillages[i]->getElement())->remEtat(pCalcul);
1154  }
1155 }
1156 
1158 {
1159  return _spectreForm == SPECTRE_FORM_OCT;
1160 }
1161 
1163 {
1165  TYElement::updateGraphic();
1166 }
QDomDocument DOM_Document
Definition: QT2DOM.h:33
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< LPTYAcousticVolumeNodeGeoNode > TYTabAcousticVolumeNodeGeoNode
Collection de noeuds geometriques de type TYAcousticVolumeNode.
std::vector< LPTYPointCalcul > TYTabLPPointCalcul
Collection de pointeurs de TYPointCalcul.
Definition: TYDefines.h:358
std::vector< LPTYSpectre > TYTabLPSpectre
Collection de TYSpectre.
Definition: TYDefines.h:337
std::list< TYUUID > TYListID
Collection d'identifiants.
Definition: TYDefines.h:331
#define TYDIRPREFERENCEMANAGER
Definition: TYElement.h:51
TYGeometryNode TYMaillageGeoNode
Noeud geometrique de type TYMaillage.
Definition: TYMaillage.h:434
Representation graphique d'un projet (fichier header)
outil IHM pour un projet (fichier header)
TY_EXTENSION_INST(TYProjet)
TY_EXT_GRAPHIC_INST(TYProjet)
#define TR(id)
Definition: TYProjet.cpp:33
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
The 4x4 matrix class.
Definition: 3d.h:625
int invert()
Matrix inversion.
Definition: 3d.cpp:792
OMatrix getInvert(int *ok=0) const
Return the inverse matrix of this matrix.
Definition: 3d.cpp:813
static OMessageManager * get()
Definition: logging.cpp:108
virtual void info(const char *message,...)
Definition: logging.cpp:143
The 3D point class.
Definition: 3d.h:487
virtual const char * getClassName() const
Definition: TYElement.h:248
static OPrototype * safeDownCast(OPrototype *pObject)
Definition: TYElement.cpp:71
bool isA(const char *className) const
Definition: TYElement.cpp:65
OPoint3D _origin
The origin point.
Definition: 3d.h:1331
T * _pObj
The real pointer, must derived IRefCount.
Definition: smartptr.h:307
virtual int isInside(const TYPoint &pt) const
Assigne une altitude a chaque point de l'espace.
Definition: TYAltimetrie.h:35
bool isUpToDate() const
Definition: TYAltimetrie.h:176
bool updateAltitude(OPoint3D &pt) const
Modifie l'altitude d'un point donn�. Si le point est hors de la zone dans laquelle l'altim�trie e...
void setIsUpToDate(bool isUpToDate)
Calculation program.
Definition: TYCalcul.h:50
void setSite(LPTYSiteNode pSite)
Definition of the site on which the calculation will be done.
Definition: TYCalcul.cpp:868
bool addPtCtrlToResult(LPTYPointControl pPoint)
Add a checkpoint to the results array.
Definition: TYCalcul.cpp:1141
TYListID getElementSelection() const
Get the selection of active elements in this Calculation.
Definition: TYCalcul.h:256
bool hasResuCtrlPoints()
Method used for migrating T310 project \ returns true if ResuCtrlPnts exists in xml project else retu...
Definition: TYCalcul.h:549
void setSpectre(const TYUUID &id_pt, TYSpectre *pSpectre)
Definition: TYCalcul.cpp:1257
int getNumero() const
Get the number.
Definition: TYCalcul.h:146
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYCalcul.cpp:177
const OGenID getSolverId() const
Get solver ID.
Definition: TYCalcul.h:465
bool addMaillage(TYMaillage *pMaillage)
Add this maillage to calcul.
Definition: TYCalcul.cpp:1318
void setNumero(int num)
Set the number.
Definition: TYCalcul.h:155
TYMapIdSpectre getMapPointCtrlSpectre()
Returns map of control points with spectrum.
Definition: TYCalcul.cpp:1392
bool addToSelection(TYUUID id)
Adds the item to the selection of this Calculation.
Definition: TYCalcul.cpp:873
static double setDefaultDistMax()
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYElement.cpp:366
QString _name
Nom courant de l'element.
Definition: TYElement.h:965
void cleanAllUses()
Definition: TYElement.h:939
void * getAllUses()
Definition: TYElement.h:931
TYElement & operator=(const TYElement &other)
Definition: TYElement.cpp:263
bool callFromXMLIfEqual(DOM_Element &domElement, int *pRetVal=NULL)
Definition: TYElement.cpp:542
const TYUUID & getID() const
Definition: TYElement.cpp:176
virtual void setInCurrentCalcul(bool state, bool recurschild=true, bool recursparent=true)
Definition: TYElement.cpp:408
void setParent(TYElement *pParent)
Definition: TYElement.h:699
virtual int fromXML(DOM_Element domElement)
Definition: TYElement.cpp:379
virtual void setIsAcousticModified(bool isModified)
Definition: TYElement.cpp:248
static TYElement * getInstance(TYUUID uuid)
Definition: TYElement.cpp:158
virtual void setIsGeometryModified(bool isModified)
Definition: TYElement.cpp:253
const ORepere3D & getORepere3D() const
TYElement * getElement() const
OMatrix getMatrix() const
static TYGeometryNode * GetGeoNode(TYElement *pElement)
TYTabBatimentGeoNode & getListBatiment()
LPTYMachineGeoNode getMachine(int index)
LPTYBatimentGeoNode getBatiment(int index)
TYTabMachineGeoNode & getListMachine()
Classe de definition d'un maillage.
Definition: TYMaillage.h:51
TYTabLPPointCalcul & getPtsCalcul()
Set/Get de la liste des points de calcul.
Definition: TYMaillage.h:123
double getHauteur() const
Definition: TYMaillage.h:187
virtual bool etat()
Definition: TYMaillage.cpp:616
bool getComputeAlti() const
Get de l'indicateur de calcul de l'altitude des points de ce maillage.
Definition: TYMaillage.h:207
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
static TYNameManager * get()
Retourne l'instance singleton.
static LPTYPluginManager get()
Classe de definition d'un point de controle.Le point de controle est un point de calcul avec une haut...
double getHauteur() const
Get de la hauteur de ce point par rapport au sol (a l'altimetrie en fait).
static void set(int totalSteps, int stepSize=1)
static void stepToEnd()
classe de definition d'un projet.
Definition: TYProjet.h:45
virtual std::string toString() const
Definition: TYProjet.cpp:168
bool _bStatusSolver
Definition: TYProjet.h:658
TYProjet & operator=(const TYProjet &other)
Operateur =.
Definition: TYProjet.cpp:74
TYSpectreForm _spectreForm
Definition: TYProjet.h:661
QString _dateCreation
Date de creation.
Definition: TYProjet.h:631
QString _dateModif
Date de modification.
Definition: TYProjet.h:633
void forceUseDefault()
Force l'utilisation des parametres par defaut.
Definition: TYProjet.cpp:759
QString _comment
Commentaires.
Definition: TYProjet.h:635
bool addMaillage(LPTYMaillageGeoNode pMaillageGeoNode)
Ajout d'un maillage.
Definition: TYProjet.cpp:827
TYTabMaillageGeoNode & getMaillages()
Get de la collection de maillages.
Definition: TYProjet.h:261
TYTabLPPointControl _pointsControl
Liste des points de controles.
Definition: TYProjet.h:644
bool operator==(const TYProjet &other) const
Operateur ==.
Definition: TYProjet.cpp:99
TYTabLPCalcul _listCalcul
Liste des Calcul.
Definition: TYProjet.h:641
const double getDefaultDMax() const
Relecture de la distance minimale entre deux points par defaut.
Definition: TYProjet.cpp:784
void remTabElmtFromCalculs(std::vector< LPTYGeometryNode > tabGeoNode)
Supprime un ensemble d'elements des calculs.
Definition: TYProjet.cpp:741
bool addPointControl(LPTYPointControl pPointControl)
Definition: TYProjet.cpp:438
LPTYCalcul _pCurrentCalcul
Un pointeur sur le Calcul courant.
Definition: TYProjet.h:650
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYProjet.cpp:173
void remElmtFromCalculs(TYElement *pElement)
Supprime un element de tous les calculs.
Definition: TYProjet.cpp:733
bool updateAltiMaillage(TYMaillageGeoNode *pMaillageGeoNode, const TYAltimetrie *pAlti)
Met a niveau l'altimetrie d'un maillage.
Definition: TYProjet.cpp:950
LPTYMaillageGeoNode findMaillage(const LPTYMaillage pMaillage)
Retrouve le GeoNode associe a un maillage.
Definition: TYProjet.cpp:917
bool remAllPointControl()
Definition: TYProjet.cpp:497
void setCurrentCalcul(LPTYCalcul pCurCalcul)
Set/Get du pointeur du Calcul courant.
Definition: TYProjet.cpp:571
void duplicateNoiseMapState(const TYCalcul *pCalculRef, TYCalcul *pCalculNew)
copie l'etat des points de controle pour un calcul pour un autre calcul
Definition: TYProjet.cpp:722
void cleanReceptorsStatus(TYCalcul *pCalcul)
clean status of control points and noise maps
Definition: TYProjet.cpp:1144
QString _auteur
Nom de l'auteur.
Definition: TYProjet.h:629
void selectActivePoint(const LPTYSiteNode pSite)
Selectionne les points actifs du maillage.
Definition: TYProjet.cpp:1060
bool updateAltiRecepteurs()
Definition: TYProjet.cpp:643
void verifGeometricParam()
verification des parametres de geometrisation (si necessaire)
Definition: TYProjet.cpp:749
TYProjet()
Constructeur. Le constructeur de la classe TYProjet.
Definition: TYProjet.cpp:37
TYTabMaillageGeoNode _maillages
Collections de Maillages.
Definition: TYProjet.h:647
bool remPointControl(LPTYPointControl pPointControl)
Definition: TYProjet.cpp:456
const double getDefaultDelaunayTolerence() const
Relecture de la valeur de tolerence de Delaunay par defaut.
Definition: TYProjet.cpp:766
const bool displaySpectrumInOctaveForm()
Definition: TYProjet.cpp:1157
bool remMaillage(const LPTYMaillageGeoNode pMaillageGeoNode)
Suppression d'un maillage.
Definition: TYProjet.cpp:862
bool remAllMaillage()
Suppression de tous les maillages.
Definition: TYProjet.cpp:909
virtual ~TYProjet()
Destructeur Le destructeur de la classe TYProjet .
Definition: TYProjet.cpp:69
double _delaunayTolerance
Parametres de geometrisation.
Definition: TYProjet.h:653
LPTYSiteNode getSite()
Get du site.
Definition: TYProjet.h:169
LPTYPointControl getPointControl(int index)
Definition: TYProjet.h:232
void setSite(const LPTYSiteNode pSite)
Set du site.
Definition: TYProjet.cpp:808
bool updateAltiPointControle(TYPointControl *pPtControl, const TYAltimetrie *pAlti)
Definition: TYProjet.cpp:611
LPTYSiteNode _pSite
Site.
Definition: TYProjet.h:638
void updateCalculsWithMaillage(TYMaillage *pMaillage)
Definition: TYProjet.cpp:819
bool _useDefaultGeomVal
Definition: TYProjet.h:655
void unsetSite()
Supprime la liaison avec le site.
Definition: TYProjet.cpp:566
double _maxDistBetweenPoints
Definition: TYProjet.h:654
void setDMax(const double &val)
Get/set de la distance max entre les points.
Definition: TYProjet.cpp:802
void duplicatePtCalcState(const TYCalcul *pCalculRef, TYCalcul *pCalculNew)
copie l'etat des points de controle pour un calcul pour un autre calcul
Definition: TYProjet.cpp:711
LPTYMaillage getMaillage(int index)
Retourne un maillage a partir de son index.
Definition: TYProjet.h:318
bool addCalcul(LPTYCalcul pCalcul)
Ajout d'un Calcul a la liste des Calcul.
Definition: TYProjet.cpp:505
LPTYCalcul duplicateCalcul(const LPTYCalcul pCalcul)
Duplique pCalcul.
Definition: TYProjet.cpp:685
virtual void updateGraphic()
Definition: TYProjet.cpp:1162
QString _spectrePond
Definition: TYProjet.h:663
bool operator!=(const TYProjet &other) const
Operateur !=.
Definition: TYProjet.cpp:163
virtual int fromXML(DOM_Element domElement)
Definition: TYProjet.cpp:224
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.
Definition: TYProjet.h:426
static bool gSaveValues
Definition: TYProjet.h:624
LPTYPointControl duplicatePointControl(const LPTYPointControl &pPoint)
Duplique pPoint.
Definition: TYProjet.cpp:484
bool remCalcul(const LPTYCalcul pCalcul)
Suppression d'un Calcul a la liste des Calcul.
Definition: TYProjet.cpp:515
void remAllCalcul()
Suppression de tous les elements.
Definition: TYProjet.cpp:561
void updateGraphicMaillage()
Mets a jour l'objet graphique des maillage apres calcul.
Definition: TYProjet.cpp:933
Classe de definition d'un maillage rectangulaire.
void setProjet(const LPTYProjet pProjet)
Definition: TYSiteNode.cpp:560
LPTYAltimetrie getAltimetry() const
virtual void updateCurrentCalcul(TYListID &listID, bool recursif=true)
Definition: TYSiteNode.cpp:544
virtual void setChildsNotInCurrentCalcul()
void setUseEmpriseAsCrbNiv(bool b)
Definition: TYSiteNode.h:130
LPTYInfrastructure getInfrastructure()
Definition: TYSiteNode.h:174
void update(const bool &force=false)
void setRoot(bool b)
Definition: TYSiteNode.h:329
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYSiteNode.cpp:271
virtual bool addToCalcul()
Definition: TYSiteNode.cpp:511
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 bool getElementStringValue(DOM_Element parentElem, DOMString nodeName, QString &nodeValue)
Definition: TYXMLTools.cpp:93
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 addElementBoolValue(DOM_Element &parentElem, DOMString nodeName, bool nodeValue)
Definition: TYXMLTools.cpp:77
static void addElementStringValue(DOM_Element &parentElem, DOMString nodeName, DOMString nodeValue)
Definition: TYXMLTools.cpp:24
unsigned int uint32
Definition: defines.h:75
TYSpectreForm
Spectrum representation.
Definition: spectre.h:36
@ SPECTRE_FORM_TIERS
Definition: spectre.h:37
@ SPECTRE_FORM_OCT
Definition: spectre.h:38
@ SPECTRE_FORM_UNSHAPED
Definition: spectre.h:40
@ SPECTRE_FORM_CST_DF
Definition: spectre.h:39