GENIEGenerator
|
A class for generating concrete GFlavorMixerI 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...
#include <GFlavorMixerFactory.h>
Classes | |
struct | Cleaner |
Public Member Functions | |
genie::flux::GFlavorMixerI * | GetFlavorMixer (const std::string &) |
bool | IsKnownFlavorMixer (const std::string &) |
const std::vector< std::string > & | AvailableFlavorMixers () const |
bool | RegisterCreator (std::string name, GFlavorMixerICtorFuncPtr_t ctorptr, bool *ptr) |
Static Public Member Functions | |
static GFlavorMixerFactory & | Instance () |
Private Member Functions | |
GFlavorMixerFactory () | |
virtual | ~GFlavorMixerFactory () |
GFlavorMixerFactory (const GFlavorMixerFactory &) | |
void | operator= (const GFlavorMixerFactory &) |
Private Attributes | |
std::map< std::string, GFlavorMixerICtorFuncPtr_t > | fFunctionMap |
std::map< std::string, bool * > | fBoolPtrMap |
std::vector< std::string > | listnames |
Static Private Attributes | |
static GFlavorMixerFactory * | fgTheInstance |
Friends | |
struct | Cleaner |
A class for generating concrete GFlavorMixerI 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 GFlavorMixerI*.
Definition at line 43 of file GFlavorMixerFactory.h.
|
private |
Definition at line 20 of file GFlavorMixerFactory.cxx.
References fgTheInstance.
Referenced by Instance().
|
privatevirtual |
Definition at line 25 of file GFlavorMixerFactory.cxx.
References fgTheInstance.
|
private |
const std::vector< std::string > & genie::flux::GFlavorMixerFactory::AvailableFlavorMixers | ( | ) | const |
Definition at line 76 of file GFlavorMixerFactory.cxx.
References fFunctionMap, and listnames.
GFlavorMixerI * genie::flux::GFlavorMixerFactory::GetFlavorMixer | ( | const std::string & | name | ) |
Definition at line 45 of file GFlavorMixerFactory.cxx.
References fFunctionMap, LOG, and pWARN.
|
static |
Definition at line 30 of file GFlavorMixerFactory.cxx.
References fgTheInstance, GFlavorMixerFactory(), and genie::flux::GFlavorMixerFactory::Cleaner::UseMe().
bool genie::flux::GFlavorMixerFactory::IsKnownFlavorMixer | ( | const std::string & | name | ) |
Definition at line 65 of file GFlavorMixerFactory.cxx.
References fFunctionMap.
|
private |
bool genie::flux::GFlavorMixerFactory::RegisterCreator | ( | std::string | name, |
GFlavorMixerICtorFuncPtr_t | ctorptr, | ||
bool * | ptr | ||
) |
Definition at line 90 of file GFlavorMixerFactory.cxx.
References fBoolPtrMap, and fFunctionMap.
|
friend |
Definition at line 97 of file GFlavorMixerFactory.h.
|
private |
Definition at line 69 of file GFlavorMixerFactory.h.
Referenced by RegisterCreator().
|
private |
Definition at line 66 of file GFlavorMixerFactory.h.
Referenced by AvailableFlavorMixers(), GetFlavorMixer(), IsKnownFlavorMixer(), and RegisterCreator().
|
staticprivate |
Definition at line 63 of file GFlavorMixerFactory.h.
Referenced by GFlavorMixerFactory(), Instance(), genie::flux::GFlavorMixerFactory::Cleaner::~Cleaner(), and ~GFlavorMixerFactory().
|
mutableprivate |
Definition at line 71 of file GFlavorMixerFactory.h.
Referenced by AvailableFlavorMixers().