| 22 |
#include "RepositoryRecord.hh" |
#include "RepositoryRecord.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 |
GEDCOMParser::RepositoryRecord::RepositoryRecord(std::string const &id = "") |
GEDCOMParser::RepositoryRecord::RepositoryRecord(std::string const &id = "") |
| 29 |
{ |
{ |
| 47 |
return; |
return; |
| 48 |
} |
} |
| 49 |
|
|
| 50 |
void GEDCOMParser::RepositoryRecord::setAddress(GEDCOMParser::Address * const add) |
GEDCOMParser::Address * GEDCOMParser::RepositoryRecord::setAddress(GEDCOMParser::Address * const data = 0) |
| 51 |
{ |
{ |
| 52 |
_address = SmartPtr<Address>(add); |
GEDCOMParser::Address * tmp_data = data; |
| 53 |
return; |
if (data == 0) |
| 54 |
|
{ |
| 55 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 56 |
|
GEDCOMParser::Address * tmp_data = factory->createAddress(); |
| 57 |
|
} |
| 58 |
|
_address = SmartPtr<Address>(tmp_data); |
| 59 |
|
return _address.getPtr(); |
| 60 |
} |
} |
| 61 |
|
|
| 62 |
void GEDCOMParser::RepositoryRecord::addNoteStructure(GEDCOMParser::NoteStructure * const note) |
GEDCOMParser::NoteStructure * GEDCOMParser::RepositoryRecord::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0) |
| 63 |
{ |
{ |
| 64 |
_notes.push_back(SmartPtr<NoteStructure>(note)); |
GEDCOMParser::NoteStructure * tmp_data = data; |
| 65 |
return; |
if (data == 0) |
| 66 |
|
{ |
| 67 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 68 |
|
GEDCOMParser::NoteStructure * tmp_data = factory->createNoteStructure(); |
| 69 |
|
} |
| 70 |
|
_notes.push_back(SmartPtr<NoteStructure>(tmp_data)); |
| 71 |
|
return _notes.back().getPtr(); |
| 72 |
} |
} |
| 73 |
|
|
| 74 |
void GEDCOMParser::RepositoryRecord::addUserReference(GEDCOMParser::UserReference * const user) |
GEDCOMParser::UserReference * GEDCOMParser::RepositoryRecord::addUserReference(GEDCOMParser::UserReference * const data = 0) |
| 75 |
{ |
{ |
| 76 |
_user_references.push_back(SmartPtr<UserReference>(user)); |
GEDCOMParser::UserReference * tmp_data = data; |
| 77 |
return; |
if (data == 0) |
| 78 |
|
{ |
| 79 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 80 |
|
GEDCOMParser::UserReference * tmp_data = factory->createUserReference(); |
| 81 |
|
} |
| 82 |
|
_user_references.push_back(SmartPtr<UserReference>(tmp_data)); |
| 83 |
|
return _user_references.back().getPtr(); |
| 84 |
} |
} |
| 85 |
|
|
| 86 |
void GEDCOMParser::RepositoryRecord::setRin(std::string const &value) |
void GEDCOMParser::RepositoryRecord::setRin(std::string const &value) |
| 89 |
return; |
return; |
| 90 |
} |
} |
| 91 |
|
|
| 92 |
void GEDCOMParser::RepositoryRecord::setChangeDate(GEDCOMParser::ChangeDate * const chdate) |
GEDCOMParser::ChangeDate * GEDCOMParser::RepositoryRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0) |
| 93 |
{ |
{ |
| 94 |
_change_date = SmartPtr<ChangeDate>(chdate); |
GEDCOMParser::ChangeDate * tmp_data = data; |
| 95 |
return; |
if (data == 0) |
| 96 |
|
{ |
| 97 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 98 |
|
GEDCOMParser::ChangeDate * tmp_data = factory->createChangeDate(); |
| 99 |
|
} |
| 100 |
|
_change_date = SmartPtr<ChangeDate>(tmp_data); |
| 101 |
|
return _change_date.getPtr(); |
| 102 |
} |
} |
| 103 |
|
|
| 104 |
SmartPtr<GEDCOMParser::Address> const & GEDCOMParser::RepositoryRecord::getAddress(void) const |
SmartPtr<GEDCOMParser::Address> const & GEDCOMParser::RepositoryRecord::getAddress(void) const |