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

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

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

revision 1.4 by cpcp, Wed Feb 19 22:17:12 2003 UTC revision 1.5 by cpcp, Thu Feb 20 22:09:15 2003 UTC
# Line 21  Line 21 
21  */  */
22  #include "NoteRecord.hh"  #include "NoteRecord.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::NoteRecord::NoteRecord(std::string const &id = "")  GEDCOMParser::NoteRecord::NoteRecord(std::string const &id = "")
28  {  {
# Line 49  void GEDCOMParser::NoteRecord::concSubmi Line 51  void GEDCOMParser::NoteRecord::concSubmi
51    return;    return;
52  }  }
53    
54  void GEDCOMParser::NoteRecord::addSourceCitation(GEDCOMParser::SourceCitation * const value)  GEDCOMParser::SourceCitation * GEDCOMParser::NoteRecord::addSourceCitation(GEDCOMParser::SourceCitation * const data = 0)
55  {  {
56    _sources.push_back(SmartPtr<SourceCitation>(value));    GEDCOMParser::SourceCitation  * tmp_data = data;
57    return;    if (data == 0)
58        {
59          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
60          GEDCOMParser::SourceCitation  * tmp_data = factory->createSourceCitation();
61        }
62      _sources.push_back(SmartPtr<SourceCitation>(tmp_data));
63      return _sources.back().getPtr();  
64  }  }
65    
66  void GEDCOMParser::NoteRecord::addUserReference(GEDCOMParser::UserReference * const value)  GEDCOMParser::UserReference * GEDCOMParser::NoteRecord::addUserReference(GEDCOMParser::UserReference * const data = 0)
67  {  {
68    _user_references.push_back(SmartPtr<UserReference>(value));    GEDCOMParser::UserReference  * tmp_data = data;
69    return;    if (data == 0)
70        {
71          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
72          GEDCOMParser::UserReference  * tmp_data = factory->createUserReference();
73        }
74      _user_references.push_back(SmartPtr<UserReference>(tmp_data));
75      return _user_references.back().getPtr();  
76  }  }
77    
78  void GEDCOMParser::NoteRecord::setRin(std::string const & value)  void GEDCOMParser::NoteRecord::setRin(std::string const & value)
# Line 67  void GEDCOMParser::NoteRecord::setRin(st Line 81  void GEDCOMParser::NoteRecord::setRin(st
81    return;    return;
82  }  }
83    
84  void GEDCOMParser::NoteRecord::setChangeDate(GEDCOMParser::ChangeDate * const value)  GEDCOMParser::ChangeDate * GEDCOMParser::NoteRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0)
85  {  {
86    _change_date = SmartPtr<ChangeDate>(value);    GEDCOMParser::ChangeDate  * tmp_data = data;
87    return;    if (data == 0)
88        {
89          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
90          GEDCOMParser::ChangeDate  * tmp_data = factory->createChangeDate();
91        }
92      _change_date = SmartPtr<ChangeDate>(tmp_data);
93      return _change_date.getPtr();  
94  }  }
95    
96  GEDCOMParser::SourceCitations_t const &GEDCOMParser::NoteRecord::getSourceCitations(void) const  GEDCOMParser::SourceCitations_t const &GEDCOMParser::NoteRecord::getSourceCitations(void) const

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

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