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

Diff of /ghosts/gedcomparser/src/GEDCOMParser/RepositoryRecord.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 22  Line 22 
22  #include "RepositoryRecord.hh"  #include "RepositoryRecord.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  GEDCOMParser::RepositoryRecord::RepositoryRecord(std::string const &id = "")  GEDCOMParser::RepositoryRecord::RepositoryRecord(std::string const &id = "")
29  {  {
# Line 45  void GEDCOMParser::RepositoryRecord::set Line 47  void GEDCOMParser::RepositoryRecord::set
47    return;    return;
48  }  }
49    
50  void GEDCOMParser::RepositoryRecord::setAddress(GEDCOMParser::Address * const add)  GEDCOMParser::Address * GEDCOMParser::RepositoryRecord::setAddress(GEDCOMParser::Address * const data = 0)
51  {  {
52    _address = SmartPtr<Address>(add);    GEDCOMParser::Address  * tmp_data = data;
53    return;    if (data == 0)
54        {
55          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
56          GEDCOMParser::Address  * tmp_data = factory->createAddress();
57        }
58      _address = SmartPtr<Address>(tmp_data);
59      return _address.getPtr();
60  }  }
61    
62  void GEDCOMParser::RepositoryRecord::addNoteStructure(GEDCOMParser::NoteStructure * const note)  GEDCOMParser::NoteStructure * GEDCOMParser::RepositoryRecord::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0)
63  {  {
64    _notes.push_back(SmartPtr<NoteStructure>(note));      GEDCOMParser::NoteStructure  * tmp_data = data;
65    return;    if (data == 0)
66        {
67          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
68          GEDCOMParser::NoteStructure  * tmp_data = factory->createNoteStructure();
69        }
70      _notes.push_back(SmartPtr<NoteStructure>(tmp_data));
71      return _notes.back().getPtr();
72  }  }
73    
74  void GEDCOMParser::RepositoryRecord::addUserReference(GEDCOMParser::UserReference * const user)  GEDCOMParser::UserReference * GEDCOMParser::RepositoryRecord::addUserReference(GEDCOMParser::UserReference * const data = 0)
75  {  {
76    _user_references.push_back(SmartPtr<UserReference>(user));    GEDCOMParser::UserReference  * tmp_data = data;
77    return;    if (data == 0)
78        {
79          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
80          GEDCOMParser::UserReference  * tmp_data = factory->createUserReference();
81        }
82      _user_references.push_back(SmartPtr<UserReference>(tmp_data));
83      return _user_references.back().getPtr();
84  }  }
85    
86  void GEDCOMParser::RepositoryRecord::setRin(std::string const &value)  void GEDCOMParser::RepositoryRecord::setRin(std::string const &value)
# Line 69  void GEDCOMParser::RepositoryRecord::set Line 89  void GEDCOMParser::RepositoryRecord::set
89    return;    return;
90  }  }
91    
92  void GEDCOMParser::RepositoryRecord::setChangeDate(GEDCOMParser::ChangeDate * const chdate)  GEDCOMParser::ChangeDate * GEDCOMParser::RepositoryRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0)
93  {  {
94    _change_date = SmartPtr<ChangeDate>(chdate);    GEDCOMParser::ChangeDate  * tmp_data = data;
95    return;    if (data == 0)
96        {
97          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
98          GEDCOMParser::ChangeDate  * tmp_data = factory->createChangeDate();
99        }
100      _change_date = SmartPtr<ChangeDate>(tmp_data);
101      return _change_date.getPtr();    
102  }  }
103    
104  SmartPtr<GEDCOMParser::Address> const & GEDCOMParser::RepositoryRecord::getAddress(void) const  SmartPtr<GEDCOMParser::Address> const & GEDCOMParser::RepositoryRecord::getAddress(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