Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

MModule Class Reference

An abstract audio module. More...

#include <MModule.h>

Inheritance diagram for MModule:

MClient MPlugin MSupervisor MUserClient List of all members.

Public Slots

virtual void Activate ()=0
virtual void Deactivate ()=0
virtual void Run (const unsigned int n)=0

Public Member Functions

virtual string Name () const
virtual bool IsActive () const
virtual MAudioInputPortModuleAudioInput (const unsigned int n) const =0
virtual MAudioOutputPortModuleAudioOutput (const unsigned int n) const =0
virtual MControlInputPortModuleControlInput (const unsigned int n) const =0
virtual MControlOutputPortModuleControlOutput (const unsigned int n) const =0
virtual unsigned int NumberOfAudioInputs () const =0
virtual unsigned int NumberOfAudioOutputs () const =0
virtual unsigned int NumberOfControlInputs () const =0
virtual unsigned int NumberOfControlOutputs () const =0
virtual MPortGetPortByName (const string &name) const
virtual bool IsMine (MPort *port) const

Protected Member Functions

 MModule (const string &name="module", QObject *parent=0)

Protected Attributes

string _name
bool _active

Detailed Description

This is a common abstraction for both MPlugin and MClient objects. It is keeping references and providing routines to access audio or control, input or output ports ( MAudioInputPort, MAudioOutputPort, MControlInputPort, MControlOutputPort ).


Constructor & Destructor Documentation

MModule::MModule const string &  name = "module",
QObject *  parent = 0
[inline, protected]
 

Creates a modulefault constructor.

Parameters:
name Name of the module.
parent Qt parent of the module.

Member Function Documentation

string MModule::Name  )  const [virtual]
 

The name of the module.

bool MModule::IsActive  )  const [virtual]
 

Is the module active ?

virtual MAudioInputPort* MModule::ModuleAudioInput const unsigned int  n  )  const [pure virtual]
 

The nth audio input port ( MAudioInputPort ) of the module.

Precondition:
n < NumberOfAudioInputs( )
Postcondition:
result != NULL

Implemented in MClient, and MPlugin.

virtual MAudioOutputPort* MModule::ModuleAudioOutput const unsigned int  n  )  const [pure virtual]
 

The nth audio output port ( MAudioOutputPort ) of the module.

Precondition:
n < NumberOfAudioOutputs( )
Postcondition:
result != NULL

Implemented in MClient, and MPlugin.

virtual MControlInputPort* MModule::ModuleControlInput const unsigned int  n  )  const [pure virtual]
 

The nth control input port ( MControlInputPort ) of the module.

Precondition:
n < NumberOfControlInputs( )
Postcondition:
result != NULL

Implemented in MClient, and MPlugin.

virtual MControlOutputPort* MModule::ModuleControlOutput const unsigned int  n  )  const [pure virtual]
 

The nth control output port ( MControlOutputPort ) of the module.

Precondition:
n < NumberOfControlOutputs( )
Postcondition:
result != NULL

Implemented in MClient, and MPlugin.

virtual unsigned int MModule::NumberOfAudioInputs  )  const [pure virtual]
 

The number of audio input ports ( MAudioInputPort ) of the module.

Implemented in MClient, and MPlugin.

virtual unsigned int MModule::NumberOfAudioOutputs  )  const [pure virtual]
 

The number of audio output ports ( MAudioOutputPort ) of the module.

Implemented in MClient, and MPlugin.

virtual unsigned int MModule::NumberOfControlInputs  )  const [pure virtual]
 

The number of control input ports ( MControlInputPort ) of the module.

Implemented in MClient, and MPlugin.

virtual unsigned int MModule::NumberOfControlOutputs  )  const [pure virtual]
 

The number of control output ports ( MControlOutputPort ) of the module.

Implemented in MClient, and MPlugin.

MPort * MModule::GetPortByName const string &  name  )  const [virtual]
 

Search for a port by called name belonging to this module.

Note:
The name of a port should be unique amongst the ports of a module.

bool MModule::IsMine MPort port  )  const [virtual]
 

Is the port mine ?

Returns:
TRUE if the port belongs to the module otherwise FALSE.

virtual void MModule::Activate  )  [pure virtual, slot]
 

Try to activate the module.

At the end of the method, if the module has been activated IsActive( ) should return TRUE and if the module has not been activated IsActive( ) should return FALSE.

Precondition:
! IsActive( )

Implemented in MClient, and MPlugin.

virtual void MModule::Deactivate  )  [pure virtual, slot]
 

Try to deactivate the module.

At the end of the method, if the module has been deactivated IsActive( ) should return FALSE and if the module has not been deactivated IsActive( ) should return TRUE.

Precondition:
IsActive( )

Implemented in MClient, and MPlugin.

virtual void MModule::Run const unsigned int  n  )  [pure virtual, slot]
 

Run the module.

Ask the module to proceed a block of audio data.

Parameters:
n Indicates the size of the block.
Precondition:
IsActive( )
Postcondition:
IsActive( )

Implemented in MClient, MPlugin, and MSupervisor.


Member Data Documentation

string MModule::_name [protected]
 

The name of the module.

bool MModule::_active [protected]
 

Is the module active ?


The documentation for this class was generated from the following files:
Generated on Mon Jan 31 12:43:31 2005 for la Marmite by Doxygen 1.4.1