#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 25 of file ModuleFactory.cxx. References fMakerMap. 00026 {
00027 //======================================================================
00028 // Insert a module maker into the table
00029 //======================================================================
00030 std::string n(name);
00031 ModMakerMap_t::iterator itr = fMakerMap.find(n);
00032 if (itr == fMakerMap.end()) {
00033 fMakerMap[n] = p;
00034 return;
00035 }
00036 std::cerr << "JobCModuleFactory" << __LINE__
00037 << " Proxy '" << name <<"' already in table."
00038 << std::endl;
00039 }
|
|
|
Definition at line 17 of file ModuleFactory.cxx. References fInstance, and ModuleFactory(). Referenced by jobc::Node::GetModule(). 00018 {
00019 if (fInstance == 0) fInstance = new ModuleFactory();
00020 return *fInstance;
00021 }
|
|
|
Definition at line 43 of file ModuleFactory.cxx. References fMakerMap, and jobc::ModuleMaker_t. Referenced by jobc::Node::GetModule(). 00044 {
00045 //======================================================================
00046 // Find a module maker in the table
00047 //======================================================================
00048 std::string n(name);
00049
00050 ModMakerMap_t::iterator itr = fMakerMap.find(n);
00051 if (itr != fMakerMap.end()) return *(itr->second);
00052
00053 std::cerr << "JobCModuleFactory:" << __LINE__
00054 << " Proxy '" << name <<"' is not in table."
00055 << std::endl;
00056 std::cerr << "*== Proxies in list are:" << std::endl;
00057 itr = fMakerMap.begin();
00058 ModMakerMap_t::iterator itrEnd(fMakerMap.end());
00059 for (; itr!=itrEnd; ++itr) {
00060 std::cerr <<" "<< itr->first << std::endl;
00061 }
00062 std::cerr << "*==" << std::endl;
00063 abort();
00064 }
|
|
|
The sole instance of this class.
Definition at line 13 of file ModuleFactory.cxx. Referenced by Instance(). |
|
|
Map module makers my name.
Definition at line 28 of file ModuleFactory.h. |
1.3.9.1