/[ghosts]/ghosts/gedcomparser/src/GEDCOMParser/PersonalName.cpp
ViewVC logotype

Diff of /ghosts/gedcomparser/src/GEDCOMParser/PersonalName.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by cpcp, Sun Feb 9 19:58:07 2003 UTC revision 1.6 by cpcp, Thu Feb 20 22:09:15 2003 UTC
# Line 22  Line 22 
22  #include "PersonalName.hh"  #include "PersonalName.hh"
23  #include "GEDCOMParser/personalnameparser_decl.hh"  #include "GEDCOMParser/personalnameparser_decl.hh"
24  #include "GEDCOMParser/Visitor/GEDCOMVisitor.hh"  #include "GEDCOMParser/Visitor/GEDCOMVisitor.hh"
25    #include "GEDCOMParser/GEDCOMFactory.hh"
26    #include "GEDCOMParser/GEDCOMFactoryAccessor.hh"
27    
28  #define PERSONALNAME_SEPARATOR "/"  #define PERSONALNAME_SEPARATOR "/"
29    
# Line 73  void GEDCOMParser::PersonalName::setNsfx Line 75  void GEDCOMParser::PersonalName::setNsfx
75    return;    return;
76  }  }
77    
78  void GEDCOMParser::PersonalName::addSourceCitation(GEDCOMParser::SourceCitation * const  src)  GEDCOMParser::SourceCitation * GEDCOMParser::PersonalName::addSourceCitation(GEDCOMParser::SourceCitation * const data = 0)
79  {  {
80    _citations.push_back(SmartPtr<SourceCitation>(src));    GEDCOMParser::SourceCitation  * tmp_data = data;
81    return;    if (data == 0)
82  }      {
83          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
84  void GEDCOMParser::PersonalName::addNoteStructure(GEDCOMParser::NoteStructure * const  note)        GEDCOMParser::SourceCitation  * tmp_data = factory->createSourceCitation();
85  {      }
86    _notes.push_back(SmartPtr<NoteStructure>(note));    _citations.push_back(SmartPtr<SourceCitation>(tmp_data));
87    return;    return _citations.back().getPtr();
88    }
89    
90    GEDCOMParser::NoteStructure * GEDCOMParser::PersonalName::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0)
91    {
92        GEDCOMParser::NoteStructure  * tmp_data = data;
93      if (data == 0)
94        {
95          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
96          GEDCOMParser::NoteStructure  * tmp_data = factory->createNoteStructure();
97        }
98      _notes.push_back(SmartPtr<NoteStructure>(tmp_data));
99      return _notes.back().getPtr();
100  }  }
101    
102  GEDCOMParser::SourceCitations_t const & GEDCOMParser::PersonalName::getSourceCitations(void) const  GEDCOMParser::SourceCitations_t const & GEDCOMParser::PersonalName::getSourceCitations(void) const

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26