65 |
return; |
return; |
66 |
} |
} |
67 |
|
|
68 |
|
void GEDCOMParser::FamilyRecord::setSpouse(GEDCOMParser::IndividualRecord const &individual) |
69 |
|
{ |
70 |
|
if (individual.getSex() == GEDCOMParser::IndividualRecord::MALE) |
71 |
|
{ |
72 |
|
setHusb(individual.getId()); |
73 |
|
} |
74 |
|
else |
75 |
|
{ |
76 |
|
setWife(individual.getId()); |
77 |
|
} |
78 |
|
return; |
79 |
|
} |
80 |
|
|
81 |
|
std::string GEDCOMParser::FamilyRecord::getSpouseId(GEDCOMParser::IndividualRecord const &individual) const |
82 |
|
{ |
83 |
|
std::string res = getHusb(); |
84 |
|
if (individual.getSex() == GEDCOMParser::IndividualRecord::MALE) |
85 |
|
{ |
86 |
|
res = getWife(); |
87 |
|
} |
88 |
|
return res; |
89 |
|
} |
90 |
|
|
91 |
|
void GEDCOMParser::FamilyRecord::RemoveSpouse(GEDCOMParser::IndividualRecord const &individual) |
92 |
|
{ |
93 |
|
if (individual.getSex() == GEDCOMParser::IndividualRecord::MALE) |
94 |
|
{ |
95 |
|
if (getHusb() == individual.getId()) |
96 |
|
{ |
97 |
|
setHusb(""); |
98 |
|
} |
99 |
|
} |
100 |
|
else |
101 |
|
{ |
102 |
|
if (getWife() == individual.getId()) |
103 |
|
{ |
104 |
|
setWife(""); |
105 |
|
} |
106 |
|
} |
107 |
|
return; |
108 |
|
} |
109 |
|
|
110 |
void GEDCOMParser::FamilyRecord::addChilXref(std::string const & value) |
void GEDCOMParser::FamilyRecord::addChilXref(std::string const & value) |
111 |
{ |
{ |
112 |
_chil_xrefs.push_back(value); |
_chil_xrefs.push_back(value); |
113 |
return; |
return; |
114 |
} |
} |
115 |
|
|
116 |
|
void GEDCOMParser::FamilyRecord::RemoveChilXref(std::string const & value) |
117 |
|
{ |
118 |
|
ChildXrefs_t::iterator iter = find(_chil_xrefs.begin(), _chil_xrefs.end(), value); |
119 |
|
_chil_xrefs.erase(iter); |
120 |
|
return; |
121 |
|
} |
122 |
|
|
123 |
void GEDCOMParser::FamilyRecord::setNchi(std::string const & value) |
void GEDCOMParser::FamilyRecord::setNchi(std::string const & value) |
124 |
{ |
{ |
125 |
_nchi = value; |
_nchi = value; |