GENIEGenerator
|
A class for generating concrete GFluxI 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 <GFluxDriverFactory.h>
Classes | |
struct | Cleaner |
Public Member Functions | |
genie::GFluxI * | GetFluxDriver (const std::string &) |
bool | IsKnownFluxDriver (const std::string &) |
const std::vector< std::string > & | AvailableFluxDrivers () const |
bool | RegisterCreator (std::string name, GFluxICtorFuncPtr_t ctorptr, bool *ptr) |
void | PrintConfig () const |
Static Public Member Functions | |
static GFluxDriverFactory & | Instance () |
Private Member Functions | |
GFluxDriverFactory () | |
virtual | ~GFluxDriverFactory () |
GFluxDriverFactory (const GFluxDriverFactory &) | |
void | operator= (const GFluxDriverFactory &) |
Private Attributes | |
std::map< std::string, GFluxICtorFuncPtr_t > | fFunctionMap |
std::map< std::string, bool * > | fBoolPtrMap |
std::vector< std::string > | listnames |
Static Private Attributes | |
static GFluxDriverFactory * | fgTheInstance |
Friends | |
struct | Cleaner |
A class for generating concrete GFluxI 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 GFluxI*.
Definition at line 46 of file GFluxDriverFactory.h.
|
private |
Definition at line 23 of file GFluxDriverFactory.cxx.
References fgTheInstance.
Referenced by Instance().
|
privatevirtual |
Definition at line 28 of file GFluxDriverFactory.cxx.
References fgTheInstance.
|
private |
const std::vector< std::string > & genie::flux::GFluxDriverFactory::AvailableFluxDrivers | ( | ) | const |
Definition at line 79 of file GFluxDriverFactory.cxx.
References fFunctionMap, and listnames.
Referenced by main(), and PrintConfig().
GFluxI * genie::flux::GFluxDriverFactory::GetFluxDriver | ( | const std::string & | name | ) |
Definition at line 48 of file GFluxDriverFactory.cxx.
References fFunctionMap, LOG, and pWARN.
Referenced by main().
|
static |
Definition at line 33 of file GFluxDriverFactory.cxx.
References fgTheInstance, GFluxDriverFactory(), and genie::flux::GFluxDriverFactory::Cleaner::UseMe().
Referenced by main().
bool genie::flux::GFluxDriverFactory::IsKnownFluxDriver | ( | const std::string & | name | ) |
Definition at line 68 of file GFluxDriverFactory.cxx.
References fFunctionMap.
|
private |
void genie::flux::GFluxDriverFactory::PrintConfig | ( | void | ) | const |
Definition at line 103 of file GFluxDriverFactory.cxx.
References AvailableFluxDrivers().
bool genie::flux::GFluxDriverFactory::RegisterCreator | ( | std::string | name, |
GFluxICtorFuncPtr_t | ctorptr, | ||
bool * | ptr | ||
) |
Definition at line 93 of file GFluxDriverFactory.cxx.
References fBoolPtrMap, and fFunctionMap.
|
friend |
Definition at line 102 of file GFluxDriverFactory.h.
|
private |
Definition at line 74 of file GFluxDriverFactory.h.
Referenced by RegisterCreator().
|
private |
Definition at line 71 of file GFluxDriverFactory.h.
Referenced by AvailableFluxDrivers(), GetFluxDriver(), IsKnownFluxDriver(), and RegisterCreator().
|
staticprivate |
Definition at line 68 of file GFluxDriverFactory.h.
Referenced by GFluxDriverFactory(), Instance(), genie::flux::GFluxDriverFactory::Cleaner::~Cleaner(), and ~GFluxDriverFactory().
|
mutableprivate |
Definition at line 76 of file GFluxDriverFactory.h.
Referenced by AvailableFluxDrivers().