#include <MIDIDeviceList.hxx>
Inherited by CLAM::ALSAMIDIDeviceList, CLAM::FileMIDIDeviceList, CLAM::PortMIDIDeviceList, and CLAM::TextFileMIDIDeviceList.
An singleton instance of each concrete MIDIDevice class for a specific architecture must be created, that fills the list mAvailableDevices on construction. The MIDIManager verifies the existence of lists for the possible architectures
To retrieve a list of all MIDIDeviceList's available, call AudioManager::FindList
Definition at line 40 of file MIDIDeviceList.hxx.
Public Types | |
typedef std::vector < MIDIDeviceList * > ::const_iterator | list_iterator |
Public Member Functions | |
const std::vector< std::string > & | AvailableDevices (void) |
Global iterator interface for device lists. | |
virtual std::string | DefaultDevice (void)=0 |
Pure virtual function that the concrete MIDIDeviceList class implements to get the name of the default device. | |
Protected Member Functions | |
void | AddMe (void) |
MIDIDeviceList (const std::string &arch) | |
Constructor of the MIDIDeviceList class, with a string as parameter that contains the name of the concrete architecture by this list. | |
virtual | ~MIDIDeviceList () |
Destructor of the class. | |
const std::string & | ArchName () |
Getter to obtain the name of the architecture related to this MIDIDeviceList. | |
virtual MIDIDevice * | Create (const std::string &name, const std::string &device)=0 |
Pure virtual function that the concrete MIDIDeviceList class implements to create a concrete MIDIDevice. | |
Protected Attributes | |
std::vector< std::string > | mAvailableDevices |
Friends | |
class | MIDIManager |
typedef std::vector<MIDIDeviceList*>::const_iterator CLAM::MIDIDeviceList::list_iterator |
Definition at line 50 of file MIDIDeviceList.hxx.
MIDIDeviceList::MIDIDeviceList | ( | const std::string & | arch | ) | [protected] |
Constructor of the MIDIDeviceList class, with a string as parameter that contains the name of the concrete architecture by this list.
arch | The name of architecture (i.e. ALSA) |
Definition at line 27 of file MIDIDeviceList.cxx.
MIDIDeviceList::~MIDIDeviceList | ( | ) | [protected, virtual] |
void MIDIDeviceList::AddMe | ( | void | ) | [protected] |
Definition at line 36 of file MIDIDeviceList.cxx.
const std::string& CLAM::MIDIDeviceList::ArchName | ( | ) | [inline, protected] |
Getter to obtain the name of the architecture related to this MIDIDeviceList.
Definition at line 62 of file MIDIDeviceList.hxx.
virtual MIDIDevice* CLAM::MIDIDeviceList::Create | ( | const std::string & | name, | |
const std::string & | device | |||
) | [protected, pure virtual] |
Pure virtual function that the concrete MIDIDeviceList class implements to create a concrete MIDIDevice.
name | A string with the name of new device | |
device | A string with the type of device |
Referenced by CLAM::MIDIManager::FindOrCreateDevice().
const std::vector<std::string>& CLAM::MIDIDeviceList::AvailableDevices | ( | void | ) | [inline] |
Global iterator interface for device lists.
It can be used to obtain the device list for each existent architecture.
The ending list iterator This method is useful to obtain a complete list of the devices available. This list is created with information of operating system, sound architecture, etc.
A list of strings containing the names of the Devices
Definition at line 87 of file MIDIDeviceList.hxx.
References mAvailableDevices.
Referenced by CLAM::MIDIManager::FindOrCreateDevice().
virtual std::string CLAM::MIDIDeviceList::DefaultDevice | ( | void | ) | [pure virtual] |
Pure virtual function that the concrete MIDIDeviceList class implements to get the name of the default device.
Referenced by CLAM::MIDIManager::FindOrCreateDevice().
friend class MIDIManager [friend] |
Definition at line 42 of file MIDIDeviceList.hxx.
std::vector<std::string> CLAM::MIDIDeviceList::mAvailableDevices [protected] |