#include <SpectrumFactoryTable.h>
Public Methods | |
| void | addFactory (std::string name, const ISpectrumFactory *factory) |
| ISpectrum * | instantiate (const std::string &name, const std::string ¶ms) const |
| get a new Spectrum object by name with optional parameter list. More... | |
| ISpectrum * | instantiate (const std::string &name) const |
| std::list< std::string > | spectrumList () const |
Static Public Methods | |
| SpectrumFactoryTable * | instance () |
Private Methods | |
| SpectrumFactoryTable () | |
Static Private Attributes | |
| SpectrumFactoryTable * | s_instance = 0 |
|
|
Definition at line 41 of file SpectrumFactoryTable.h.
00041 {s_instance=this;}
|
|
||||||||||||
|
Definition at line 24 of file SpectrumFactoryTable.h. Referenced by FluxMgr::addFactory(), Flux::addFactory(), and SpectrumFactory::SpectrumFactory().
00024 {
00025 insert(std::make_pair<std::string, const ISpectrumFactory*>(name, factory));
00026 }
|
|
|
Definition at line 32 of file SpectrumFactoryTable.h. References s_instance. Referenced by FluxMgr::addFactory(), Flux::addFactory(), FluxSource::FluxSource(), listSpectra(), rootplot::listSpectra(), main(), FluxSvc::source(), FluxMgr::source(), and SpectrumFactory::SpectrumFactory().
00032 {
00033 return (s_instance==0)? new SpectrumFactoryTable : s_instance;
00034 }
|
|
|
Definition at line 17 of file SpectrumFactoryTable.cxx.
00018 {
00019 const_iterator returnloc = find(name);
00020 std::string params; // dummy
00021 return returnloc==end() ? 0: (*returnloc).second->instantiate(params);
00022 }
|
|
||||||||||||
|
get a new Spectrum object by name with optional parameter list.
Definition at line 11 of file SpectrumFactoryTable.cxx. Referenced by FluxSource::FluxSource(), and FluxMgr::source().
00013 {
00014 const_iterator returnloc = find(name);
00015 return returnloc==end() ? 0: (*returnloc).second->instantiate(params);
00016 }
|
|
|
Definition at line 25 of file SpectrumFactoryTable.cxx. Referenced by FluxSource::FluxSource().
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 } |
|
|
Definition at line 9 of file SpectrumFactoryTable.cxx. Referenced by instance(). |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001