Parameters.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*!
  2. * \file Parameters.h
  3. * \brief paramètres du programme et du bassin versant.
  4. * \author The VLE Development Team
  5. * See the AUTHORS or Authors.txt file
  6. * \version 2.0
  7. * \date 12 juin 2013
  8. */
  9. /*
  10. * Copyright (C) 2012-2013 ULCO http://www.univ-littoral.fr
  11. * Copyright (C) 2012-2013 INRA http://www.inra.fr
  12. *
  13. * This program is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation, either version 3 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  25. */
  26. #ifndef PARAMETERS_H_
  27. #define PARAMETERS_H_
  28. #include <iostream>
  29. #include <sstream>
  30. /*! \class Parameters
  31. *
  32. * \brief Regroupe les paramètres du programme et du bassin versant.
  33. *
  34. */
  35. class Parameters
  36. {
  37. public :
  38. int _gap;
  39. bool _meshMode;
  40. int _riverLevel;
  41. int _displaySea;
  42. int _nodesPerLine;
  43. int _nodesPerColumn;
  44. int _linesNumber;
  45. int _columnsNumber;
  46. float _meshSize;
  47. float _horizontalMeshStep;
  48. float _verticalMeshStep;
  49. float _meshArea;
  50. float _colorColumnsNumber;
  51. int _charColumnsNumber;
  52. float lx0;
  53. float ly0;
  54. float lx1;
  55. float ly1;
  56. float lx2;
  57. float ly2;
  58. float lx3;
  59. float ly3;
  60. bool _lambertCadre;
  61. /*!
  62. * \brief Transformer en chaîne.
  63. *
  64. * Représentation chaînée de l'objet.
  65. *
  66. * \param void
  67. * \return string
  68. */
  69. const std::string toString() const
  70. {
  71. std::stringstream s;
  72. s << "\n - trou " <<((_gap == 0 ) ? "non" : "oui")<<"\n - modeMaille "<<((_meshMode == false ) ? "non" : "oui")<<"\n - afficherMer "<<((_displaySea == 0 ) ? "non" : "oui") <<"\n - nbNoeudLig "<<_nodesPerLine<<"\n - nbNoeudCol "<<_nodesPerColumn
  73. <<"\n - nbLig "<<_linesNumber<<"\n - nbCol "<<_columnsNumber<<"\n - tailleMaille "<<_meshSize<<"\n - pasMailleX "<<_horizontalMeshStep<<"\n - pasMailleY "<<_verticalMeshStep<<"\n - aireMaille "<<_meshArea<<
  74. "\n - colorColumnsNumber "<<_colorColumnsNumber<<"\n - nbColCar "<<_charColumnsNumber<<"\n - lx0 "<<lx0<<"\n - ly0 "<<ly0<<"\n - lx1 "<<lx1<<"\n - ly1 "<<ly1<<"\n - lx2 "<<lx2<<"\n - ly2 "<<ly2<<"\n - lx3 "<<lx3<<"\n - ly3 "<<ly3<<"\n - cadreLambert "<<((_lambertCadre == false ) ? "non" : "oui");
  75. return s.str();
  76. }
  77. };
  78. #endif /* PARAMETERS_H_ */