#include <ModuleFactory.h>
Public Member Functions | |
| void | Insert (const char *name, ModuleMaker_t mm) |
| ModuleMaker_t | LookUp (const char *name) |
Static Public Member Functions | |
| ModuleFactory & | Instance () |
Private Types | |
| typedef std::map< std::string, ModuleMaker_t > | ModMakerMap_t |
Private Member Functions | |
| ModuleFactory () | |
Private Attributes | |
| ModMakerMap_t | fMakerMap |
| Map module makers my name. | |
Static Private Attributes | |
| ModuleFactory * | fInstance = 0 |
| The sole instance of this class. | |
Definition at line 18 of file ModuleFactory.h.
|
|
Definition at line 25 of file ModuleFactory.h. |
|
|
Definition at line 27 of file ModuleFactory.h. Referenced by Instance().
00027 { }
|
|
||||||||||||
|
Definition at line 24 of file ModuleFactory.cxx. References fMakerMap, and jobc::ModuleMaker_t.
00025 {
00026 //======================================================================
00027 // Insert a module maker into the table
00028 //======================================================================
00029 std::string n(name);
00030 ModMakerMap_t::iterator itr = fMakerMap.find(n);
00031 if (itr == fMakerMap.end()) {
00032 fMakerMap[n] = p;
00033 return;
00034 }
00035 std::cerr << "JobCModuleFactory" << __LINE__
00036 << " Proxy '" << name <<"' already in table."
00037 << std::endl;
00038 }
|
|
|
Definition at line 16 of file ModuleFactory.cxx. References fInstance, and ModuleFactory().
00017 {
00018 if (fInstance == 0) fInstance = new ModuleFactory();
00019 return *fInstance;
00020 }
|
|
|
Definition at line 42 of file ModuleFactory.cxx. References fMakerMap, and jobc::ModuleMaker_t.
00043 {
00044 //======================================================================
00045 // Find a module maker in the table
00046 //======================================================================
00047 std::string n(name);
00048
00049 ModMakerMap_t::iterator itr = fMakerMap.find(n);
00050 if (itr != fMakerMap.end()) return *(itr->second);
00051
00052 std::cerr << "JobCModuleFactory:" << __LINE__
00053 << " Proxy '" << name <<"' is not in table."
00054 << std::endl;
00055 std::cerr << "*== Proxies in list are:" << std::endl;
00056 itr = fMakerMap.begin();
00057 ModMakerMap_t::iterator itrEnd(fMakerMap.end());
00058 for (; itr!=itrEnd; ++itr) {
00059 std::cerr <<" "<< itr->first << std::endl;
00060 }
00061 std::cerr << "*==" << std::endl;
00062 abort();
00063 }
|
|
|
The sole instance of this class.
Definition at line 12 of file ModuleFactory.cxx. Referenced by Instance(). |
|
|
Map module makers my name.
Definition at line 28 of file ModuleFactory.h. |
1.3.5