28 |
return; |
return; |
29 |
} |
} |
30 |
|
|
31 |
void GEDCOMParser::Event::_setDate(std::string const & value) |
void GEDCOMParser::Event::_setDate(GEDCOMParser::DateManagement::DateValue const &date) |
32 |
{ |
{ |
33 |
_date = value; |
if ((_date != 0) && (_date != &date)) |
34 |
|
{ |
35 |
|
delete _date; _date = 0; |
36 |
|
} |
37 |
|
if (_date != &date) |
38 |
|
{ |
39 |
|
_date = new GEDCOMParser::DateManagement::DateValue(date); |
40 |
|
} |
41 |
return; |
return; |
42 |
} |
} |
43 |
|
|
44 |
|
|
45 |
void GEDCOMParser::Event::_setPlace(SmartPtr<GEDCOMParser::Place> const & value) |
void GEDCOMParser::Event::_setPlace(SmartPtr<GEDCOMParser::Place> const & value) |
46 |
{ |
{ |
47 |
_place = value; |
_place = value; |
99 |
|
|
100 |
void GEDCOMParser::Event::setDate(std::string const & value) |
void GEDCOMParser::Event::setDate(std::string const & value) |
101 |
{ |
{ |
102 |
_setDate(value); |
if (_date == 0) |
103 |
|
{ |
104 |
|
_date = new GEDCOMParser::DateManagement::DateValue(value); |
105 |
|
} |
106 |
|
else |
107 |
|
{ |
108 |
|
_date->setValue(value); |
109 |
|
} |
110 |
_updated_attr = e_Date; |
_updated_attr = e_Date; |
111 |
return; |
return; |
112 |
} |
} |
178 |
} |
} |
179 |
case e_Date: |
case e_Date: |
180 |
{ |
{ |
181 |
_setDate(e._date); |
_setDate(*(e._date)); |
182 |
break; |
break; |
183 |
} |
} |
184 |
case e_Place: |
case e_Place: |
269 |
{ |
{ |
270 |
return _type; |
return _type; |
271 |
} |
} |
272 |
std::string const &GEDCOMParser::Event::getDate(void) const |
|
273 |
|
std::string const GEDCOMParser::Event::getDate(void) const |
274 |
{ |
{ |
275 |
return _date; |
std::string res; |
276 |
|
if (_date != 0) |
277 |
|
{ |
278 |
|
res = _date->getDisplayValue(); |
279 |
|
} |
280 |
|
return res; |
281 |
} |
} |
282 |
|
|
283 |
std::string const &GEDCOMParser::Event::getAge(void) const |
std::string const &GEDCOMParser::Event::getAge(void) const |