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*.
Copyright (c) 2003-2020, The GENIE Collaboration for the full text of the license visit http://copyright.genie-mc.org
Definition at line 43 of file GFlavorMixerFactory.h.
|
private |
Definition at line 20 of file GFlavorMixerFactory.cxx.
|
privatevirtual |
Definition at line 25 of file GFlavorMixerFactory.cxx.
|
private |
const std::vector< std::string > & genie::flux::GFlavorMixerFactory::AvailableFlavorMixers | ( | ) | const |
Definition at line 76 of file GFlavorMixerFactory.cxx.
GFlavorMixerI * genie::flux::GFlavorMixerFactory::GetFlavorMixer | ( | const std::string & | name | ) |
Definition at line 45 of file GFlavorMixerFactory.cxx.
|
static |
Definition at line 30 of file GFlavorMixerFactory.cxx.
bool genie::flux::GFlavorMixerFactory::IsKnownFlavorMixer | ( | const std::string & | name | ) |
Definition at line 65 of file GFlavorMixerFactory.cxx.
|
private |
bool genie::flux::GFlavorMixerFactory::RegisterCreator | ( | std::string | name, |
GFlavorMixerICtorFuncPtr_t | ctorptr, | ||
bool * | ptr | ||
) |
Definition at line 90 of file GFlavorMixerFactory.cxx.
|
friend |
Definition at line 97 of file GFlavorMixerFactory.h.
|
private |
Definition at line 69 of file GFlavorMixerFactory.h.
|
private |
Definition at line 66 of file GFlavorMixerFactory.h.
|
staticprivate |
Definition at line 63 of file GFlavorMixerFactory.h.
|
mutableprivate |
Definition at line 71 of file GFlavorMixerFactory.h.