Base class for an inwards control connector. More...
#include <InControlBase.hxx>
Public Member Functions | |
bool | HasBeenRead () const |
InControlBase (const std::string &name, Processing *processing=0) | |
Class constructor. | |
virtual | ~InControlBase () |
Class destructor. | |
virtual const std::type_info & | GetTypeId () const =0 |
Concrete InControls must overload this method by returning the typeid of the kind of data they communicate. | |
const std::string & | GetName () const |
Processing * | GetProcessing () const |
bool | IsConnected () const |
bool | IsConnectedTo (OutControlBase &out) |
void | OutControlInterface_AddLink (OutControlBase &outControl) |
Implementation detail just to be used just from OutControlBase. | |
void | OutControlInterface_RemoveLink (OutControlBase &outControl) |
Implementation detail just to be used just from OutControlBase. | |
virtual const std::string | GetLastValueAsString () |
Float specific services | |
| |
bool | IsBounded () const |
TControlData | UpperBound () const |
TControlData | LowerBound () const |
TControlData | DefaultValue () const |
Returns the bounds mean or the value set with SetDefaultValue() if its the case. | |
void | SetDefaultValue (TControlData val) |
void | SetBounds (TControlData lower, TControlData upper) |
Protected Types | |
typedef std::list < OutControlBase * > | Peers |
Protected Attributes | |
Processing * | mProcessing |
Peers | mLinks |
Stores the pointers to the connected outcontrols. | |
TControlData | mDefaultValue |
TControlData | mUpperBound |
TControlData | mLowerBound |
bool | mBounded |
bool | mHasDefaultValue |
bool | _hasBeenRead |
Base class for an inwards control connector.
InControls can be used to receive asynchronous data from connected OutControls in other processings.
Definition at line 22 of file InControlBase.hxx.
typedef std::list<OutControlBase*> CLAM::InControlBase::Peers [protected] |
Definition at line 27 of file InControlBase.hxx.
CLAM::InControlBase::InControlBase | ( | const std::string & | name, | |
Processing * | processing = 0 | |||
) |
Class constructor.
name | Unique name of the control within the processing. | |
processing | Host processing (0 for a free control). |
Definition at line 6 of file InControlBase.cxx.
References CLAM::Processing::RegisterInControl().
CLAM::InControlBase::~InControlBase | ( | ) | [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 18 of file InControlBase.cxx.
References CLAM::Processing::GetInControls(), mLinks, mProcessing, and CLAM::InControlRegistry::ProcessingInterface_Unregister().
float CLAM::InControlBase::DefaultValue | ( | ) | const |
Returns the bounds mean or the value set with SetDefaultValue() if its the case.
Definition at line 53 of file InControlBase.cxx.
References mDefaultValue, mHasDefaultValue, mLowerBound, and mUpperBound.
virtual const std::string CLAM::InControlBase::GetLastValueAsString | ( | ) | [inline, virtual] |
Reimplemented in CLAM::InControl< ControlDataType >, CLAM::InControl< float >, CLAM::InControl< MIDI::Message >, and CLAM::InControl< ControlDataType >.
Definition at line 95 of file InControlBase.hxx.
const std::string& CLAM::InControlBase::GetName | ( | ) | const [inline] |
Definition at line 64 of file InControlBase.hxx.
Processing* CLAM::InControlBase::GetProcessing | ( | ) | const [inline] |
Definition at line 66 of file InControlBase.hxx.
References mProcessing.
virtual const std::type_info& CLAM::InControlBase::GetTypeId | ( | ) | const [pure virtual] |
Concrete InControls must overload this method by returning the typeid of the kind of data they communicate.
This method is used internanlly in order to assure type compatibility between an input an an output control. There are some other uses like the NetworkEditor assigning different colors to connectors depending on this type.
Implemented in CLAM::InControl< ControlDataType >, CLAM::InControl< float >, and CLAM::InControl< MIDI::Message >.
Referenced by CLAM::OutControl< ControlDataType >::IsLinkable().
bool CLAM::InControlBase::HasBeenRead | ( | ) | const [inline] |
Definition at line 40 of file InControlBase.hxx.
References _hasBeenRead.
bool CLAM::InControlBase::IsBounded | ( | ) | const |
Definition at line 30 of file InControlBase.cxx.
References mBounded.
bool CLAM::InControlBase::IsConnected | ( | ) | const [inline] |
Definition at line 68 of file InControlBase.hxx.
References mLinks.
bool CLAM::InControlBase::IsConnectedTo | ( | OutControlBase & | out | ) |
Definition at line 25 of file InControlBase.cxx.
References CLAM::OutControlBase::IsConnectedTo().
float CLAM::InControlBase::LowerBound | ( | ) | const |
Definition at line 38 of file InControlBase.cxx.
References mLowerBound.
void CLAM::InControlBase::OutControlInterface_AddLink | ( | OutControlBase & | outControl | ) | [inline] |
Implementation detail just to be used just from OutControlBase.
Definition at line 86 of file InControlBase.hxx.
References mLinks.
Referenced by CLAM::OutControlBase::AddLink().
void CLAM::InControlBase::OutControlInterface_RemoveLink | ( | OutControlBase & | outControl | ) | [inline] |
Implementation detail just to be used just from OutControlBase.
Definition at line 91 of file InControlBase.hxx.
References mLinks.
Referenced by CLAM::OutControlBase::RemoveLink().
void CLAM::InControlBase::SetBounds | ( | TControlData | lower, | |
TControlData | upper | |||
) |
Definition at line 42 of file InControlBase.cxx.
References mBounded, mLowerBound, and mUpperBound.
Referenced by CLAM::SpectralDelay::ConcreteConfigure(), CLAM::SMSTranspose::ConcreteConfigure(), CLAM::SMSSinusoidalGain::ConcreteConfigure(), CLAM::SMSResidualGain::ConcreteConfigure(), CLAM::SMSPitchShift::ConcreteConfigure(), CLAM::SMSGenderChange::ConcreteConfigure(), CLAM::Robotization::ConcreteConfigure(), CLAM::OscillatingSpectralNotch::ConcreteConfigure(), CLAM::AudioBufferAmplifier::ConcreteConfigure(), CLAM::AudioAmplifier::ConcreteConfigure(), CLAM::ThreeBandFilter::ConcreteConfigure(), and CLAM::ThreeBandCompressor::ThreeBandCompressor().
void CLAM::InControlBase::SetDefaultValue | ( | TControlData | val | ) |
Definition at line 48 of file InControlBase.cxx.
References mDefaultValue, and mHasDefaultValue.
Referenced by CLAM::SMSSinusoidalGain::ConcreteConfigure(), CLAM::SMSResidualGain::ConcreteConfigure(), CLAM::SMSPitchShift::ConcreteConfigure(), CLAM::Robotization::ConcreteConfigure(), CLAM::AudioBufferAmplifier::ConcreteConfigure(), and CLAM::AudioAmplifier::ConcreteConfigure().
float CLAM::InControlBase::UpperBound | ( | ) | const |
Definition at line 34 of file InControlBase.cxx.
References mUpperBound.
bool CLAM::InControlBase::_hasBeenRead [mutable, protected] |
Definition at line 35 of file InControlBase.hxx.
Referenced by CLAM::InControl< MIDI::Message >::DoControl(), CLAM::InControl< MIDI::Message >::GetLastValue(), and HasBeenRead().
bool CLAM::InControlBase::mBounded [protected] |
Definition at line 33 of file InControlBase.hxx.
Referenced by IsBounded(), and SetBounds().
TControlData CLAM::InControlBase::mDefaultValue [protected] |
Definition at line 30 of file InControlBase.hxx.
Referenced by DefaultValue(), and SetDefaultValue().
bool CLAM::InControlBase::mHasDefaultValue [protected] |
Definition at line 34 of file InControlBase.hxx.
Referenced by DefaultValue(), and SetDefaultValue().
Peers CLAM::InControlBase::mLinks [protected] |
Stores the pointers to the connected outcontrols.
Definition at line 29 of file InControlBase.hxx.
Referenced by IsConnected(), OutControlInterface_AddLink(), OutControlInterface_RemoveLink(), and ~InControlBase().
TControlData CLAM::InControlBase::mLowerBound [protected] |
Definition at line 32 of file InControlBase.hxx.
Referenced by DefaultValue(), LowerBound(), and SetBounds().
Processing* CLAM::InControlBase::mProcessing [protected] |
Definition at line 26 of file InControlBase.hxx.
Referenced by GetProcessing(), and ~InControlBase().
TControlData CLAM::InControlBase::mUpperBound [protected] |
Definition at line 31 of file InControlBase.hxx.
Referenced by DefaultValue(), SetBounds(), and UpperBound().