This abstract class allows you to retrieve a list of all available devices (strings) for a certain architecture. More...
#include <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 |
This abstract class allows you to retrieve a list of all available devices (strings) for a certain architecture.
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.
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] |
Destructor of the class.
Definition at line 32 of file MIDIDeviceList.cxx.
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.
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.
Definition at line 87 of file MIDIDeviceList.hxx.
References mAvailableDevices.
Referenced by CLAM::MIDIManager::FindOrCreateDevice().
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().
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] |
Definition at line 46 of file MIDIDeviceList.hxx.
Referenced by AvailableDevices().