/[ghosts]/ghosts/gedcomviewer/src/BakeryGateway/ViewChildToFamilyLink.cpp
ViewVC logotype

Diff of /ghosts/gedcomviewer/src/BakeryGateway/ViewChildToFamilyLink.cpp

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

revision 1.11 by cpcp, Wed Mar 26 10:37:36 2003 UTC revision 1.12 by cpcp, Sun Aug 3 19:50:47 2003 UTC
# Line 24  Line 24 
24  #include "OneChildToFamilyLink.hh"  #include "OneChildToFamilyLink.hh"
25  #include "OneChildToFamilyLinkHandler.hh"  #include "OneChildToFamilyLinkHandler.hh"
26  #include "MMIMenuLinkEditor.hh"  #include "MMIMenuLinkEditor.hh"
27    #include "GEDCOMParser/Predicates/GenericPredicateIndividualRecords.hh"
28    #include "GEDCOMParser/Predicates/PredicateIndividualRecords.hh"
29    #include "GEDCOMParser/Predicates/IsMale.hh"
30    #include "GEDCOMParser/Predicates/HasChild.hh"
31    #include "GEDCOMParser/Predicates/NameEqualsTo.hh"
32    
33  BakeryGateway::ViewChildToFamilyLink::ViewChildToFamilyLink(MMIChildToFamilyLink * mmi) :  BakeryGateway::ViewChildToFamilyLink::ViewChildToFamilyLink(MMIChildToFamilyLink * mmi) :
34    _mmi_childtofamilylink(mmi)    _mmi_childtofamilylink(mmi)
# Line 119  bool BakeryGateway::ViewChildToFamilyLin Line 124  bool BakeryGateway::ViewChildToFamilyLin
124        std::string  * individu_id = new std::string(_parent_entity->getId());        std::string  * individu_id = new std::string(_parent_entity->getId());
125        OneFamilyLinkHandler::NavigationSlotHandler_t * navigation_slot_father = getNavigationSlotHandler(father_id);        OneFamilyLinkHandler::NavigationSlotHandler_t * navigation_slot_father = getNavigationSlotHandler(father_id);
126        OneFamilyLinkHandler::NavigationSlotHandler_t * navigation_slot_mother = getNavigationSlotHandler(mother_id);        OneFamilyLinkHandler::NavigationSlotHandler_t * navigation_slot_mother = getNavigationSlotHandler(mother_id);
127        OneFamilyLinkHandler::PopdownLinkEditionSlotHandler_t * popdownlinkedition_slot_father = getPopdownLinkEditionSlotHandler(individu_id);  
128        OneFamilyLinkHandler::PopdownLinkEditionSlotHandler_t * popdownlinkedition_slot_mother = getPopdownLinkEditionSlotHandler(individu_id);        GEDCOMParser::LineageLinkageGedcom const * const lineage = get_document();
129          std::string const name = _parent_entity->getPersonalNames()[0]->getGivn();
130          SmartPtr < GEDCOMParser::Predicates::PredicateIndividualRecords >  * father_predicate = new SmartPtr < GEDCOMParser::Predicates::PredicateIndividualRecords > (GEDCOMParser::Predicates::getGenericPredicateIndividualRecords(                                                                                                                                                                                                                                std::compose2(std::logical_and<bool>(),
131                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      std::compose1(
132                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    std::logical_not<bool>(),
133                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    std::bind1st(GEDCOMParser::Predicates::HasChild(),lineage)),
134                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      std::compose2(std::logical_and<bool>(),
135                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    GEDCOMParser::Predicates::IsMale(),
136                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    std::bind1st(GEDCOMParser::Predicates::NameEqualsTo(), name)
137                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
138                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    )
139                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      )
140                                                                                                                                                                                                                                                                                                                                                                                                                                                                        );
141    
142          OneFamilyLinkHandler::PopdownLinkEditionSlotHandler_t * popdownlinkedition_slot_father = getPopdownLinkEditionSlotHandler(individu_id, father_predicate);
143          OneFamilyLinkHandler::PopdownLinkEditionSlotHandler_t * popdownlinkedition_slot_mother = getPopdownLinkEditionSlotHandler(individu_id, father_predicate);
144                
145        OneFamilyLinkHandler * familylink_handler_tmp = new OneChildToFamilyLinkHandler(father, mother, navigation_slot_father, navigation_slot_mother, popdownlinkedition_slot_father, popdownlinkedition_slot_mother);        OneFamilyLinkHandler * familylink_handler_tmp = new OneChildToFamilyLinkHandler(father, mother, navigation_slot_father, navigation_slot_mother, popdownlinkedition_slot_father, popdownlinkedition_slot_mother);
146        *familylink_handler = familylink_handler_tmp;        *familylink_handler = familylink_handler_tmp;
# Line 142  void BakeryGateway::ViewChildToFamilyLin Line 162  void BakeryGateway::ViewChildToFamilyLin
162    std::cerr << "Family edited : individu id = " << id << std::endl;    std::cerr << "Family edited : individu id = " << id << std::endl;
163    return;    return;
164  }  }
165    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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