CLAM::MIDIDeviceList Class Reference

This abstract class allows you to retrieve a list of all available devices (strings) for a certain architecture. More...

#include <MIDIDeviceList.hxx>

List of all members.

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 MIDIDeviceCreate (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

Detailed Description

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

See also:
MIDIDevice, MIDIManager

Definition at line 40 of file MIDIDeviceList.hxx.


Member Typedef Documentation

typedef std::vector<MIDIDeviceList*>::const_iterator CLAM::MIDIDeviceList::list_iterator

Definition at line 50 of file MIDIDeviceList.hxx.


Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

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.

Returns:
The beginning list iterator 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 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.

Parameters:
name A string with the name of new device
device A string with the type of device
Returns:
The MIDIDevice created

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.

Returns:
A string with the name of default device

Referenced by CLAM::MIDIManager::FindOrCreateDevice().


Friends And Related Function Documentation

friend class MIDIManager [friend]

Definition at line 42 of file MIDIDeviceList.hxx.


Member Data Documentation

std::vector<std::string> CLAM::MIDIDeviceList::mAvailableDevices [protected]

Definition at line 46 of file MIDIDeviceList.hxx.

Referenced by AvailableDevices().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3