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

Diff of /ghosts/gedcomparser/src/GEDCOMParser/MultimediaRecord.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 "MultimediaRecord.hh"  #include "MultimediaRecord.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::MultimediaRecord::MultimediaRecord(std::string const &id = "")  GEDCOMParser::MultimediaRecord::MultimediaRecord(std::string const &id = "")
28  {  {
# Line 67  void GEDCOMParser::MultimediaRecord::set Line 69  void GEDCOMParser::MultimediaRecord::set
69    return;    return;
70  }  }
71    
72  void GEDCOMParser::MultimediaRecord::addNoteStructure(GEDCOMParser::NoteStructure * const note)  GEDCOMParser::NoteStructure * GEDCOMParser::MultimediaRecord::addNoteStructure(GEDCOMParser::NoteStructure * const data = 0)
73  {  {
74    _notes.push_back(SmartPtr<NoteStructure>(note));    GEDCOMParser::NoteStructure  * tmp_data = data;
75    return;    if (data == 0)
76        {
77          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
78          GEDCOMParser::NoteStructure  * tmp_data = factory->createNoteStructure();
79        }
80      _notes.push_back(SmartPtr<NoteStructure>(tmp_data));
81      return _notes.back().getPtr();
82  }  }
83    
84  void GEDCOMParser::MultimediaRecord::addUserReference(GEDCOMParser::UserReference * const  user)  GEDCOMParser::UserReference * GEDCOMParser::MultimediaRecord::addUserReference(GEDCOMParser::UserReference * const data = 0)
85  {  {
86    _user_references.push_back(SmartPtr<UserReference>(user));    GEDCOMParser::UserReference  * tmp_data = data;
87    return;    if (data == 0)
88        {
89          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
90          GEDCOMParser::UserReference  * tmp_data = factory->createUserReference();
91        }
92      _user_references.push_back(SmartPtr<UserReference>(tmp_data));
93      return _user_references.back().getPtr();
94  }  }
95    
96  void GEDCOMParser::MultimediaRecord::setChangeDate(GEDCOMParser::ChangeDate * const chdate)  GEDCOMParser::ChangeDate * GEDCOMParser::MultimediaRecord::setChangeDate(GEDCOMParser::ChangeDate * const data = 0)
97  {  {
98    _change_date = SmartPtr<ChangeDate>(chdate);    GEDCOMParser::ChangeDate  * tmp_data = data;
99    return;    if (data == 0)
100        {
101          GEDCOMParser::GEDCOMFactory * factory = GEDCOMParser::GEDCOMFactoryAccessor::getFactory();
102          GEDCOMParser::ChangeDate  * tmp_data = factory->createChangeDate();
103        }
104      _change_date = SmartPtr<ChangeDate>(tmp_data);
105      return _change_date.getPtr();    
106  }  }
107    
108  GEDCOMParser::NoteStructures_t const &GEDCOMParser::MultimediaRecord::getNoteStructures(void) const  GEDCOMParser::NoteStructures_t const &GEDCOMParser::MultimediaRecord::getNoteStructures(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