3 This file is part of the MSP Märklin suite
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #include <msp/core/except.h>
11 #include "intellibox.h"
17 Driver *Driver::create(const string &str)
19 string::size_type colon = str.find(':');
20 string type = str.substr(0, colon);
23 if(colon!=string::npos)
24 params = str.substr(colon+1);
26 if(type=="ib" || type=="intellibox")
27 return new Intellibox(params);
28 else if(type=="dummy")
31 throw Msp::InvalidParameterValue("Unknown driver");
34 } // namespace Marklin