21 |
*/ |
*/ |
22 |
#include "MultimediaRecord.hh" |
#include "MultimediaRecord.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::MultimediaRecord::MultimediaRecord(std::string const &id = "") |
GEDCOMParser::MultimediaRecord::MultimediaRecord(std::string const &id = "") |
28 |
{ |
{ |
69 |
return; |
return; |
70 |
} |
} |
71 |
|
|
72 |
void GEDCOMParser::MultimediaRecord::addNoteStructure(GEDCOMParser::NoteStructure * const note) |
GEDCOMParser::NoteStructure * GEDCOMParser::MultimediaRecord::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0) |
73 |
{ |
{ |
74 |
_notes.push_back(SmartPtr<NoteStructure>(note)); |
GEDCOMParser::NoteStructure * tmp_data = data; |
75 |
return; |
if (data == 0) |
76 |
|
{ |
77 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
78 |
|
GEDCOMParser::NoteStructure * tmp_data = factory->createNoteStructure(); |
79 |
|
} |
80 |
|
_notes.push_back(SmartPtr<NoteStructure>(tmp_data)); |
81 |
|
return _notes.back().getPtr(); |
82 |
} |
} |
83 |
|
|
84 |
void GEDCOMParser::MultimediaRecord::addUserReference(GEDCOMParser::UserReference * const user) |
GEDCOMParser::UserReference * GEDCOMParser::MultimediaRecord::addUserReference(GEDCOMParser::UserReference * const data = 0) |
85 |
{ |
{ |
86 |
_user_references.push_back(SmartPtr<UserReference>(user)); |
GEDCOMParser::UserReference * tmp_data = data; |
87 |
return; |
if (data == 0) |
88 |
|
{ |
89 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
90 |
|
GEDCOMParser::UserReference * tmp_data = factory->createUserReference(); |
91 |
|
} |
92 |
|
_user_references.push_back(SmartPtr<UserReference>(tmp_data)); |
93 |
|
return _user_references.back().getPtr(); |
94 |
} |
} |
95 |
|
|
96 |
void GEDCOMParser::MultimediaRecord::setChangeDate(GEDCOMParser::ChangeDate * const chdate) |
GEDCOMParser::ChangeDate * GEDCOMParser::MultimediaRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0) |
97 |
{ |
{ |
98 |
_change_date = SmartPtr<ChangeDate>(chdate); |
GEDCOMParser::ChangeDate * tmp_data = data; |
99 |
return; |
if (data == 0) |
100 |
|
{ |
101 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
102 |
|
GEDCOMParser::ChangeDate * tmp_data = factory->createChangeDate(); |
103 |
|
} |
104 |
|
_change_date = SmartPtr<ChangeDate>(tmp_data); |
105 |
|
return _change_date.getPtr(); |
106 |
} |
} |
107 |
|
|
108 |
GEDCOMParser::NoteStructures_t const &GEDCOMParser::MultimediaRecord::getNoteStructures(void) const |
GEDCOMParser::NoteStructures_t const &GEDCOMParser::MultimediaRecord::getNoteStructures(void) const |