/[ghosts]/ghosts/gedcomparser/src/gedcompredicates.cpp
ViewVC logotype

Diff of /ghosts/gedcomparser/src/gedcompredicates.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by cpcp, Sun Jul 27 19:35:22 2003 UTC revision 1.2 by cpcp, Sun Jul 27 19:55:03 2003 UTC
# Line 34  Line 34 
34  #include "GEDCOMParser/Predicates/HasChild.hh"  #include "GEDCOMParser/Predicates/HasChild.hh"
35  #include "GEDCOMParser/Predicates/IsMale.hh"  #include "GEDCOMParser/Predicates/IsMale.hh"
36  #include "GEDCOMParser/Predicates/HasSpouse.hh"  #include "GEDCOMParser/Predicates/HasSpouse.hh"
 #include "GEDCOMParser/Predicates/FamilyIsNotUsed.hh"  
37  #include "GEDCOMParser/Predicates/NameEqualsTo.hh"  #include "GEDCOMParser/Predicates/NameEqualsTo.hh"
38    
39  #include <string>  #include <string>
# Line 152  int main(int argc, char **argv) Line 151  int main(int argc, char **argv)
151            std::cout << _("Individuals records : ") << individus.size() << std::endl;            std::cout << _("Individuals records : ") << individus.size() << std::endl;
152            GEDCOMParser::Predicates::PredicateIndividualRecords * predicate;            GEDCOMParser::Predicates::PredicateIndividualRecords * predicate;
153                        
154            predicate = GEDCOMParser::Predicates::get_generic_predicate_individual_records(std::compose1(std::logical_not<bool>(), std::bind1st(GEDCOMParser::Predicates::HasChild(), lineage)));            predicate = GEDCOMParser::Predicates::getGenericPredicateIndividualRecords(std::compose1(std::logical_not<bool>(), std::bind1st(GEDCOMParser::Predicates::HasChild(), lineage)));
155            countrecords(individus, _("Individuals records without children : "), predicate);            countrecords(individus, _("Individuals records without children : "), predicate);
156            delete predicate; predicate = 0;            delete predicate; predicate = 0;
157                        
158            predicate = GEDCOMParser::Predicates::get_generic_predicate_individual_records(std::compose1(std::logical_not<bool>(), std::bind1st(GEDCOMParser::Predicates::HasChild(), lineage)));            predicate = GEDCOMParser::Predicates::getGenericPredicateIndividualRecords(std::compose1(std::logical_not<bool>(), std::bind1st(GEDCOMParser::Predicates::HasChild(), lineage)));
159            countrecords(individus, _("Individuals records female : "), predicate);            countrecords(individus, _("Individuals records female : "), predicate);
160            delete predicate; predicate = 0;            delete predicate; predicate = 0;
161                        
# Line 164  int main(int argc, char **argv) Line 163  int main(int argc, char **argv)
163            countrecords(individus, _("Individuals records male : "), predicate);            countrecords(individus, _("Individuals records male : "), predicate);
164            delete predicate; predicate = 0;            delete predicate; predicate = 0;
165                        
166            predicate = GEDCOMParser::Predicates::get_generic_predicate_individual_records(std::compose1(std::logical_not<bool>(), std::bind1st(GEDCOMParser::Predicates::HasSpouse(), lineage)));            predicate = GEDCOMParser::Predicates::getGenericPredicateIndividualRecords(std::compose1(std::logical_not<bool>(), std::bind1st(GEDCOMParser::Predicates::HasSpouse(), lineage)));
167            countrecords(individus, _("Individuals records bachelor : "), predicate);            countrecords(individus, _("Individuals records bachelor : "), predicate);
168            delete predicate; predicate = 0;            delete predicate; predicate = 0;
169                        
170            GEDCOMParser::FamilyRecords_t families = lineage->getFamilyRecords();            GEDCOMParser::FamilyRecords_t families = lineage->getFamilyRecords();
171            std::cout << _("Family records : ") << families.size() << std::endl;            std::cout << _("Family records : ") << families.size() << std::endl;
           std::cout << _("Family records not used : ");  
           int nb_families_not_used =  std::count_if(families.begin(), families.end(), std::bind1st(GEDCOMParser::Predicates::FamilyIsNotUsed(), lineage));  
           std::cout << nb_families_not_used << std::endl;  
172          }          }
173        else        else
174          {          {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26