CLAM::MIDIIn Class Reference

This class is the interface to an input of an MIDIDevice. More...

#include <MIDIIn.hxx>

List of all members.

Public Member Functions

virtual bool ConcreteConfigure (const ProcessingConfig &c) throw (ErrProcessingObj)
 Configuration method interface.
const ProcessingConfigGetConfig () const
 Getter for the configuration of the class.
 MIDIIn (bool configure=true)
 Constructor of the class with a boolean as parameter to choose whether to configure the object.
 MIDIIn (const MIDIIOConfig &c)
 Constructor of the class with an MIDIIOConfig object constructed by the user as parameter.
 ~MIDIIn ()
 Destructor unregisters this MIDIOut instance from the associated device.
const char * GetClassName () const
 Override it in every subclass and retur the name of that class.
bool Do (void)
 Non supervised mode of Do function.
void GetDeviceInfo (MIDIDevice::TInfo &) const
 Getter for the Info of Device Object attached to this MIDIOut instantiation.

Protected Member Functions

bool ConcreteStart (void)
 Processing objects have to redefine this method when starting them implies some internal changes.

Protected Attributes

MIDIIOConfig mConfig
MIDIDevicempDevice

Friends

class MIDIManager
class MIDIDevice

Detailed Description

This class is the interface to an input of an MIDIDevice.

See also:
Processing, MIDIInConfig, MIDIOut, MIDIManager, MIDIDevice

Definition at line 35 of file MIDIIn.hxx.


Constructor & Destructor Documentation

CLAM::MIDIIn::MIDIIn ( bool  configure = true  )  [inline]

Constructor of the class with a boolean as parameter to choose whether to configure the object.

It has been implemented by this way to solve a problem between constructor of this class and constructors of classes derived of MIDIIn. The derived class constructor will call the MIDIIn constructor which will call Configure. Obviously, this will cause problems, when the ConcreteConfigure is reimplemented in the derived class, but the MIDIIn constructor calls MIDIIn::ConcreteConfigure instead. The solution is a default constructor of MIDIIn with the signature MIDIIn::MIDIIn(bool configure = true). The configure flag indicated that the constructor should call Configure (by default), but not in the case of derived classes.

Parameters:
configure Boolean parameter to decide if configure object, like explained before. True by default.

Definition at line 78 of file MIDIIn.hxx.

References CLAM::Processing::Configure(), and mpDevice.

CLAM::MIDIIn::MIDIIn ( const MIDIIOConfig c  )  [inline]

Constructor of the class with an MIDIIOConfig object constructed by the user as parameter.

Parameters:
c The concrete MIDIIOConfig that will be used for this construction

Definition at line 92 of file MIDIIn.hxx.

References CLAM::Processing::Configure(), and mpDevice.

CLAM::MIDIIn::~MIDIIn (  )  [inline]

Destructor unregisters this MIDIOut instance from the associated device.

Definition at line 100 of file MIDIIn.hxx.

References mpDevice, and CLAM::MIDIDevice::Unregister().


Member Function Documentation

bool CLAM::MIDIIn::ConcreteConfigure ( const ProcessingConfig c  )  throw (ErrProcessingObj) [virtual]

Configuration method interface.

The Processing base class forces all the concrete classes derived from it to implement this method, which must actually perform the specific configuration tasks. Note that the user can not call this method directly. He will use Configure instead. The argument is expected to be an object of the necesary concrete configuration class.

Returns:
true if the object has been configured correctly
Parameters:
The related ProcessingConfig object
Exceptions:
ErrProcessingObj when there is an error on device adquisition

Unregistering a possible device already associated with this MIDIOut object

Getting the MIDIManager object

Registering the MIDIIn object through the MIDIManager object

Reimplemented from CLAM::Processing.

Reimplemented in CLAM::MIDIInControl.

Definition at line 25 of file MIDIIn.cxx.

References CLAM::MIDIManager::Current(), CLAM::Err::Embed(), and CLAM::MIDIManager::Register().

bool CLAM::MIDIIn::ConcreteStart ( void   )  [protected, virtual]

Processing objects have to redefine this method when starting them implies some internal changes.

ie: adquiring resources.

Returns:
Whether start changes have been successful

Starting the MIDIDevice object assigned to the MIDIIn

Reimplemented from CLAM::Processing.

Definition at line 68 of file MIDIIn.cxx.

bool CLAM::MIDIIn::Do ( void   )  [inline, virtual]

Non supervised mode of Do function.

Non implemented yet

Implements CLAM::Processing.

Definition at line 106 of file MIDIIn.hxx.

const char* CLAM::MIDIIn::GetClassName (  )  const [inline, virtual]

Override it in every subclass and retur the name of that class.

Implements CLAM::Processing.

Reimplemented in CLAM::MIDIInControl.

Definition at line 102 of file MIDIIn.hxx.

const ProcessingConfig& CLAM::MIDIIn::GetConfig (  )  const [inline, virtual]

Getter for the configuration of the class.

Returns:
The ProcessingConfig object attached to this Processing object

Reimplemented from CLAM::Processing.

Definition at line 59 of file MIDIIn.hxx.

References mConfig.

void CLAM::MIDIIn::GetDeviceInfo ( MIDIDevice::TInfo info  )  const

Getter for the Info of Device Object attached to this MIDIOut instantiation.

Parameters:
info TInfo object that method will modify with the values of Tinfo internal object

Definition at line 77 of file MIDIIn.cxx.


Friends And Related Function Documentation

friend class MIDIDevice [friend]

Definition at line 38 of file MIDIIn.hxx.

friend class MIDIManager [friend]

Definition at line 37 of file MIDIIn.hxx.


Member Data Documentation

Definition at line 40 of file MIDIIn.hxx.

Referenced by GetConfig(), and CLAM::MIDIManager::Register().


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