mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-04 23:14:53 -04:00
Modem factory init
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
ModemFactoryList Modem::modemFactories;
|
||||
|
||||
void Modem::addModemFactory(std::string modemName, ModemFactoryFunc *factoryFunc) {
|
||||
modemFactories[modemName] = factoryFunc;
|
||||
void Modem::addModemFactory(std::string modemName, Modem *factorySingle) {
|
||||
modemFactories[modemName] = factorySingle;
|
||||
}
|
||||
|
||||
ModemFactoryList Modem::getFactories() {
|
||||
|
||||
@@ -30,12 +30,11 @@ public:
|
||||
};
|
||||
|
||||
class Modem;
|
||||
typedef Modem *(Modem::*ModemFactoryFunc)();
|
||||
typedef std::map<std::string,ModemFactoryFunc *> ModemFactoryList;
|
||||
typedef std::map<std::string,Modem *> ModemFactoryList;
|
||||
|
||||
class Modem {
|
||||
public:
|
||||
static void addModemFactory(std::string modemName, ModemFactoryFunc *factoryFunc);
|
||||
static void addModemFactory(std::string modemName, Modem *factorySingle);
|
||||
static ModemFactoryList getFactories();
|
||||
|
||||
virtual Modem *factory();
|
||||
|
||||
Reference in New Issue
Block a user