static MidiPatchManager* _manager;
public:
- typedef std::map<std::string, boost::shared_ptr<MIDINameDocument> > MidiNameDocuments;
+ typedef std::map<std::string, boost::shared_ptr<MIDINameDocument> > MidiNameDocuments;
+ typedef std::map<std::string, MIDINameDocument::MasterDeviceNamesList> DeviceNamesByMaker;
virtual ~MidiPatchManager() { _manager = 0; }
std::list<std::string> custom_device_mode_names_by_model(std::string model_name) {
if (model_name != "") {
- return master_device_by_model(model_name)->custom_device_mode_names();
- } else {
- return std::list<std::string>();
+ if (master_device_by_model(model_name)) {
+ return master_device_by_model(model_name)->custom_device_mode_names();
+ }
}
+ return std::list<std::string>();
}
const MasterDeviceNames::Models& all_models() const { return _all_models; }
+ const DeviceNamesByMaker& devices_by_manufacturer() const { return _devices_by_manufacturer; }
+
private:
void session_going_away();
void refresh();
MidiNameDocuments _documents;
MIDINameDocument::MasterDeviceNamesList _master_devices_by_model;
+ DeviceNamesByMaker _devices_by_manufacturer;
MasterDeviceNames::Models _all_models;
};