54 std::map<std::string, GFluxICtorFuncPtr_t>::iterator itr
62 LOG(
"Flux",
pWARN) <<
"### GFluxDriverFactory WARNING: "
63 <<
"GFluxI " << name <<
" is not known";
72 std::map<std::string, GFluxICtorFuncPtr_t>::iterator itr
78 const std::vector<std::string>&
86 std::map<std::string, GFluxICtorFuncPtr_t>::const_iterator itr;
106 size_t n = avail.size();
107 std::cout <<
"GFluxDriverFactory has the following drivers registered:"
109 for (
size_t i=0; i<n; ++i) {
110 std::cout <<
" [" << std::setw(3) << i <<
"] "
111 << avail[i] << std::endl;
virtual ~GFluxDriverFactory()
static GFluxDriverFactory * fgTheInstance
const std::vector< std::string > & AvailableFluxDrivers() const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
std::vector< std::string > listnames
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.
static GFluxDriverFactory & Instance()
std::map< std::string, GFluxICtorFuncPtr_t > fFunctionMap
bool RegisterCreator(std::string name, GFluxICtorFuncPtr_t ctorptr, bool *ptr)
std::map< std::string, bool * > fBoolPtrMap
bool IsKnownFluxDriver(const std::string &)
genie::GFluxI *(* GFluxICtorFuncPtr_t)()
genie::GFluxI * GetFluxDriver(const std::string &)
GENIE Interface for user-defined flux classes.