| 26 |
|
|
| 27 |
#include "IndividualEvent.hh" |
#include "IndividualEvent.hh" |
| 28 |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
| 29 |
|
#include "GEDCOMParser/GEDCOMFactory.hh" |
| 30 |
|
#include "GEDCOMParser/GEDCOMFactoryAccessor.hh" |
| 31 |
|
|
| 32 |
#include "gettext.h" |
#include "gettext.h" |
| 33 |
#define _(String) dgettext(PACKAGE, String) |
#define _(String) dgettext(PACKAGE, String) |
| 39 |
return; |
return; |
| 40 |
} |
} |
| 41 |
|
|
| 42 |
void GEDCOMParser::IndividualEvent::setEvent(GEDCOMParser::Event * e) |
GEDCOMParser::Event * GEDCOMParser::IndividualEvent::setEvent(GEDCOMParser::Event * data = 0) |
| 43 |
{ |
{ |
| 44 |
|
GEDCOMParser::Event * tmp_data = data; |
| 45 |
|
if (data == 0) |
| 46 |
|
{ |
| 47 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 48 |
|
tmp_data = factory->createEvent(); |
| 49 |
|
} |
| 50 |
if (_event.Null()) |
if (_event.Null()) |
| 51 |
{ |
{ |
| 52 |
_event = SmartPtr<GEDCOMParser::Event>(e); |
_event = SmartPtr<GEDCOMParser::Event>(tmp_data); |
| 53 |
} |
} |
| 54 |
_event->copyLastUpdatedAttr(*e); |
_event->copyLastUpdatedAttr(*tmp_data); |
| 55 |
return; |
return _event.getPtr(); |
| 56 |
} |
} |
| 57 |
|
|
| 58 |
void GEDCOMParser::IndividualEvent::setFamcXref(std::string const & value) |
void GEDCOMParser::IndividualEvent::setFamcXref(std::string const & value) |