139 |
} |
} |
140 |
|
|
141 |
DeviceCreationParameter* MidiInputDeviceFactory::GetDriverParameter(String DriverName, String ParameterName) throw (Exception) { |
DeviceCreationParameter* MidiInputDeviceFactory::GetDriverParameter(String DriverName, String ParameterName) throw (Exception) { |
142 |
std::map<String,DeviceCreationParameter*> parameters = GetAvailableDriverParameters(DriverName); |
if (!InnerFactories.count(DriverName)) throw Exception("There is no midi input driver '" + DriverName + "'."); |
143 |
if (!parameters.count(ParameterName)) throw Exception("Midi input driver '" + DriverName + "' does not have a parameter '" + ParameterName + "'."); |
DeviceParameterFactory* pParamFactory = ParameterFactories[DriverName]; |
144 |
return parameters[ParameterName]; |
if (pParamFactory) { |
145 |
|
try { return pParamFactory->Create(ParameterName); } |
146 |
|
catch(Exception e) { } |
147 |
|
} |
148 |
|
throw Exception("Midi input driver '" + DriverName + "' does not have a parameter '" + ParameterName + "'."); |
149 |
} |
} |
150 |
|
|
151 |
String MidiInputDeviceFactory::GetDriverDescription(String DriverName) throw (Exception) { |
String MidiInputDeviceFactory::GetDriverDescription(String DriverName) throw (Exception) { |