Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SpectrumFactoryTable.cxx

Go to the documentation of this file.
00001 //
00003 
00004 #include "SpectrumFactoryTable.h"
00005 
00006 #include <list>
00007 #include <string>
00008 
00009 SpectrumFactoryTable* SpectrumFactoryTable::s_instance = 0;
00010 
00011 ISpectrum* SpectrumFactoryTable::instantiate(const std::string& name, 
00012                                              const std::string& params) const 
00013 {
00014     const_iterator returnloc = find(name);
00015     return returnloc==end() ? 0: (*returnloc).second->instantiate(params);
00016 }
00017 ISpectrum* SpectrumFactoryTable::instantiate(const std::string& name) const 
00018 {
00019     const_iterator returnloc = find(name);
00020     std::string params; // dummy 
00021     return returnloc==end() ? 0: (*returnloc).second->instantiate(params);
00022 }
00023 
00024 
00025 std::list<std::string> SpectrumFactoryTable::spectrumList()const
00026 {
00027     
00028     std::list<std::string>  outstr;
00029     for( const_iterator tableiter = begin(); tableiter!=end() ; ++tableiter){
00030         outstr.push_back(tableiter->first);
00031     }
00032     return outstr;
00033     
00034 }

Generated on Wed Oct 16 14:01:31 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001