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

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

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

revision 1.9 by cpcp, Thu Feb 20 22:09:15 2003 UTC revision 1.10 by cpcp, Sun Feb 23 21:34:44 2003 UTC
# Line 52  GEDCOMParser::PersonalName * GEDCOMParse Line 52  GEDCOMParser::PersonalName * GEDCOMParse
52    if (data == 0)    if (data == 0)
53      {      {
54        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
55        GEDCOMParser::PersonalName  * tmp_data = factory->createPersonalName();        tmp_data = factory->createPersonalName();
56      }      }
57    _personal_names.push_back(SmartPtr<PersonalName>(tmp_data));    _personal_names.push_back(SmartPtr<PersonalName>(tmp_data));
58    return _personal_names.back().getPtr();    return _personal_names.back().getPtr();
# Line 77  GEDCOMParser::IndividualEvent * GEDCOMPa Line 77  GEDCOMParser::IndividualEvent * GEDCOMPa
77    return _individual_events.back().getPtr();    return _individual_events.back().getPtr();
78  }  }
79    
80  GEDCOMParser::IndividualAttribute * GEDCOMParser::IndividualRecord::addIndividualAttribute(GEDCOMParser::IndividualAttribute * const ia = 0)  GEDCOMParser::IndividualAttribute * GEDCOMParser::IndividualRecord::addIndividualAttribute(GEDCOMParser::IndividualAttribute * const data = 0)
81  {  {
82    if (ia != 0)    GEDCOMParser::IndividualAttribute * tmp_data = data;
83      {    if (data == 0)
       _individual_attributes.push_back(SmartPtr<IndividualAttribute>(ia));  
     }  
   else  
84      {      {
85        _individual_attributes.push_back(SmartPtr<IndividualAttribute>(new IndividualAttribute));        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
86          tmp_data = factory->createIndividualAttribute();
87      }      }
88      _individual_attributes.push_back(SmartPtr<IndividualAttribute>(tmp_data));
89    return _individual_attributes.back().getPtr();    return _individual_attributes.back().getPtr();
90  }  }
91    
# Line 96  GEDCOMParser::LdsIndividualOrdinance * G Line 95  GEDCOMParser::LdsIndividualOrdinance * G
95    if (data == 0)    if (data == 0)
96      {      {
97        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
98        GEDCOMParser::LdsIndividualOrdinance  * tmp_data = factory->createLdsIndividualOrdinance();        tmp_data = factory->createLdsIndividualOrdinance();
99      }      }
100    _lds_individual_ordinances.push_back(SmartPtr<LdsIndividualOrdinance>(tmp_data));    _lds_individual_ordinances.push_back(SmartPtr<LdsIndividualOrdinance>(tmp_data));
101    return _lds_individual_ordinances.back().getPtr();      return _lds_individual_ordinances.back().getPtr();  
# Line 108  GEDCOMParser::ChildToFamilyLink * GEDCOM Line 107  GEDCOMParser::ChildToFamilyLink * GEDCOM
107    if (data == 0)    if (data == 0)
108      {      {
109        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
110        GEDCOMParser::ChildToFamilyLink  * tmp_data = factory->createChildToFamilyLink();        tmp_data = factory->createChildToFamilyLink();
111      }      }
112    _child_to_family_links.push_back(SmartPtr<ChildToFamilyLink>(tmp_data));    _child_to_family_links.push_back(SmartPtr<ChildToFamilyLink>(tmp_data));
113    return _child_to_family_links.back().getPtr();      return _child_to_family_links.back().getPtr();  
# Line 120  GEDCOMParser::SpouseToFamilyLink * GEDCO Line 119  GEDCOMParser::SpouseToFamilyLink * GEDCO
119    if (data == 0)    if (data == 0)
120      {      {
121        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
122        GEDCOMParser::SpouseToFamilyLink  * tmp_data = factory->createSpouseToFamilyLink();        tmp_data = factory->createSpouseToFamilyLink();
123      }      }
124    _spouse_to_family_links.push_back(SmartPtr<SpouseToFamilyLink>(tmp_data));    _spouse_to_family_links.push_back(SmartPtr<SpouseToFamilyLink>(tmp_data));
125    return _spouse_to_family_links.back().getPtr();      return _spouse_to_family_links.back().getPtr();  
# Line 139  GEDCOMParser::Association * GEDCOMParser Line 138  GEDCOMParser::Association * GEDCOMParser
138    if (data == 0)    if (data == 0)
139      {      {
140        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
141        GEDCOMParser::Association  * tmp_data = factory->createAssociation();        tmp_data = factory->createAssociation();
142      }      }
143    _associations.push_back(SmartPtr<Association>(tmp_data));    _associations.push_back(SmartPtr<Association>(tmp_data));
144    return _associations.back().getPtr();      return _associations.back().getPtr();  
# Line 169  GEDCOMParser::SourceCitation * GEDCOMPar Line 168  GEDCOMParser::SourceCitation * GEDCOMPar
168    if (data == 0)    if (data == 0)
169      {      {
170        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
171        GEDCOMParser::SourceCitation  * tmp_data = factory->createSourceCitation();        tmp_data = factory->createSourceCitation();
172      }      }
173    _citations.push_back(SmartPtr<SourceCitation>(tmp_data));    _citations.push_back(SmartPtr<SourceCitation>(tmp_data));
174    return _citations.back().getPtr();    return _citations.back().getPtr();
# Line 181  GEDCOMParser::MultimediaLink * GEDCOMPar Line 180  GEDCOMParser::MultimediaLink * GEDCOMPar
180    if (data == 0)    if (data == 0)
181      {      {
182        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
183        GEDCOMParser::MultimediaLink  * tmp_data = factory->createMultimediaLink();        tmp_data = factory->createMultimediaLink();
184      }      }
185    _mm_links.push_back(SmartPtr<MultimediaLink>(tmp_data));    _mm_links.push_back(SmartPtr<MultimediaLink>(tmp_data));
186    return _mm_links.back().getPtr();    return _mm_links.back().getPtr();
# Line 193  GEDCOMParser::NoteStructure * GEDCOMPars Line 192  GEDCOMParser::NoteStructure * GEDCOMPars
192    if (data == 0)    if (data == 0)
193      {      {
194        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
195        GEDCOMParser::NoteStructure  * tmp_data = factory->createNoteStructure();        tmp_data = factory->createNoteStructure();
196      }      }
197    _notes.push_back(SmartPtr<NoteStructure>(tmp_data));    _notes.push_back(SmartPtr<NoteStructure>(tmp_data));
198    return _notes.back().getPtr();    return _notes.back().getPtr();
# Line 217  GEDCOMParser::UserReference * GEDCOMPars Line 216  GEDCOMParser::UserReference * GEDCOMPars
216    if (data == 0)    if (data == 0)
217      {      {
218        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
219        GEDCOMParser::UserReference  * tmp_data = factory->createUserReference();        tmp_data = factory->createUserReference();
220      }      }
221    _user_references.push_back(SmartPtr<UserReference>(tmp_data));    _user_references.push_back(SmartPtr<UserReference>(tmp_data));
222    return _user_references.back().getPtr();    return _user_references.back().getPtr();
# Line 235  GEDCOMParser::ChangeDate * GEDCOMParser: Line 234  GEDCOMParser::ChangeDate * GEDCOMParser:
234    if (data == 0)    if (data == 0)
235      {      {
236        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();        GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
237        GEDCOMParser::ChangeDate  * tmp_data = factory->createChangeDate();        tmp_data = factory->createChangeDate();
238      }      }
239    _change_date = SmartPtr<ChangeDate>(tmp_data);    _change_date = SmartPtr<ChangeDate>(tmp_data);
240    return _change_date.getPtr();      return _change_date.getPtr();  
# Line 330  GEDCOMParser::ChildToFamilyLinks_t const Line 329  GEDCOMParser::ChildToFamilyLinks_t const
329  {  {
330    return _child_to_family_links;    return _child_to_family_links;
331  }  }
332    
333    GEDCOMParser::ChildToFamilyLinks_t &GEDCOMParser::IndividualRecord::getChildToFamilyLinks(void)
334    {
335      return _child_to_family_links;
336    }
337    
338  GEDCOMParser::SpouseToFamilyLinks_t const &GEDCOMParser::IndividualRecord::getSpouseToFamilyLinks(void) const  GEDCOMParser::SpouseToFamilyLinks_t const &GEDCOMParser::IndividualRecord::getSpouseToFamilyLinks(void) const
339  {  {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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