| 22 |
#include "Event.hh" |
#include "Event.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::Event::_setType(std::string const & value) |
void GEDCOMParser::Event::_setType(std::string const & value) |
| 29 |
{ |
{ |
| 114 |
return; |
return; |
| 115 |
} |
} |
| 116 |
|
|
| 117 |
void GEDCOMParser::Event::setPlace(GEDCOMParser::Place * const value) |
GEDCOMParser::Place * GEDCOMParser::Event::setPlace(GEDCOMParser::Place * const data = 0) |
| 118 |
{ |
{ |
| 119 |
_setPlace(SmartPtr<Place>(value)); |
GEDCOMParser::Place * tmp_data = data; |
| 120 |
|
if (data == 0) |
| 121 |
|
{ |
| 122 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 123 |
|
GEDCOMParser::Place * tmp_data = factory->createPlace(); |
| 124 |
|
} |
| 125 |
|
_setPlace(SmartPtr<Place>(tmp_data)); |
| 126 |
_updated_attr = e_Place; |
_updated_attr = e_Place; |
| 127 |
return; |
return _place.getPtr(); |
| 128 |
} |
} |
| 129 |
|
|
| 130 |
void GEDCOMParser::Event::setAddress(GEDCOMParser::Address * const value) |
GEDCOMParser::Address * GEDCOMParser::Event::setAddress(GEDCOMParser::Address * const data = 0) |
| 131 |
{ |
{ |
| 132 |
_setAddress(SmartPtr<Address>(value)); |
GEDCOMParser::Address * tmp_data = data; |
| 133 |
|
if (data == 0) |
| 134 |
|
{ |
| 135 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 136 |
|
GEDCOMParser::Address * tmp_data = factory->createAddress(); |
| 137 |
|
} |
| 138 |
|
_setAddress(SmartPtr<Address>(tmp_data)); |
| 139 |
_updated_attr = e_Address; |
_updated_attr = e_Address; |
| 140 |
return; |
return _address.getPtr(); |
| 141 |
} |
} |
| 142 |
|
|
| 143 |
void GEDCOMParser::Event::setAge(std::string const & value) |
void GEDCOMParser::Event::setAge(std::string const & value) |
| 161 |
return; |
return; |
| 162 |
} |
} |
| 163 |
|
|
| 164 |
void GEDCOMParser::Event::addSourceCitation(GEDCOMParser::SourceCitation * const cit) |
GEDCOMParser::SourceCitation * GEDCOMParser::Event::addSourceCitation(GEDCOMParser::SourceCitation * const data = 0) |
| 165 |
{ |
{ |
| 166 |
_addSourceCitation(SmartPtr<SourceCitation>(cit)); |
GEDCOMParser::SourceCitation * tmp_data = data; |
| 167 |
|
if (data == 0) |
| 168 |
|
{ |
| 169 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 170 |
|
GEDCOMParser::SourceCitation * tmp_data = factory->createSourceCitation(); |
| 171 |
|
} |
| 172 |
|
_addSourceCitation(SmartPtr<SourceCitation>(tmp_data)); |
| 173 |
_updated_attr = e_Citations; |
_updated_attr = e_Citations; |
| 174 |
return; |
return _citations.back().getPtr(); |
| 175 |
} |
} |
| 176 |
|
|
| 177 |
void GEDCOMParser::Event::addMultimediaLink(GEDCOMParser::MultimediaLink * const mm) |
GEDCOMParser::MultimediaLink * GEDCOMParser::Event::addMultimediaLink(GEDCOMParser::MultimediaLink * const data = 0) |
| 178 |
{ |
{ |
| 179 |
_addMultimediaLink(SmartPtr<MultimediaLink>(mm)); |
GEDCOMParser::MultimediaLink * tmp_data = data; |
| 180 |
|
if (data == 0) |
| 181 |
|
{ |
| 182 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 183 |
|
GEDCOMParser::MultimediaLink * tmp_data = factory->createMultimediaLink(); |
| 184 |
|
} |
| 185 |
|
_addMultimediaLink(SmartPtr<MultimediaLink>(tmp_data)); |
| 186 |
_updated_attr = e_MultimediaLinks; |
_updated_attr = e_MultimediaLinks; |
| 187 |
return; |
return _mm_links.back().getPtr(); |
| 188 |
} |
} |
| 189 |
|
|
| 190 |
void GEDCOMParser::Event::addNoteStructure(GEDCOMParser::NoteStructure * const note) |
GEDCOMParser::NoteStructure * GEDCOMParser::Event::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0) |
| 191 |
{ |
{ |
| 192 |
_addNoteStructure(SmartPtr<NoteStructure>(note)); |
GEDCOMParser::NoteStructure * tmp_data = data; |
| 193 |
|
if (data == 0) |
| 194 |
|
{ |
| 195 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
| 196 |
|
GEDCOMParser::NoteStructure * tmp_data = factory->createNoteStructure(); |
| 197 |
|
} |
| 198 |
|
_addNoteStructure(SmartPtr<NoteStructure>(tmp_data)); |
| 199 |
_updated_attr = e_NoteStructure; |
_updated_attr = e_NoteStructure; |
| 200 |
return; |
return _notes.back().getPtr(); |
| 201 |
} |
} |
| 202 |
|
|
| 203 |
void GEDCOMParser::Event::copyLastUpdatedAttr(GEDCOMParser::Event const &e) |
void GEDCOMParser::Event::copyLastUpdatedAttr(GEDCOMParser::Event const &e) |