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