22 |
#include "Place.hh" |
#include "Place.hh" |
23 |
#include <iostream> |
#include <iostream> |
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::Place::setPlaceValue(std::string const & pvalue) |
void GEDCOMParser::Place::setPlaceValue(std::string const & pvalue) |
29 |
{ |
{ |
37 |
return; |
return; |
38 |
} |
} |
39 |
|
|
40 |
void GEDCOMParser::Place::addSourceCitation(SourceCitation * const src_citation) |
GEDCOMParser::SourceCitation * GEDCOMParser::Place::addSourceCitation(GEDCOMParser::SourceCitation * const data = 0) |
41 |
{ |
{ |
42 |
_citations.push_back(SmartPtr<SourceCitation>(src_citation)); |
GEDCOMParser::SourceCitation * tmp_data = data; |
43 |
return; |
if (data == 0) |
44 |
|
{ |
45 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
46 |
|
GEDCOMParser::SourceCitation * tmp_data = factory->createSourceCitation(); |
47 |
|
} |
48 |
|
_citations.push_back(SmartPtr<SourceCitation>(tmp_data)); |
49 |
|
return _citations.back().getPtr(); |
50 |
} |
} |
51 |
|
|
52 |
void GEDCOMParser::Place::addNoteStructure(NoteStructure * const note_structure) |
GEDCOMParser::NoteStructure * GEDCOMParser::Place::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0) |
53 |
{ |
{ |
54 |
_notes.push_back(SmartPtr<NoteStructure>(note_structure)); |
GEDCOMParser::NoteStructure * tmp_data = data; |
55 |
return; |
if (data == 0) |
56 |
|
{ |
57 |
|
GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory(); |
58 |
|
GEDCOMParser::NoteStructure * tmp_data = factory->createNoteStructure(); |
59 |
|
} |
60 |
|
_notes.push_back(SmartPtr<NoteStructure>(tmp_data)); |
61 |
|
return _notes.back().getPtr(); |
62 |
} |
} |
63 |
|
|
64 |
GEDCOMParser::SourceCitations_t const & GEDCOMParser::Place::getSourceCitations(void) const |
GEDCOMParser::SourceCitations_t const & GEDCOMParser::Place::getSourceCitations(void) const |