Base class for an outwards control connector. More...
#include <OutControlBase.hxx>
Public Member Functions | |
OutControlBase (const std::string &name, Processing *proc=0) | |
Class constructor. | |
virtual | ~OutControlBase () |
Class destructor. | |
const std::string & | GetName () const |
Processing * | GetProcessing () const |
bool | IsConnected () |
bool | IsConnectedTo (InControlBase &in) |
virtual const std::type_info & | GetTypeId () const =0 |
virtual bool | IsLinkable (const InControlBase &in)=0 |
Returns whether the control can be connected to the provided in control. | |
void | AddLink (InControlBase &in) |
Set a connection with an in control. | |
void | RemoveLink (InControlBase &in) |
Unsets an existing link with the provided in control. | |
Peers::iterator | BeginInControlsConnected () |
Peers::iterator | EndInControlsConnected () |
Protected Types | |
typedef std::list < InControlBase * > | Peers |
Protected Member Functions | |
OutControlBase (const OutControlBase &toBeCopied) | |
Private copy constructor to avoid copies. | |
Protected Attributes | |
Peers | mLinks |
Stores the pointers to the connected incontrols. |
Base class for an outwards control connector.
OutControls can be used to send asynchronous data to connected InControls in other processings.
Definition at line 20 of file OutControlBase.hxx.
typedef std::list<InControlBase*> CLAM::OutControlBase::Peers [protected] |
Definition at line 25 of file OutControlBase.hxx.
CLAM::OutControlBase::OutControlBase | ( | const OutControlBase & | toBeCopied | ) | [inline, protected] |
Private copy constructor to avoid copies.
Definition at line 29 of file OutControlBase.hxx.
CLAM::OutControlBase::OutControlBase | ( | const std::string & | name, | |
Processing * | proc = 0 | |||
) |
Class constructor.
name | Unique name of the control within the processing. | |
processing | Host processing (0 for a free control). |
Definition at line 5 of file OutControlBase.cxx.
References CLAM::Processing::RegisterOutControl().
CLAM::OutControlBase::~OutControlBase | ( | ) | [virtual] |
Class destructor.
Destruction clears any connection left and unregisters the control from the processing. Whatever it gets destructed first (In or Out) links are properly unset.
Definition at line 12 of file OutControlBase.cxx.
References CLAM::Processing::GetOutControls(), mLinks, CLAM::OutControlRegistry::ProcessingInterface_Unregister(), and RemoveLink().
void CLAM::OutControlBase::AddLink | ( | InControlBase & | in | ) | [inline] |
Set a connection with an in control.
Reimplemented in CLAM::OutControlPublisher.
Definition at line 69 of file OutControlBase.hxx.
References CLAM_ASSERT, IsLinkable(), mLinks, and CLAM::InControlBase::OutControlInterface_AddLink().
Referenced by CLAM::OutControlPublisher::AddLink(), CLAM::Dispatcher::ConcreteConfigure(), CLAM::Network::DisconnectPorts(), and CLAM::Instrument::LinkStateOutWithInControl().
OutControlBase::Peers::iterator CLAM::OutControlBase::BeginInControlsConnected | ( | ) |
Definition at line 19 of file OutControlBase.cxx.
References mLinks.
Referenced by CLAM::Network::GetInPortsConnectedTo().
OutControlBase::Peers::iterator CLAM::OutControlBase::EndInControlsConnected | ( | ) |
Definition at line 24 of file OutControlBase.cxx.
References mLinks.
Referenced by CLAM::Network::GetInPortsConnectedTo().
const std::string& CLAM::OutControlBase::GetName | ( | ) | const [inline] |
Definition at line 44 of file OutControlBase.hxx.
Processing* CLAM::OutControlBase::GetProcessing | ( | ) | const [inline] |
Definition at line 46 of file OutControlBase.hxx.
virtual const std::type_info& CLAM::OutControlBase::GetTypeId | ( | ) | const [pure virtual] |
bool CLAM::OutControlBase::IsConnected | ( | ) | [inline] |
Definition at line 48 of file OutControlBase.hxx.
References mLinks.
bool CLAM::OutControlBase::IsConnectedTo | ( | InControlBase & | in | ) | [inline] |
Definition at line 50 of file OutControlBase.hxx.
References mLinks.
Referenced by CLAM::Network::DisconnectPorts(), CLAM::InControlBase::IsConnectedTo(), and RemoveLink().
virtual bool CLAM::OutControlBase::IsLinkable | ( | const InControlBase & | in | ) | [pure virtual] |
Returns whether the control can be connected to the provided in control.
Concrete in controls redefine this function to provide or extend the set of conditions to be linkable.
Implemented in CLAM::OutControl< ControlDataType >, CLAM::OutControl< unsigned long >, CLAM::OutControl< float >, CLAM::OutControl< bool >, and CLAM::OutControl< MIDI::Message >.
Referenced by AddLink(), and CLAM::Network::DisconnectPorts().
void CLAM::OutControlBase::RemoveLink | ( | InControlBase & | in | ) | [inline] |
Unsets an existing link with the provided in control.
Definition at line 81 of file OutControlBase.hxx.
References CLAM_ASSERT, IsConnectedTo(), mLinks, and CLAM::InControlBase::OutControlInterface_RemoveLink().
Referenced by ~OutControlBase().
Peers CLAM::OutControlBase::mLinks [protected] |
Stores the pointers to the connected incontrols.
Definition at line 27 of file OutControlBase.hxx.
Referenced by AddLink(), BeginInControlsConnected(), EndInControlsConnected(), IsConnected(), IsConnectedTo(), RemoveLink(), CLAM::OutControl< ControlDataType >::SendControl(), and ~OutControlBase().