00001 00003 #include "CDigitizerDictionary.h" 00004 #include "CDigitizerModule.h" 00005 00010 CDigitizerDictionary::CDigitizerDictionary () 00011 { 00012 } 00013 00019 CDigitizerDictionary::~CDigitizerDictionary ( ) //Destructor - Delete dynamic objects 00020 { 00021 DestroyMap(); 00022 } 00023 // Functions for class CDigitizerDictionary 00024 00032 CDigitizerDictionary::ModuleIterator 00033 CDigitizerDictionary::DigitizerBegin() 00034 { 00035 return m_Modules.begin(); 00036 } 00037 00045 CDigitizerDictionary::ModuleIterator 00046 CDigitizerDictionary::DigitizerEnd() 00047 { 00048 return m_Modules.end(); 00049 } 00050 00056 int 00057 CDigitizerDictionary::DigitizerSize() 00058 { 00059 return m_Modules.size(); 00060 } 00061 00069 void 00070 CDigitizerDictionary::DigitizerAdd(CDigitizerModule* pDigitizer) 00071 { 00072 m_Modules[pDigitizer->getName()] = pDigitizer; 00073 } 00074 00081 CDigitizerDictionary::ModuleIterator 00082 CDigitizerDictionary::DigitizerFind(const string& rName) 00083 { 00084 return m_Modules.find(rName); 00085 } 00089 void 00090 CDigitizerDictionary::DestroyMap() 00091 { 00092 CDigitizerDictionary::ModuleIterator p = DigitizerBegin(); 00093 while(p != DigitizerEnd()) { 00094 delete p->second; 00095 p++; 00096 } 00097 }