58 static void reg(
const std::string name,
64 std::map<std::string, AvrFactory::AvrDeviceCreator>
devmap;
69 #define AVR_REGISTER(name, class) \ 70 struct AVRFactoryEntryMaker_ ## name { \ 72 static AvrDevice *create_one() { \ 75 AVRFactoryEntryMaker_ ## name() { \ 76 AvrFactory::reg(#name, create_one); \ 79 AVRFactoryEntryMaker_ ## name maker_ ##name; Basic AVR device, contains the core functionality.
static std::vector< std::string > & supportedDevices()
static AvrFactory & instance()
Singleton class access.
static void reg(const std::string name, AvrDeviceCreator create)
Register a creation static method with the factory.
AvrDevice * makeDevice(const char *config)
std::map< std::string, AvrFactory::AvrDeviceCreator > devmap
map of registered AVR devices
AvrDevice *(* AvrDeviceCreator)()