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*.
Copyright (c) 2003-2020, The GENIE Collaboration for the full text of the license visit http://copyright.genie-mc.org
Definition at line 46 of file GFluxDriverFactory.h.
|
private |
Definition at line 23 of file GFluxDriverFactory.cxx.
|
privatevirtual |
Definition at line 28 of file GFluxDriverFactory.cxx.
|
private |
const std::vector< std::string > & genie::flux::GFluxDriverFactory::AvailableFluxDrivers | ( | ) | const |
Definition at line 79 of file GFluxDriverFactory.cxx.
GFluxI * genie::flux::GFluxDriverFactory::GetFluxDriver | ( | const std::string & | name | ) |
Definition at line 48 of file GFluxDriverFactory.cxx.
|
static |
Definition at line 33 of file GFluxDriverFactory.cxx.
bool genie::flux::GFluxDriverFactory::IsKnownFluxDriver | ( | const std::string & | name | ) |
Definition at line 68 of file GFluxDriverFactory.cxx.
|
private |
void genie::flux::GFluxDriverFactory::PrintConfig | ( | void | ) | const |
Definition at line 103 of file GFluxDriverFactory.cxx.
bool genie::flux::GFluxDriverFactory::RegisterCreator | ( | std::string | name, |
GFluxICtorFuncPtr_t | ctorptr, | ||
bool * | ptr | ||
) |
Definition at line 93 of file GFluxDriverFactory.cxx.
|
friend |
Definition at line 102 of file GFluxDriverFactory.h.
|
private |
Definition at line 74 of file GFluxDriverFactory.h.
|
private |
Definition at line 71 of file GFluxDriverFactory.h.
|
staticprivate |
Definition at line 68 of file GFluxDriverFactory.h.
|
mutableprivate |
Definition at line 76 of file GFluxDriverFactory.h.