| 21 |
*/ |
*/ |
| 22 |
#include "NoteRecord.hh" |
#include "NoteRecord.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::NoteRecord::NoteRecord(std::string const &id = "") |
GEDCOMParser::NoteRecord::NoteRecord(std::string const &id = "") |
| 28 |
{ |
{ |
| 51 |
return; |
return; |
| 52 |
} |
} |
| 53 |
|
|
| 54 |
void GEDCOMParser::NoteRecord::addSourceCitation(GEDCOMParser::SourceCitation * const value) |
GEDCOMParser::SourceCitation * GEDCOMParser::NoteRecord::addSourceCitation(GEDCOMParser::SourceCitation * const data = 0) |
| 55 |
{ |
{ |
| 56 |
_sources.push_back(SmartPtr<SourceCitation>(value)); |
GEDCOMParser::SourceCitation * tmp_data = data; |
| 57 |
return; |
if (data == 0) |
| 58 |
|
{ |
| 59 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 60 |
|
GEDCOMParser::SourceCitation * tmp_data = factory->createSourceCitation(); |
| 61 |
|
} |
| 62 |
|
_sources.push_back(SmartPtr<SourceCitation>(tmp_data)); |
| 63 |
|
return _sources.back().getPtr(); |
| 64 |
} |
} |
| 65 |
|
|
| 66 |
void GEDCOMParser::NoteRecord::addUserReference(GEDCOMParser::UserReference * const value) |
GEDCOMParser::UserReference * GEDCOMParser::NoteRecord::addUserReference(GEDCOMParser::UserReference * const data = 0) |
| 67 |
{ |
{ |
| 68 |
_user_references.push_back(SmartPtr<UserReference>(value)); |
GEDCOMParser::UserReference * tmp_data = data; |
| 69 |
return; |
if (data == 0) |
| 70 |
|
{ |
| 71 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 72 |
|
GEDCOMParser::UserReference * tmp_data = factory->createUserReference(); |
| 73 |
|
} |
| 74 |
|
_user_references.push_back(SmartPtr<UserReference>(tmp_data)); |
| 75 |
|
return _user_references.back().getPtr(); |
| 76 |
} |
} |
| 77 |
|
|
| 78 |
void GEDCOMParser::NoteRecord::setRin(std::string const & value) |
void GEDCOMParser::NoteRecord::setRin(std::string const & value) |
| 81 |
return; |
return; |
| 82 |
} |
} |
| 83 |
|
|
| 84 |
void GEDCOMParser::NoteRecord::setChangeDate(GEDCOMParser::ChangeDate * const value) |
GEDCOMParser::ChangeDate * GEDCOMParser::NoteRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0) |
| 85 |
{ |
{ |
| 86 |
_change_date = SmartPtr<ChangeDate>(value); |
GEDCOMParser::ChangeDate * tmp_data = data; |
| 87 |
return; |
if (data == 0) |
| 88 |
|
{ |
| 89 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 90 |
|
GEDCOMParser::ChangeDate * tmp_data = factory->createChangeDate(); |
| 91 |
|
} |
| 92 |
|
_change_date = SmartPtr<ChangeDate>(tmp_data); |
| 93 |
|
return _change_date.getPtr(); |
| 94 |
} |
} |
| 95 |
|
|
| 96 |
GEDCOMParser::SourceCitations_t const &GEDCOMParser::NoteRecord::getSourceCitations(void) const |
GEDCOMParser::SourceCitations_t const &GEDCOMParser::NoteRecord::getSourceCitations(void) const |