| 114 |
/// @return the IndividualRecords without children in the transmission |
/// @return the IndividualRecords without children in the transmission |
| 115 |
GEDCOMParser::IndividualRecords_t GEDCOMParser::LineageLinkageGedcom::getRootIndividuals(void) const; |
GEDCOMParser::IndividualRecords_t GEDCOMParser::LineageLinkageGedcom::getRootIndividuals(void) const; |
| 116 |
//@} |
//@} |
| 117 |
|
///@name Transmission edition facilities |
| 118 |
|
//@{ |
| 119 |
|
/// Add a spouse to family link |
| 120 |
|
SpouseToFamilyLink * AddSpouse(IndividualRecord * spouse); |
| 121 |
|
/// Remove a spouse to family link |
| 122 |
|
void RemoveSpouseToFamilyLink(IndividualRecord * individual, SpouseToFamilyLink * family_link); |
| 123 |
|
/// Add a child to family link |
| 124 |
|
ChildToFamilyLink * AddParents(IndividualRecord * child); |
| 125 |
|
/// Remove a child to family link |
| 126 |
|
void RemoveChildToFamilyLink(IndividualRecord * individual, ChildToFamilyLink * family_link); |
| 127 |
|
/// Remove a family record |
| 128 |
|
void RemoveFamilyRecord(FamilyRecord const &family); |
| 129 |
|
//@} |
| 130 |
|
|
| 131 |
/// @return true if the individual record has at least one child in the current transmission |
/// @return true if the individual record has at least one child in the current transmission |
| 132 |
bool hasChildren(IndividualRecord const * const) const; |
bool hasChildren(IndividualRecord const * const) const; |
| 133 |
|
bool FamilyIsUsed(FamilyRecord const * const) const; |
| 134 |
void Accept(GEDCOMParser::GEDCOMVisitor *); |
void Accept(GEDCOMParser::GEDCOMVisitor *); |
| 135 |
private: |
private: |
| 136 |
SmartPtr < Header > _header; |
SmartPtr < Header > _header; |
| 144 |
SubmitterRecords_t _submitter_records; |
SubmitterRecords_t _submitter_records; |
| 145 |
GEDCOMParser::IdGenerator * _id_generator; |
GEDCOMParser::IdGenerator * _id_generator; |
| 146 |
}; |
}; |
| 147 |
|
class FamilyIsNotUsed : public std::binary_function<GEDCOMParser::LineageLinkageGedcom const * const, std::pair<std::string, SmartPtr<GEDCOMParser::FamilyRecord > >, bool> { |
| 148 |
|
bool operator()(GEDCOMParser::LineageLinkageGedcom const * const lineage, |
| 149 |
|
std::pair<std::string, SmartPtr<GEDCOMParser::FamilyRecord> > family) const |
| 150 |
|
{ |
| 151 |
|
bool res = lineage->FamilyIsUsed(family.second.getPtr()); |
| 152 |
|
return res; |
| 153 |
|
}; |
| 154 |
|
}; |
| 155 |
class hasChildObject : public std::binary_function<GEDCOMParser::LineageLinkageGedcom const * const, std::pair<std::string, SmartPtr<GEDCOMParser::IndividualRecord > >, bool> { |
class hasChildObject : public std::binary_function<GEDCOMParser::LineageLinkageGedcom const * const, std::pair<std::string, SmartPtr<GEDCOMParser::IndividualRecord > >, bool> { |
| 156 |
public: |
public: |
| 157 |
bool operator()(GEDCOMParser::LineageLinkageGedcom const * const lineage, |
bool operator()(GEDCOMParser::LineageLinkageGedcom const * const lineage, |