mapgd  0.4
A program for the Maximum-likelihood analysis of population genomic data.
 All Data Structures Functions Variables Friends Groups Pages
pedigree.h
1 #ifndef _PEDIGREE_DATA_H_
2 #define _PEDIGREE_DATA_H_
3 
4 #include <cstring>
5 
6 #include <iostream>
7 #include <cfloat>
8 #include <iomanip>
9 #include <vector>
10 #include <sstream>
11 
12 #include "typedef.h"
13 #include "data.h"
14 
15 #define E_LIM 25
16 
18 class Pedigree : public Data{
19 private:
20  void write (std::ostream&) const;
21  void read (std::istream&);
22  static const Registration registered;
23  static Data * create(const std::vector <std::string> & Columns){
24  return new Pedigree(Columns);
25  }
26 public:
27  Pedigree_record *parents;
28  Pedigree_record *roots;
29 
30  char delim;
31 
32  Pedigree();
34  Pedigree(const std::vector <std::string> &) : Pedigree(){};
36  Pedigree(const std::string &, const std::string &);
37 
39  std::string header(void) const;
41  size_t size(void) const;
42 
43  static const std::string file_name;
44  static const std::string table_name;
45  static const bool binary;
46 
47  const bool get_binary() const;
48 
49  Pedigree& operator=(const Pedigree &rhs);
50 };
51 
52 #endif
size_t size(void) const
Size in bytes for binary read/write.
Pedigree data.
Definition: pedigree.h:18
Pedigree(const std::vector< std::string > &)
Delegating a neccisary constructor.
Definition: pedigree.h:34
std::string header(void) const
The header line of plain text files.
char delim
the delimiter used when reading/writing the class in text mode.
Definition: pedigree.h:30
Definition: pedigree_record.h:7
void read(std::istream &)
use to read Allele. Inherits >>
static const std::string table_name
Destination table in Db.
Definition: pedigree.h:44
void write(std::ostream &) const
use to write Allele. Inherits <<
A class which registers a child of Data in Data::new_data_.
Definition: data.h:222
A class which can be written as flat text file or into an SQL database.
Definition: data.h:34
static const std::string file_name
The dafualt extention for files.
Definition: pedigree.h:43