X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fdriver.cpp;fp=source%2Flibmarklin%2Fdriver.cpp;h=0000000000000000000000000000000000000000;hb=1ff06c5bc46a677fa389ef86c6b26664368f1653;hp=3bec54ea79128e65cd571eac24b68d6cf90ff70e;hpb=9b05c573a38639827697fe393d55b7c76f5bde45;p=r2c2.git diff --git a/source/libmarklin/driver.cpp b/source/libmarklin/driver.cpp deleted file mode 100644 index 3bec54e..0000000 --- a/source/libmarklin/driver.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - -#include -#include "driver.h" -#include "dummy.h" -#include "intellibox.h" - -using namespace std; - -namespace Marklin { - -Driver *Driver::create(const string &str) -{ - string::size_type colon = str.find(':'); - string type = str.substr(0, colon); - string params; - - if(colon!=string::npos) - params = str.substr(colon+1); - - if(type=="ib" || type=="intellibox") - return new Intellibox(params); - else if(type=="dummy") - return new Dummy; - - throw Msp::InvalidParameterValue("Unknown driver"); -} - -} // namespace Marklin