A class for generating concrete EvtTimeShiftI derived classes based on the factory pattern. This code supplies a CPP macro which allows the classes to self-register and thus no modification of this class is needed in order to expand the list of classes it knows about. More...
Go to the source code of this file.
Classes | |
class | evgb::EvtTimeShiftFactory |
struct | evgb::EvtTimeShiftFactory::Cleaner |
Namespaces | |
evgb | |
Physics generators for neutrinos, cosmic rays, and others. | |
Macros | |
#define | TIMESHIFTREG(_name) |
#define | TIMESHIFTREG3(_ns, _name, _fqname) |
#define | TIMESHIFTREG4(_nsa, _nsb, _name, _fqname) |
Typedefs | |
typedef evgb::EvtTimeShiftI *(* | evgb::EvtTimeShiftICtorFuncPtr_t) (const std::string &) |
A class for generating concrete EvtTimeShiftI derived classes based on the factory pattern. This code supplies a CPP macro which allows the classes to self-register and thus no modification of this class is needed in order to expand the list of classes it knows about.
Implemented as a singleton holding a map between names and pointers-to-functions (that call a class default constructor). The functions pointers must return EvtTimeShiftI*.
Definition in file EvtTimeShiftFactory.h.
#define TIMESHIFTREG | ( | _name | ) |
Definition at line 127 of file EvtTimeShiftFactory.h.
#define TIMESHIFTREG3 | ( | _ns, | |
_name, | |||
_fqname | |||
) |
Definition at line 134 of file EvtTimeShiftFactory.h.
#define TIMESHIFTREG4 | ( | _nsa, | |
_nsb, | |||
_name, | |||
_fqname | |||
) |
Definition at line 142 of file EvtTimeShiftFactory.h.