
// This file is part of the Herezh++ application.
//
// The finite element software Herezh++ is dedicated to the field
// of mechanics for large transformations of solid structures.
// It is developed by Gérard Rio (APP: IDDN.FR.010.0106078.000.R.P.2006.035.20600)
// INSTITUT DE RECHERCHE DUPUY DE LÔME (IRDL) <https://www.irdl.fr/>.
//
// Herezh++ is distributed under GPL 3 license ou ultérieure.
//
// Copyright (C) 1997-2022 Université Bretagne Sud (France)
// AUTHOR : Gérard Rio
// E-MAIL  : gerardrio56@free.fr
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
// For more information, please consult: <https://herezh.irdl.fr/>.

#include "Banniere.h"

// VARIABLES static :
Tableau <string>  Banniere::la_banniere; // création du tableau par défaut
string Banniere::copipirate; // le copipirate

 // création de la banniére par un artifice
    // 1° préparation
    
Banniere::Construc_banniere::Construc_banniere()
 { la_banniere.Change_taille(16);
   la_banniere(1) =   "\n#######################################################################";
   la_banniere(2) =   "\n#                                                                     #";
   la_banniere(3) =   "\n#       |    |  ====  ===   ====  ====  |    |      |        |        #";
   la_banniere(4) =   "\n#       |    |  |     |  |  |        /  |    |      |        |        #";
   la_banniere(5) =   "\n#       |====|  |===  ===   |===    /   |====|   -------  -------     #";
   la_banniere(6) =   "\n#       |    |  |     | \\   |      /    |    |      |        |        #";
   la_banniere(7) =   "\n#       |    |  ====  |  \\  ====  ====  |    |      |        |        #";
   la_banniere(8) =   "\n#                                                                     #";
   la_banniere(9) =   "\n#######################################################################";
   la_banniere(10) =  "\n#  Herezh++ is distributed under GPL 3 license ou ultérieure.         #";
   la_banniere(11) =  "\n#  Copyright (C) 1997-2022 Université Bretagne Sud (France)           #";
   la_banniere(12) =  "\n#  AUTHOR : Gérard Rio                                                #";
   la_banniere(13) =  "\n#  E-MAIL  : gerardrio56@free.fr                                      #";
   la_banniere(14) =  "\n#  Certification IDDN.FR.010.0106078.000.R.P.2006.035.20600           #";
   la_banniere(15) =  "\n#                                                                     #";
   la_banniere(16) =  "\n#######################################################################";
  
   copipirate="Copyright (C) 1997-2022 Université Bretagne Sud (France), AUTHOR : Gérard Rio (gerardrio56@free.fr)/";
  }; 
    // 2° création réelle
    
Banniere::Construc_banniere Banniere::construc_ban;   
     

// affichage de la banniere sur la sortie passée en argument
void Banniere::Sortie_banniere(ofstream & sort)
  { int taille = la_banniere.Taille();
    for (int i=1;i<= taille;i++)
      sort << la_banniere(i);
#ifndef MISE_AU_POINT
      sort << "\n# (version la plus rapide )";
#endif   
#ifdef MISE_AU_POINT
      sort << "\n# (version avec le plus de verifications pendant le calcul et les I/O ) ";
#endif
  };
// affichage de la banniere sur cout
void Banniere::Sortie_banniere()
  { int taille = la_banniere.Taille();
    for (int i=1;i<= taille;i++)
      cout << la_banniere(i);
#ifndef MISE_AU_POINT
      cout << "\n# (version la plus rapide )";
#endif
#ifdef MISE_AU_POINT
      cout << "\n# (version avec le plus de verifications pendant le calcul et les I/O ) ";
#endif
   };

// passage en lecture de la banniere
void Banniere::Passage_lecture_banniere(ifstream& entr)
  { int taille = la_banniere.Taille();
    string toto;
    for (int i=1;i<= taille;i++)
      entr >> toto;
   };
