Debian Codegraph @

src/applications.h

raw
1 /***************************************************************************
2 applications.h - Librairie d'objets pour creer des applications
3 -------------------
4 begin : ven aug 14 10:25:55 CEST 2000
5 copyright : (C) 2000 by Olivier Langella CNRS UPR9034
6 email : [email protected]
7 ***************************************************************************/
8
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18 #ifndef APPLICATIONS_H
19 #define APPLICATIONS_H
20
21 //#define __ENABLE_WSTRING
22
23 #include "internat.h"
24
25 #include "matrices.h"
26
27 # ifndef COMPILATION_MINGW32
28 //# include "gzstream.h"
29 # endif
30
31 using namespace std;
32 using namespace biolib::vecteurs;
33
34 class Application {
35 public:
36
37 Application();
38 virtual ~Application() {};
39
40 virtual void lancement(int nbcommandes=0, char ** commandes=0);
41 /** test si nomfichier existe */
42 virtual bool fFichierExiste(const string & nomfichier);
43
44 protected:
45 virtual int menu_principal();
46 virtual int menu_formatMatrice();
47 virtual void affPubEntree() const;
48 virtual void affPubSortie() const;
49 virtual void fLigneCommande(char ** commandes, int nbcommandes);
50
51 virtual bool DemandeOuiNon(char laquestion[]) const;
52 virtual int DemandeEntier(const string & laquestion, int inf, int sup) const;
53 virtual int DemandeEntier(char laquestion[], int inf, int sup, int defaut) const;
54 virtual float DemandeReel(char laquestion[], float inf, float sup) const;
55 virtual int DemandeChoix(int inf, int sup) const;
56 virtual string DemandeString(char laquestion[]) const;
57 virtual string DemandeFichier(const string & laquestion);
58 bool litMatriceLD(MatriceLD & mat);
59 bool litJeuMatriceLD(JeuMatriceLD &jeumat);
60 bool ecritMatriceLD(MatriceLD & mat, string nomFichier="", int format=0);
61 bool ecritJeuMatriceLD(const JeuMatriceLD & jeumat, string nomFichier="", int format=0);
62
63
64 string _nomFichier;
65 int _choix;
66 int _formatMatrice; // 1-> Excel
67
68
69 ifstream _fichier;
70
71 ofstream _sortie;
72
73 bool _confirmeEcraseFichier;
74
75 };
76
77 #endif
78