| 22 |
#include "FamilyEvent.hh" |
#include "FamilyEvent.hh" |
| 23 |
#include "patterns/SmartPtr.hh" |
#include "patterns/SmartPtr.hh" |
| 24 |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
| 25 |
|
#include "GEDCOMParser/GEDCOMFactory.hh" |
| 26 |
|
#include "GEDCOMParser/GEDCOMFactoryAccessor.hh" |
| 27 |
|
|
| 28 |
void GEDCOMParser::FamilyEvent::setType(enumFamilyEvents type) |
void GEDCOMParser::FamilyEvent::setType(enumFamilyEvents type) |
| 29 |
{ |
{ |
| 31 |
return; |
return; |
| 32 |
} |
} |
| 33 |
|
|
| 34 |
void GEDCOMParser::FamilyEvent::setEvent(GEDCOMParser::Event * e) |
GEDCOMParser::Event * GEDCOMParser::FamilyEvent::setEvent(GEDCOMParser::Event * data = 0) |
| 35 |
{ |
{ |
| 36 |
|
GEDCOMParser::Event * tmp_data = data; |
| 37 |
|
if (data == 0) |
| 38 |
|
{ |
| 39 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 40 |
|
tmp_data = factory->createEvent(); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
if (_event.Null()) |
if (_event.Null()) |
| 44 |
{ |
{ |
| 45 |
_event = SmartPtr<GEDCOMParser::Event>(e); |
_event = SmartPtr<GEDCOMParser::Event>(tmp_data); |
| 46 |
} |
} |
| 47 |
_event->copyLastUpdatedAttr(*e); |
_event->copyLastUpdatedAttr(*tmp_data); |
| 48 |
|
return _event.getPtr(); |
|
return; |
|
| 49 |
} |
} |
| 50 |
|
|
| 51 |
void GEDCOMParser::FamilyEvent::setHusbAge(std::string const & value) |
void GEDCOMParser::FamilyEvent::setHusbAge(std::string const & value) |