Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

PedigreeSet.h

Go to the documentation of this file.
00001 #include <iostream>
00002 #include "DataTable.h"
00003 #include "Data.h"
00004 #include "Pedigree.h"
00005 #include "LabelSet.h"
00006 
00011 struct ltstr
00012 {
00013         bool operator()(Data *c1,Data *c2) const{
00014                 return (*c1 < *c2);
00015         }
00016 };
00017 
00018 struct eqstr
00019 {
00020         bool operator()(Data *c1,Data *c2) const{
00021                 return (*c1 == *c2);
00022         }
00023 };
00024 
00025 struct comparePedigrees{
00026         bool operator()(Pedigree *p1,Pedigree *p2) const{
00027                 if(p1->getId() == p2->getId()) return p1->getTableId() < p2->getTableId();
00028                 return p1->getId() < p2->getId();
00029         }
00030 };
00031 
00032 
00033 class PedigreeSet{
00034 public:
00035         
00036         PedigreeSet(){ }
00037         ~PedigreeSet();
00038         void addPedigreesFromDataTable(const DataTable * p_pedigreeTable,unsigned tableIndex,const std::string& sortField);
00039         void draw(const DataTable *const pedigreeTable);
00040         // Debug:
00041         void display();                          // Prints out all pedigrees that have been read in
00042 
00043 private:
00044         std::set<Pedigree*,comparePedigrees> _pedigrees;          // Set of pedigrees
00045         
00046         void _checkParentChildDOB();
00047         void _computeWidths(const std::string& sortField,bool dobSortOrder=false);
00048         void _determineFoundingGroups();
00049         void _establishConnections();
00050         void _setCoreOptionalFields(const DataTable* pedigreeTable);
00051         
00052 };
00053 

Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4