22 |
#include "SourceRecord.hh" |
#include "SourceRecord.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::SourceRecord::Data::Event::setEvent(std::string const &value) |
void GEDCOMParser::SourceRecord::Data::Event::setEvent(std::string const &value) |
29 |
{ |
{ |
47 |
return; |
return; |
48 |
} |
} |
49 |
|
|
50 |
void GEDCOMParser::SourceRecord::Data::addEvent(GEDCOMParser::SourceRecord::Data::Event * const event) |
GEDCOMParser::SourceRecord::Data::Event * GEDCOMParser::SourceRecord::Data::addEvent(GEDCOMParser::SourceRecord::Data::Event * const data = 0) |
51 |
{ |
{ |
52 |
_events.push_back(SmartPtr<Event>(event)); |
|
53 |
return; |
GEDCOMParser::SourceRecord::Data::Event * tmp_data = data; |
54 |
|
if (data == 0) |
55 |
|
{ |
56 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
57 |
|
GEDCOMParser::SourceRecord::Data::Event * tmp_data = factory->createSourceRecord_Data_Event(); |
58 |
|
} |
59 |
|
_events.push_back(SmartPtr<SourceRecord::Data::Event>(tmp_data)); |
60 |
|
return _events.back().getPtr(); |
61 |
} |
} |
62 |
|
|
63 |
GEDCOMParser::SourceRecord::Data::Events_t const &GEDCOMParser::SourceRecord::Data::getEvents(void) const |
GEDCOMParser::SourceRecord::Data::Events_t const &GEDCOMParser::SourceRecord::Data::getEvents(void) const |
71 |
return; |
return; |
72 |
} |
} |
73 |
|
|
74 |
void GEDCOMParser::SourceRecord::Data::addNoteStructure(GEDCOMParser::NoteStructure * const note) |
GEDCOMParser::NoteStructure * GEDCOMParser::SourceRecord::Data::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0) |
75 |
{ |
{ |
76 |
_notes.push_back(SmartPtr<NoteStructure>(note)); |
GEDCOMParser::NoteStructure * tmp_data = data; |
77 |
return; |
if (data == 0) |
78 |
|
{ |
79 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
80 |
|
GEDCOMParser::NoteStructure * tmp_data = factory->createNoteStructure(); |
81 |
|
} |
82 |
|
_notes.push_back(SmartPtr<NoteStructure>(tmp_data)); |
83 |
|
return _notes.back().getPtr(); |
84 |
} |
} |
85 |
|
|
86 |
GEDCOMParser::NoteStructures_t const &GEDCOMParser::SourceRecord::Data::getNoteStructures(void) const |
GEDCOMParser::NoteStructures_t const &GEDCOMParser::SourceRecord::Data::getNoteStructures(void) const |
103 |
return; |
return; |
104 |
} |
} |
105 |
|
|
106 |
void GEDCOMParser::SourceRecord::setData(Data * const data) |
GEDCOMParser::SourceRecord::Data * GEDCOMParser::SourceRecord::setData(GEDCOMParser::SourceRecord::Data * const data = 0) |
107 |
{ |
{ |
108 |
_data = SmartPtr<Data>(data); |
GEDCOMParser::SourceRecord::Data * tmp_data = data; |
109 |
|
if (data == 0) |
110 |
|
{ |
111 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
112 |
|
GEDCOMParser::SourceRecord::Data * tmp_data = factory->createSourceRecord_Data(); |
113 |
|
} |
114 |
|
_data = SmartPtr<SourceRecord::Data>(tmp_data); |
115 |
|
return _data.getPtr(); |
116 |
} |
} |
117 |
|
|
118 |
void GEDCOMParser::SourceRecord::contAuth(std::string const &value) |
void GEDCOMParser::SourceRecord::contAuth(std::string const &value) |
171 |
} |
} |
172 |
|
|
173 |
|
|
174 |
void GEDCOMParser::SourceRecord::setSourceRepositoryCitation(GEDCOMParser::SourceRepositoryCitation * const src_rep_cit) |
GEDCOMParser::SourceRepositoryCitation * GEDCOMParser::SourceRecord::setSourceRepositoryCitation(GEDCOMParser::SourceRepositoryCitation * const data = 0) |
175 |
{ |
{ |
176 |
_src_rep_citation = SmartPtr<SourceRepositoryCitation>(src_rep_cit); |
GEDCOMParser::SourceRepositoryCitation * tmp_data = data; |
177 |
return; |
if (data == 0) |
178 |
|
{ |
179 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
180 |
|
GEDCOMParser::SourceRepositoryCitation * tmp_data = factory->createSourceRepositoryCitation(); |
181 |
|
} |
182 |
|
_src_rep_citation = SmartPtr<SourceRepositoryCitation>(tmp_data); |
183 |
|
return _src_rep_citation.getPtr(); |
184 |
} |
} |
185 |
|
|
186 |
void GEDCOMParser::SourceRecord::addMultimediaLink(GEDCOMParser::MultimediaLink * const mm) |
GEDCOMParser::MultimediaLink * GEDCOMParser::SourceRecord::addMultimediaLink(GEDCOMParser::MultimediaLink * const data = 0) |
187 |
{ |
{ |
188 |
_mm_links.push_back(SmartPtr<MultimediaLink>(mm)); |
GEDCOMParser::MultimediaLink * tmp_data = data; |
189 |
return; |
if (data == 0) |
190 |
|
{ |
191 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
192 |
|
GEDCOMParser::MultimediaLink * tmp_data = factory->createMultimediaLink(); |
193 |
|
} |
194 |
|
_mm_links.push_back(SmartPtr<MultimediaLink>(tmp_data)); |
195 |
|
return _mm_links.back().getPtr(); |
196 |
} |
} |
197 |
|
|
198 |
void GEDCOMParser::SourceRecord::addNoteStructure(GEDCOMParser::NoteStructure * const note) |
GEDCOMParser::NoteStructure * GEDCOMParser::SourceRecord::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0) |
199 |
{ |
{ |
200 |
_notes.push_back(SmartPtr<NoteStructure>(note)); |
GEDCOMParser::NoteStructure * tmp_data = data; |
201 |
return; |
if (data == 0) |
202 |
|
{ |
203 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
204 |
|
GEDCOMParser::NoteStructure * tmp_data = factory->createNoteStructure(); |
205 |
|
} |
206 |
|
_notes.push_back(SmartPtr<NoteStructure>(tmp_data)); |
207 |
|
return _notes.back().getPtr(); |
208 |
} |
} |
209 |
|
|
210 |
void GEDCOMParser::SourceRecord::addUserReference(GEDCOMParser::UserReference * const user) |
GEDCOMParser::UserReference * GEDCOMParser::SourceRecord::addUserReference(GEDCOMParser::UserReference * const data = 0) |
211 |
{ |
{ |
212 |
_user_references.push_back(SmartPtr<UserReference>(user)); |
GEDCOMParser::UserReference * tmp_data = data; |
213 |
return; |
if (data == 0) |
214 |
|
{ |
215 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
216 |
|
GEDCOMParser::UserReference * tmp_data = factory->createUserReference(); |
217 |
|
} |
218 |
|
_user_references.push_back(SmartPtr<UserReference>(tmp_data)); |
219 |
|
return _user_references.back().getPtr(); |
220 |
} |
} |
221 |
|
|
222 |
void GEDCOMParser::SourceRecord::setRin(std::string const &value) |
void GEDCOMParser::SourceRecord::setRin(std::string const &value) |
225 |
return; |
return; |
226 |
} |
} |
227 |
|
|
228 |
void GEDCOMParser::SourceRecord::setChangeDate(GEDCOMParser::ChangeDate * const chdate) |
GEDCOMParser::ChangeDate * GEDCOMParser::SourceRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0) |
229 |
{ |
{ |
230 |
_change_date = SmartPtr<ChangeDate>(chdate); |
GEDCOMParser::ChangeDate * tmp_data = data; |
231 |
return; |
if (data == 0) |
232 |
|
{ |
233 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
234 |
|
GEDCOMParser::ChangeDate * tmp_data = factory->createChangeDate(); |
235 |
|
} |
236 |
|
_change_date = SmartPtr<ChangeDate>(tmp_data); |
237 |
|
return _change_date.getPtr(); |
238 |
} |
} |
239 |
|
|
240 |
GEDCOMParser::SourceRecord::~SourceRecord(void) |
GEDCOMParser::SourceRecord::~SourceRecord(void) |