Debian Codegraph @

src/chaineficpop.h

raw
1 // This program is free software; you can redistribute it and/or modify
2 // it under the terms of the GNU General Public License as published by
3 // the Free Software Foundation; either version 2 of the License, or
4 // (at your option) any later version.
5 //
6 // This program is distributed in the hope that it will be useful,
7 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 // GNU Library General Public License for more details.
10 //
11 // You should have received a copy of the GNU General Public License
12 // along with this program; if not, write to the Free Software
13 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
14
15 //created:
16 //mer sep 06 14:23:39 CEST 2000 Langella <[email protected]>
17
18
19 /***************************************************************************
20 chaineficpop.h - Objet pour faciliter la lecture de fichiers genepop/populations
21 -------------------
22 begin : ven sep 06 10:25:55 CEST 2000
23 copyright : (C) 2000 by Olivier Langella CNRS UPR9034
24 email : [email protected]
25 ***************************************************************************/
26
27 #ifndef CHAINEFICPOP_H
28 #define CHAINEFICPOP_H
29
30 #include"vecteurs.h"
31
32 //typedef biolib::vecteurs::ChaineCar ChaineCar;
33
34 class ChaineFicPop: public biolib::vecteurs::ChaineCar {
35 public:
36 ChaineFicPop(istream & fichier);
37 ~ChaineFicPop();
38
39 int get_titre(biolib::vecteurs::Titre & titres);
40 int get_locus(biolib::vecteurs::Titre & locus);
41
42 int get_lignepop();
43 int get_nompop(biolib::vecteurs::ChaineCar & nompop) const;
44 int get_nomind(biolib::vecteurs::ChaineCar & nomind) const;
45 int get_alleles(biolib::vecteurs::Titre & alleles) const;
46
47 long get_numeroligne() const;
48
49 bool estunepop();
50 bool estunindividu() const;
51 bool findefichier() const;
52 bool get_boolnompop() const;
53
54 protected:
55 void ajout_locus(biolib::vecteurs::Titre & locus) const;
56
57 bool get_ligne();
58 bool estuntitre();
59
60 int _type_fichier; //1-> genepop 2-> populations 0-> indéterminé -1 -> non reconnu
61 long _numeroligne;
62 bool _danspop;
63 bool _findefichier;
64 bool _boolnompop;
65
66 istream & _fichier;
67
68 string _chainetemp;
69 string _nompop;
70 public:
71 struct Anomalie {
72 // 1-> fin de fichier précoce
73 // 2-> Le début de pop n'est pas indiqu
74 // 3-> fichier XML
75
76 int le_pb;
77 Anomalie(int i) :
78 le_pb(i) {
79 }
80 ;
81 };
82
83 };
84
85 #endif
86