Ardour  9.0-pre0-582-g084a23a80d
MIDI::Name::MidiPatchManager Class Reference

#include <midi_patch_manager.h>

Public Types

typedef std::map< std::string, std::shared_ptr< MIDINameDocument > > MidiNameDocuments
 
typedef std::map< std::string, MIDINameDocument::MasterDeviceNamesListDeviceNamesByMaker
 

Public Member Functions

 ~MidiPatchManager ()
 
bool add_custom_midnam (const std::string &id, char const *)
 
bool update_custom_midnam (const std::string &id, char const *)
 
bool remove_custom_midnam (const std::string &id)
 
bool is_custom_model (const std::string &model) const
 
void add_search_path (const PBD::Searchpath &search_path)
 
void remove_search_path (const PBD::Searchpath &search_path)
 
std::shared_ptr< MIDINameDocumentdocument_by_model (std::string model_name) const
 
std::shared_ptr< MasterDeviceNamesmaster_device_by_model (std::string model_name)
 
std::shared_ptr< ChannelNameSetfind_channel_name_set (std::string model, std::string custom_device_mode, uint8_t channel)
 
std::shared_ptr< Patchfind_patch (std::string model, std::string custom_device_mode, uint8_t channel, PatchPrimaryKey patch_key)
 
std::shared_ptr< Patchprevious_patch (std::string model, std::string custom_device_mode, uint8_t channel, PatchPrimaryKey patch_key)
 
std::shared_ptr< Patchnext_patch (std::string model, std::string custom_device_mode, uint8_t channel, PatchPrimaryKey patch_key)
 
std::list< std::string > custom_device_mode_names_by_model (std::string model_name)
 
const MasterDeviceNames::Modelsall_models () const
 
const DeviceNamesByMakerdevices_by_manufacturer () const
 
void load_midnams_in_thread ()
 
void maybe_use (PBD::ScopedConnectionList &clist, PBD::EventLoop::InvalidationRecord *ir, const std::function< void()> &slot, PBD::EventLoop *event_loop)
 

Static Public Member Functions

static MidiPatchManagerinstance ()
 

Public Attributes

PBD::Signal< void()> PatchesChanged
 

Private Member Functions

 MidiPatchManager ()
 Singleton. More...
 
 MidiPatchManager (const MidiPatchManager &)
 
MidiPatchManageroperator= (const MidiPatchManager &)
 
bool load_midi_name_document (const std::string &file_path)
 
bool add_midi_name_document (std::shared_ptr< MIDINameDocument >)
 
bool remove_midi_name_document (const std::string &file_path, bool emit_signal=true)
 
void add_midnam_files_from_directory (const std::string &directory_path)
 
void remove_midnam_files_from_directory (const std::string &directory_path)
 
void load_midnams ()
 

Private Attributes

PBD::Searchpath _search_path
 
MidiNameDocuments _documents
 
MIDINameDocument::MasterDeviceNamesList _master_devices_by_model
 
DeviceNamesByMaker _devices_by_manufacturer
 
MasterDeviceNames::Models _all_models
 
Glib::Threads::Mutex _lock
 
bool no_patch_changed_messages
 
bool stop_thread
 
PBD::Thread_midnam_load_thread
 

Static Private Attributes

static MidiPatchManager_manager
 

Detailed Description

Definition at line 41 of file midi_patch_manager.h.

Member Typedef Documentation

◆ DeviceNamesByMaker

◆ MidiNameDocuments

typedef std::map<std::string, std::shared_ptr<MIDINameDocument> > MIDI::Name::MidiPatchManager::MidiNameDocuments

Definition at line 52 of file midi_patch_manager.h.

Constructor & Destructor Documentation

◆ MidiPatchManager() [1/2]

MIDI::Name::MidiPatchManager::MidiPatchManager ( )
private

Singleton.

◆ MidiPatchManager() [2/2]

MIDI::Name::MidiPatchManager::MidiPatchManager ( const MidiPatchManager )
private

◆ ~MidiPatchManager()

MIDI::Name::MidiPatchManager::~MidiPatchManager ( )

Member Function Documentation

◆ add_custom_midnam()

bool MIDI::Name::MidiPatchManager::add_custom_midnam ( const std::string &  id,
char const *   
)

◆ add_midi_name_document()

bool MIDI::Name::MidiPatchManager::add_midi_name_document ( std::shared_ptr< MIDINameDocument )
private

◆ add_midnam_files_from_directory()

void MIDI::Name::MidiPatchManager::add_midnam_files_from_directory ( const std::string &  directory_path)
private

◆ add_search_path()

void MIDI::Name::MidiPatchManager::add_search_path ( const PBD::Searchpath search_path)

◆ all_models()

const MasterDeviceNames::Models& MIDI::Name::MidiPatchManager::all_models ( ) const
inline

Definition at line 147 of file midi_patch_manager.h.

◆ custom_device_mode_names_by_model()

std::list<std::string> MIDI::Name::MidiPatchManager::custom_device_mode_names_by_model ( std::string  model_name)
inline

Definition at line 138 of file midi_patch_manager.h.

◆ devices_by_manufacturer()

const DeviceNamesByMaker& MIDI::Name::MidiPatchManager::devices_by_manufacturer ( ) const
inline

Definition at line 149 of file midi_patch_manager.h.

