TapeProcessorRef TapeProcessorRegistry::GetNewTapeProcessor(CStdString& TapeProcessorName) { for(std::list<TapeProcessorRef>::iterator it = m_TapeProcessors.begin(); it!=m_TapeProcessors.end(); it++) { TapeProcessorRef TapeProcessor = *it; if( TapeProcessor->GetName().CompareNoCase(TapeProcessorName) == 0 ) { return TapeProcessor->Instanciate(); } } return TapeProcessorRef(); // No TapeProcessor found }
void TapeProcessorRegistry::RegisterTapeProcessor(TapeProcessorRef& tapeProcessor) { m_TapeProcessors.push_back(tapeProcessor); LOG4CXX_INFO(s_log, CStdString("Registered processor: ") + tapeProcessor->GetName()); }