CLAM::InControlBase Class Reference

Base class for an inwards control connector. More...

#include <InControlBase.hxx>

List of all members.

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
ProcessingGetProcessing () 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

Todo:
move them to the concrete float class
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

ProcessingmProcessing
Peers mLinks
 Stores the pointers to the connected outcontrols.
TControlData mDefaultValue
TControlData mUpperBound
TControlData mLowerBound
bool mBounded
bool mHasDefaultValue
bool _hasBeenRead

Detailed Description

Base class for an inwards control connector.

InControls can be used to receive asynchronous data from connected OutControls in other processings.

See also:
OutControlBase AddingControlsToProcessings Processing
Todo:
Remove the float services

Definition at line 22 of file InControlBase.hxx.


Member Typedef Documentation

typedef std::list<OutControlBase*> CLAM::InControlBase::Peers [protected]

Definition at line 27 of file InControlBase.hxx.


Constructor & Destructor Documentation

CLAM::InControlBase::InControlBase ( const std::string &  name,
Processing processing = 0 
)

Class constructor.

Parameters:
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().


Member Function Documentation

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]
const std::string& CLAM::InControlBase::GetName (  )  const [inline]
Returns:
The unique name that the control takes within the processing.

Definition at line 64 of file InControlBase.hxx.

Processing* CLAM::InControlBase::GetProcessing (  )  const [inline]
Returns:
The hosting processing

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.

Todo:
Add a link to the

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]
Returns:
True if there is any linked out control

Definition at line 68 of file InControlBase.hxx.

References mLinks.

bool CLAM::InControlBase::IsConnectedTo ( OutControlBase out  ) 
Returns:
True if the control is linked to the parameter, an out control.

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 
)
void CLAM::InControlBase::SetDefaultValue ( TControlData  val  ) 
float CLAM::InControlBase::UpperBound (  )  const

Definition at line 34 of file InControlBase.cxx.

References mUpperBound.


Member Data Documentation

bool CLAM::InControlBase::_hasBeenRead [mutable, protected]

Definition at line 33 of file InControlBase.hxx.

Referenced by IsBounded(), and SetBounds().

Definition at line 30 of file InControlBase.hxx.

Referenced by DefaultValue(), and SetDefaultValue().

Definition at line 34 of file InControlBase.hxx.

Referenced by DefaultValue(), and SetDefaultValue().

Stores the pointers to the connected outcontrols.

Definition at line 29 of file InControlBase.hxx.

Referenced by IsConnected(), OutControlInterface_AddLink(), OutControlInterface_RemoveLink(), and ~InControlBase().

Definition at line 32 of file InControlBase.hxx.

Referenced by DefaultValue(), LowerBound(), and SetBounds().

Definition at line 26 of file InControlBase.hxx.

Referenced by GetProcessing(), and ~InControlBase().

Definition at line 31 of file InControlBase.hxx.

Referenced by DefaultValue(), SetBounds(), and UpperBound().


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