| 21 |
*/ |
*/ |
| 22 |
#include "SubmitterRecord.hh" |
#include "SubmitterRecord.hh" |
| 23 |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
| 24 |
|
#include "GEDCOMParser/GEDCOMFactory.hh" |
| 25 |
|
#include "GEDCOMParser/GEDCOMFactoryAccessor.hh" |
| 26 |
|
|
| 27 |
GEDCOMParser::SubmitterRecord::SubmitterRecord(std::string const &id = "") |
GEDCOMParser::SubmitterRecord::SubmitterRecord(std::string const &id = "") |
| 28 |
{ |
{ |
| 45 |
return; |
return; |
| 46 |
} |
} |
| 47 |
|
|
| 48 |
void GEDCOMParser::SubmitterRecord::setAddress(GEDCOMParser::Address * const add) |
GEDCOMParser::Address * GEDCOMParser::SubmitterRecord::setAddress(GEDCOMParser::Address * const data = 0) |
| 49 |
{ |
{ |
| 50 |
_address = SmartPtr<Address>(add); |
GEDCOMParser::Address * tmp_data = data; |
| 51 |
return; |
if (data == 0) |
| 52 |
|
{ |
| 53 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 54 |
|
GEDCOMParser::Address * tmp_data = factory->createAddress(); |
| 55 |
|
} |
| 56 |
|
_address = SmartPtr<Address>(tmp_data); |
| 57 |
|
return _address.getPtr(); |
| 58 |
} |
} |
| 59 |
|
|
| 60 |
void GEDCOMParser::SubmitterRecord::addMultimediaLink(GEDCOMParser::MultimediaLink * const mm_link) |
GEDCOMParser::MultimediaLink * GEDCOMParser::SubmitterRecord::addMultimediaLink(GEDCOMParser::MultimediaLink * const data = 0) |
| 61 |
{ |
{ |
| 62 |
_mm_links.push_back(SmartPtr<MultimediaLink>(mm_link)); |
GEDCOMParser::MultimediaLink * tmp_data = data; |
| 63 |
return; |
if (data == 0) |
| 64 |
|
{ |
| 65 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 66 |
|
GEDCOMParser::MultimediaLink * tmp_data = factory->createMultimediaLink(); |
| 67 |
|
} |
| 68 |
|
_mm_links.push_back(SmartPtr<MultimediaLink>(tmp_data)); |
| 69 |
|
return _mm_links.back().getPtr(); |
| 70 |
} |
} |
| 71 |
|
|
| 72 |
void GEDCOMParser::SubmitterRecord::addLanguagePref(std::string const &lang) |
void GEDCOMParser::SubmitterRecord::addLanguagePref(std::string const &lang) |
| 87 |
return; |
return; |
| 88 |
} |
} |
| 89 |
|
|
| 90 |
void GEDCOMParser::SubmitterRecord::setChangeDate(GEDCOMParser::ChangeDate * const chdate) |
GEDCOMParser::ChangeDate * GEDCOMParser::SubmitterRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0) |
| 91 |
{ |
{ |
| 92 |
_change_date = SmartPtr<ChangeDate>(chdate); |
GEDCOMParser::ChangeDate * tmp_data = data; |
| 93 |
return; |
if (data == 0) |
| 94 |
|
{ |
| 95 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 96 |
|
GEDCOMParser::ChangeDate * tmp_data = factory->createChangeDate(); |
| 97 |
|
} |
| 98 |
|
_change_date = SmartPtr<ChangeDate>(tmp_data); |
| 99 |
|
return _change_date.getPtr(); |
| 100 |
} |
} |
| 101 |
|
|
| 102 |
|
|