#include <TDPGeneratorFactory.h>
Public Types | |
typedef TVDetectorPulseGenerator *(* | ModuleMaker )(TDPGeneratorOptions *) |
typedef std::vector< std::string > | ArgumentsVector |
Public Member Functions | |
void | registerModule (const std::string &, ModuleMaker, const std::string &out="") |
Add a ModuleMaker function to the list of makers. | |
virtual TVDetectorPulseGenerator * | createModule (const std::string &, TDPGeneratorOptions *opts=NULL) |
Create a module with options. | |
bool | canCreate (const std::string &name) const |
Check if a module with this name has been registered. | |
void | addOptions (const std::string &name, TDPGeneratorOptions *opts) |
void | addArguments (const std::string &all_args) |
void | addArgument (const std::string &module, const std::string &argument) |
void | addArgument (const std::string &argument) |
std::string | GetArgumentName (const std::string &module, const int &argument) |
std::string | GetProduct (const std::string &module) |
void | SetDebug (bool debug=true) |
void | PrintPossibleModules () const |
Static Public Member Functions | |
static TDPGeneratorFactory * | Instance () |
Private Member Functions | |
TDPGeneratorFactory () | |
~TDPGeneratorFactory () |
Definition at line 8 of file TDPGeneratorFactory.h.
typedef std::vector<std::string> TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::ArgumentsVector [inherited] |
Definition at line 18 of file TemplateFactory.h.
typedef TVDetectorPulseGenerator *(* TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::ModuleMaker)(TDPGeneratorOptions *) [inherited] |
Definition at line 17 of file TemplateFactory.h.
TDPGeneratorFactory::TDPGeneratorFactory | ( | ) | [inline, private] |
Definition at line 10 of file TDPGeneratorFactory.h.
Referenced by Instance().
00010 : 00011 TemplateFactory<TVDetectorPulseGenerator,TDPGeneratorOptions>("TDPGeneratorFactory"){}; ~TDPGeneratorFactory(){};
TDPGeneratorFactory::~TDPGeneratorFactory | ( | ) | [inline, private] |
Definition at line 12 of file TDPGeneratorFactory.h.
void TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::addArgument | ( | const std::string & | argument | ) | [inherited] |
void TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::addArgument | ( | const std::string & | module, | |
const std::string & | argument | |||
) | [inherited] |
void TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::addArguments | ( | const std::string & | all_args | ) | [inherited] |
void TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::addOptions | ( | const std::string & | name, | |
TDPGeneratorOptions * | opts | |||
) | [inherited] |
bool TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::canCreate | ( | const std::string & | name | ) | const [inline, inherited] |
Check if a module with this name has been registered.
Definition at line 44 of file TemplateFactory.h.
00044 {return (bool) fModules.count(name);};
virtual TVDetectorPulseGenerator * TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::createModule | ( | const std::string & | , | |
TDPGeneratorOptions * | opts = NULL | |||
) | [virtual, inherited] |
Create a module with options.
std::string TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::GetArgumentName | ( | const std::string & | module, | |
const int & | argument | |||
) | [inherited] |
std::string TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::GetProduct | ( | const std::string & | module | ) | [inherited] |
TDPGeneratorFactory * TDPGeneratorFactory::Instance | ( | ) | [inline, static] |
Definition at line 18 of file TDPGeneratorFactory.h.
References TDPGeneratorFactory().
Referenced by TDPGeneratorOptions::AddArgument(), and MakeDetectorPulses::MakeGenerator().
00018 { 00019 static TDPGeneratorFactory* instance=NULL; 00020 if(!instance) { 00021 instance=new TDPGeneratorFactory(); 00022 } 00023 return instance; 00024 }
void TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::PrintPossibleModules | ( | ) | const [inherited] |
void TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::registerModule | ( | const std::string & | , | |
ModuleMaker | , | |||
const std::string & | out = "" | |||
) | [inherited] |
Add a ModuleMaker function to the list of makers.
void TemplateFactory< TVDetectorPulseGenerator , TDPGeneratorOptions >::SetDebug | ( | bool | debug = true |
) | [inline, inherited] |
Definition at line 53 of file TemplateFactory.h.
00053 {fDebug=debug;};