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

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

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

revision 1.3 by cpcp, Sun Jan 26 21:15:21 2003 UTC revision 1.4 by cpcp, Thu Mar 20 20:42:05 2003 UTC
# Line 22  Line 22 
22  #include "FamilyEvent.hh"  #include "FamilyEvent.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  void GEDCOMParser::FamilyEvent::setType(enumFamilyEvents type)  void GEDCOMParser::FamilyEvent::setType(enumFamilyEvents type)
29  {  {
# Line 29  void GEDCOMParser::FamilyEvent::setType( Line 31  void GEDCOMParser::FamilyEvent::setType(
31    return;    return;
32  }  }
33    
34  void GEDCOMParser::FamilyEvent::setEvent(GEDCOMParser::Event * e)  GEDCOMParser::Event * GEDCOMParser::FamilyEvent::setEvent(GEDCOMParser::Event * data = 0)
35  {  {
36      GEDCOMParser::Event * tmp_data = data;
37      if (data == 0)
38        {
39          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
40          tmp_data = factory->createEvent();
41        }
42      
43    if (_event.Null())    if (_event.Null())
44      {      {
45        _event = SmartPtr<GEDCOMParser::Event>(e);        _event = SmartPtr<GEDCOMParser::Event>(tmp_data);
46      }      }
47    _event->copyLastUpdatedAttr(*e);    _event->copyLastUpdatedAttr(*tmp_data);
48      return  _event.getPtr();
   return;  
49  }  }
50    
51  void GEDCOMParser::FamilyEvent::setHusbAge(std::string const & value)  void GEDCOMParser::FamilyEvent::setHusbAge(std::string const & value)

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

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