CLAM::MIDIOut Class Reference

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

#include <MIDIOut.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.
 MIDIOut (bool configure=true)
 Constructor of the class with a boolean as parameter to choose whether to configure the object.
 MIDIOut (const MIDIIOConfig &c)
 Constructor of the class with an MIDIIOConfig object constructed by the user as parameter.
 ~MIDIOut ()
 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

virtual void Handle (unsigned char *msg, int size)=0
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, MIDIIn, MIDIManager, MIDIDevice

Definition at line 35 of file MIDIOut.hxx.


Constructor & Destructor Documentation

CLAM::MIDIOut::MIDIOut ( 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 MIDIOut. The derived class constructor will call the MIDIOut constructor which will call Configure. Obviously, this will cause problems, when the ConcreteConfigure is reimplemented in the derived class, but the MIDIOut constructor calls MIDIOut::ConcreteConfigure instead. The solution is a default constructor of MIDIOut with the signature MIDIOut::MIDIOut(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 74 of file MIDIOut.hxx.

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

CLAM::MIDIOut::MIDIOut ( 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 88 of file MIDIOut.hxx.

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

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

Destructor unregisters this MIDIOut instance from the associated device.

Definition at line 96 of file MIDIOut.hxx.

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


Member Function Documentation

bool CLAM::MIDIOut::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; true otherwise
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 MIDIOut object through the MIDIManager object

Reimplemented from CLAM::Processing.

Reimplemented in CLAM::MIDIOutControl.

Definition at line 25 of file MIDIOut.cxx.

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

bool CLAM::MIDIOut::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 MIDIOut

Reimplemented from CLAM::Processing.

Definition at line 70 of file MIDIOut.cxx.

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

Non supervised mode of Do function.

Non implemented yet

Implements CLAM::Processing.

Definition at line 102 of file MIDIOut.hxx.

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

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

Implements CLAM::Processing.

Reimplemented in CLAM::MIDIOutControl.

Definition at line 98 of file MIDIOut.hxx.

const ProcessingConfig& CLAM::MIDIOut::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 56 of file MIDIOut.hxx.

References mConfig.

void CLAM::MIDIOut::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 79 of file MIDIOut.cxx.

virtual void CLAM::MIDIOut::Handle ( unsigned char *  msg,
int  size 
) [protected, pure virtual]

Friends And Related Function Documentation

friend class MIDIDevice [friend]

Definition at line 38 of file MIDIOut.hxx.

friend class MIDIManager [friend]

Definition at line 37 of file MIDIOut.hxx.


Member Data Documentation

Definition at line 40 of file MIDIOut.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