◆ document_by_model()

std::shared_ptr<MIDINameDocument> MIDI::Name::MidiPatchManager::document_by_model ( std::string  model_name) const

◆ find_channel_name_set()

std::shared_ptr<ChannelNameSet> MIDI::Name::MidiPatchManager::find_channel_name_set ( std::string  model,
std::string  custom_device_mode,
uint8_t  channel 
)
inline

Definition at line 80 of file midi_patch_manager.h.

◆ find_patch()

std::shared_ptr<Patch> MIDI::Name::MidiPatchManager::find_patch ( std::string  model,
std::string  custom_device_mode,
uint8_t  channel,
PatchPrimaryKey  patch_key 
)
inline

Definition at line 93 of file midi_patch_manager.h.

◆ instance()

static MidiPatchManager& MIDI::Name::MidiPatchManager::instance ( )
inlinestatic

Definition at line 57 of file midi_patch_manager.h.

◆ is_custom_model()

bool MIDI::Name::MidiPatchManager::is_custom_model ( const std::string &  model) const

◆ load_midi_name_document()

bool MIDI::Name::MidiPatchManager::load_midi_name_document ( const std::string &  file_path)
private

◆ load_midnams()

void MIDI::Name::MidiPatchManager::load_midnams ( )
private

◆ load_midnams_in_thread()

void MIDI::Name::MidiPatchManager::load_midnams_in_thread ( )

◆ master_device_by_model()

std::shared_ptr<MasterDeviceNames> MIDI::Name::MidiPatchManager::master_device_by_model ( std::string  model_name)
inline

Definition at line 77 of file midi_patch_manager.h.

◆ maybe_use()

void MIDI::Name::MidiPatchManager::maybe_use ( PBD::ScopedConnectionList clist,
PBD::EventLoop::InvalidationRecord ir,
const std::function< void()> &  slot,
PBD::EventLoop event_loop 
)

◆ next_patch()

std::shared_ptr<Patch> MIDI::Name::MidiPatchManager::next_patch ( std::string  model,
std::string  custom_device_mode,
uint8_t  channel,
PatchPrimaryKey  patch_key 
)
inline

Definition at line 123 of file midi_patch_manager.h.

◆ operator=()

MidiPatchManager& MIDI::Name::MidiPatchManager::operator= ( const MidiPatchManager )
private

◆ previous_patch()

std::shared_ptr<Patch> MIDI::Name::MidiPatchManager::previous_patch ( std::string  model,
std::string  custom_device_mode,
uint8_t  channel,
PatchPrimaryKey  patch_key 
)
inline

Definition at line 108 of file midi_patch_manager.h.

◆ remove_custom_midnam()

bool MIDI::Name::MidiPatchManager::remove_custom_midnam ( const std::string &  id)

◆ remove_midi_name_document()

bool MIDI::Name::MidiPatchManager::remove_midi_name_document ( const std::string &  file_path,
bool  emit_signal = true 
)
private

◆ remove_midnam_files_from_directory()

void MIDI::Name::MidiPatchManager::remove_midnam_files_from_directory ( const std::string &  directory_path)
private

◆ remove_search_path()

void MIDI::Name::MidiPatchManager::remove_search_path ( const PBD::Searchpath search_path)

◆ update_custom_midnam()

bool MIDI::Name::MidiPatchManager::update_custom_midnam ( const std::string &  id,
char const *   
)

Member Data Documentation

◆ _all_models

MasterDeviceNames::Models MIDI::Name::MidiPatchManager::_all_models
private

Definition at line 170 of file midi_patch_manager.h.

◆ _devices_by_manufacturer

DeviceNamesByMaker MIDI::Name::MidiPatchManager::_devices_by_manufacturer
private

Definition at line 169 of file midi_patch_manager.h.

◆ _documents

MidiNameDocuments MIDI::Name::MidiPatchManager::_documents
private

Definition at line 167 of file midi_patch_manager.h.

◆ _lock

Glib::Threads::Mutex MIDI::Name::MidiPatchManager::_lock
private

Definition at line 172 of file midi_patch_manager.h.

◆ _manager

MidiPatchManager* MIDI::Name::MidiPatchManager::_manager
staticprivate

Definition at line 49 of file midi_patch_manager.h.

◆ _master_devices_by_model

MIDINameDocument::MasterDeviceNamesList MIDI::Name::MidiPatchManager::_master_devices_by_model
private

Definition at line 168 of file midi_patch_manager.h.

◆ _midnam_load_thread

PBD::Thread* MIDI::Name::MidiPatchManager::_midnam_load_thread
private

Definition at line 175 of file midi_patch_manager.h.

◆ _search_path

PBD::Searchpath MIDI::Name::MidiPatchManager::_search_path
private

Definition at line 165 of file midi_patch_manager.h.

◆ no_patch_changed_messages

bool MIDI::Name::MidiPatchManager::no_patch_changed_messages
private

Definition at line 173 of file midi_patch_manager.h.

◆ PatchesChanged

PBD::Signal<void()> MIDI::Name::MidiPatchManager::PatchesChanged

Definition at line 64 of file midi_patch_manager.h.

◆ stop_thread

bool MIDI::Name::MidiPatchManager::stop_thread
private

Definition at line 174 of file midi_patch_manager.h.


The documentation for this class was generated from the following file: