47 |
return; |
return; |
48 |
} |
} |
49 |
|
|
50 |
void GEDCOMParser::IndividualRecord::addIndividualEvent(GEDCOMParser::IndividualEvent * const ie) |
GEDCOMParser::IndividualEvent * GEDCOMParser::IndividualRecord::addIndividualEvent(GEDCOMParser::IndividualEvent * const ie = 0) |
51 |
{ |
{ |
52 |
_individual_events.push_back(SmartPtr<IndividualEvent>(ie)); |
if (ie != 0) |
53 |
return; |
{ |
54 |
} |
_individual_events.push_back(SmartPtr<IndividualEvent>(ie)); |
55 |
|
} |
56 |
void GEDCOMParser::IndividualRecord::addIndividualAttribute(GEDCOMParser::IndividualAttribute * const ia) |
else |
57 |
{ |
{ |
58 |
_individual_attributes.push_back(SmartPtr<IndividualAttribute>(ia)); |
_individual_events.push_back(SmartPtr<IndividualEvent>(new IndividualEvent)); |
59 |
return; |
} |
60 |
|
return _individual_events.back().getPtr(); |
61 |
|
} |
62 |
|
|
63 |
|
GEDCOMParser::IndividualAttribute * GEDCOMParser::IndividualRecord::addIndividualAttribute(GEDCOMParser::IndividualAttribute * const ia = 0) |
64 |
|
{ |
65 |
|
if (ia != 0) |
66 |
|
{ |
67 |
|
_individual_attributes.push_back(SmartPtr<IndividualAttribute>(ia)); |
68 |
|
} |
69 |
|
else |
70 |
|
{ |
71 |
|
_individual_attributes.push_back(SmartPtr<IndividualAttribute>(new IndividualAttribute)); |
72 |
|
} |
73 |
|
return _individual_attributes.back().getPtr(); |
74 |
} |
} |
75 |
|
|
76 |
void GEDCOMParser::IndividualRecord::addLdsIndividualOrdinance(GEDCOMParser::LdsIndividualOrdinance * const lio) |
void GEDCOMParser::IndividualRecord::addLdsIndividualOrdinance(GEDCOMParser::LdsIndividualOrdinance * const lio) |
204 |
return _individual_events; |
return _individual_events; |
205 |
} |
} |
206 |
|
|
207 |
|
GEDCOMParser::IndividualEvent * const GEDCOMParser::IndividualRecord::getBirth(void) const |
208 |
|
{ |
209 |
|
return getEvent(IndividualEvent::e_Birt); |
210 |
|
} |
211 |
|
|
212 |
|
GEDCOMParser::IndividualEvent * const GEDCOMParser::IndividualRecord::getDeath(void) const |
213 |
|
{ |
214 |
|
return getEvent(IndividualEvent::e_Deat); |
215 |
|
} |
216 |
|
|
217 |
|
GEDCOMParser::IndividualEvent * const GEDCOMParser::IndividualRecord::getEvent(IndividualEvent::enumIndividualEvents event) const |
218 |
|
{ |
219 |
|
IndividualEvent * res = 0; |
220 |
|
GEDCOMParser::IndividualEvents_t::const_iterator iter = |
221 |
|
std::find(_individual_events.begin(), |
222 |
|
_individual_events.end(), |
223 |
|
event); |
224 |
|
if (iter != _individual_events.end()) |
225 |
|
{ |
226 |
|
res = (*iter).getPtr(); |
227 |
|
} |
228 |
|
return res; |
229 |
|
} |
230 |
|
|
231 |
GEDCOMParser::IndividualAttributes_t const &GEDCOMParser::IndividualRecord::getIndividualAttributes(void) const |
GEDCOMParser::IndividualAttributes_t const &GEDCOMParser::IndividualRecord::getIndividualAttributes(void) const |
232 |
{ |
{ |
233 |
return _individual_attributes; |
return _individual_attributes; |