CMS 3D CMS Logo

IgXMLModel.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/Models/interface/IgXMLModel.h"
00004 #include "Iguana/Models/interface/IgXMLRep.h"
00005 #include <qdom.h>
00006 #include <string>
00007 #include <iostream>
00008 
00009 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00010 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00011 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00012 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00013 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00014 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00015 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00016 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00017 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00018 
00019 IgXMLModel::IgXMLModel (const std::string &/*documentName*/,
00020                         const std::string &/*documentType*/)
00021     : m_document (new QDomDocument ()),
00022       m_dispatcher (new Dispatcher)
00023 {
00024 }
00025 
00026 IgXMLModel::~IgXMLModel (void)
00027 {
00028     ASSERT (m_document);
00029     ASSERT (m_dispatcher);
00030 
00031     for (std::list<IgXMLRep *>::iterator i = m_repList.begin ();
00032          i != m_repList.end ();
00033          i++)
00034     {   
00035         delete (*i);    
00036     }
00037     
00038     delete m_document;
00039     delete m_dispatcher;
00040 }
00041 
00042 
00043 IgXMLModel::Dispatcher *
00044 IgXMLModel::dispatcher (enum EventType eventType)
00045 {
00046     if (eventType == CHANGED)
00047     {
00048         return m_dispatcher;    
00049     }
00050     return 0;    
00051 }
00052 
00053 void
00054 IgXMLModel::trackRep (IgXMLRep *rep)
00055 {
00056     m_repList.push_back (rep);    
00057 }
00058 
00059 QDomDocument * 
00060 IgXMLModel::document (void)
00061 {
00062     return m_document;
00063 }

Generated on Tue Jun 9 17:38:48 2009 for CMSSW by  doxygen 1.5.4