3 This file is part of R²C²
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #include <msp/core/except.h>
9 #include "centralstation.h"
12 #include "intellibox.h"
18 Driver *Driver::create(const string &str)
20 string::size_type colon = str.find(':');
21 string type = str.substr(0, colon);
24 if(colon!=string::npos)
25 params = str.substr(colon+1);
27 if(type=="ib" || type=="intellibox")
28 return new Intellibox(params);
29 else if(type=="cs" || type=="centralstation")
30 return new CentralStation(params);
31 else if(type=="dummy")
34 throw Msp::InvalidParameterValue("Unknown driver");