Debian Codegraph @

src/allele.h

raw
1 /***************************************************************************
2 allele.h - description
3 -------------------
4 begin : Thu Sep 14 2000
5 copyright : (C) 2000 by Olivier Langella
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 ALLELE_H
19 #define ALLELE_H
20
21 //#include "arbres.h"
22 #include "vecteurs.h"
23
24 using namespace std;
25
26 class Individu;
27 class Population;
28 class Allele;
29 class StrucPop;
30 class Locus;
31 class Jeupop;
32 class ConstGnt;
33
34 typedef biolib::vecteurs::ChaineCar ChaineCar;
35 //allèle
36 class Allele {
37 public :
38 // Allele();
39 Allele(Locus*);
40 // Allele(Locus*, const Allele &);
41 Allele(const Allele &, Locus * Ploc);//constructeur de sopies
42 Allele(Locus*, const char *);
43 Allele(Locus*, const string &);
44 ~Allele();
45 bool f_verifnum(int) const;
46
47 // string& get_NomLocus();
48 const string& get_Nom() const {return(_nom);};
49 Locus * get_Ploc() const {return(_Ploc);};
50 const string& get_nom() const {return(_nom);};
51 const string& get_NomLocus() const;
52 const unsigned int get_nbrepet() const{return(_nbrepet);};
53 void set_nbrepet(unsigned int nbrepet) {_nbrepet = nbrepet;};
54
55 void set_Plocus(Locus * Ploc) {_Ploc = Ploc;};
56 void set_nom(const char * mot) {_nom = mot;};
57 void set_nom(const ChaineCar& mot) {_nom = mot;};
58 void set_idXML(const string& id) {_idXML = id;};
59
60 const string& get_idXML() const {return(_idXML);};
61
62 bool r_estnul() const {return(_miss);};
63 bool r_nonnul() const {return(!_miss);};
64
65 const Allele& operator= (const Allele &);
66 bool operator== (const Allele & rval) const;
67
68 friend class Locus;
69 friend class Individu;
70 friend class StrucPop;
71 friend class Jeupop;
72 friend class DistancesGnt;
73
74 private :
75 // int _occurence; //nb d'occurences de cet allèle dans le jeu de populations
76 bool r_ismissingvalue(const string &) const;
77 string _nom;
78 // char _nomgpop[4];
79 Locus * _Ploc;
80 bool _miss; //missing value
81 unsigned int _nbrepet; //specifique aux microsatellite: nombre de repetitions de motifs
82 // int _nbind; //nb d'individus pourvus de cet allèle
83 // Individu ** _tabPind;
84 string _idXML; //sert à la lecture et à l'écriture en XML
85
86 };
87
88 #endif