1 #include "centralstation.h"
4 #include "intellibox.h"
10 Driver *Driver::create(const string &str)
12 string::size_type colon = str.find(':');
13 string type = str.substr(0, colon);
16 if(colon!=string::npos)
17 params = str.substr(colon+1);
19 if(type=="ib" || type=="intellibox")
20 return new Intellibox(params);
21 else if(type=="cs" || type=="centralstation")
22 return new CentralStation(params);
23 else if(type=="dummy")
24 return new Dummy(params);
26 throw invalid_argument("Driver::create");