VISR  0.11.6
Versatile Interactive Scene Renderer
visr::impl::CompositeComponentImplementation Class Reference

#include <composite_component_implementation.hpp>

Inheritance diagram for visr::impl::CompositeComponentImplementation:
visr::impl::ComponentImplementation

Public Types

using ComponentTable = std::vector< ComponentImplementation *>
 
- Public Types inherited from visr::impl::ComponentImplementation
template<class PortType >
using PortContainer = std::vector< PortType * >
 
using AudioPortContainer = PortContainer< AudioPortBaseImplementation >
 
using ParameterPortContainer = PortContainer< ParameterPortBaseImplementation >
 

Public Member Functions

 CompositeComponentImplementation (CompositeComponent &component, SignalFlowContext const &context, char const *componentName, CompositeComponentImplementation *parent)
 
virtual ~CompositeComponentImplementation () override
 
 CompositeComponentImplementation ()=delete
 
 CompositeComponentImplementation (CompositeComponentImplementation const &)=delete
 
 CompositeComponentImplementation (CompositeComponentImplementation &&)=delete
 
CompositeComponentImplementationoperator= (CompositeComponentImplementation const &)=delete
 
CompositeComponentImplementationoperator= (CompositeComponentImplementation &&)=delete
 
bool isComposite () const final
 
void registerChildComponent (char const *name, impl::ComponentImplementation *child)
 
void unregisterChildComponent (impl::ComponentImplementation *child)
 
std::size_t numberOfComponents () const
 
ComponentTable::const_iterator componentBegin () const
 
ComponentTable::const_iterator componentEnd () const
 
ComponentTable::iterator findComponentEntry (char const *componentName)
 
ComponentTable::const_iterator findComponentEntry (char const *componentName) const
 
ComponentImplementationfindComponent (char const *componentName)
 
ComponentImplementation const * findComponent (char const *componentName) const
 
AudioPortBasefindAudioPort (char const *componentName, char const *portName)
 
ParameterPortBasefindParameterPort (char const *componentName, char const *portName)
 
void registerParameterConnection (char const *sendComponent, char const *sendPort, char const *receiveComponent, char const *receivePort)
 
void registerParameterConnection (ParameterPortBase &sendPort, ParameterPortBase &receivePort)
 
void audioConnection (char const *sendComponent, char const *sendPort, ChannelList const &sendIndices, char const *receiveComponent, char const *receivePort, ChannelList const &receiveIndices)
 
void audioConnection (AudioPortBase &sendPort, ChannelList const &sendIndices, AudioPortBase &receivePort, ChannelList const &receiveIndices)
 
void audioConnection (AudioPortBase &sendPort, AudioPortBase &receivePort)
 
AudioConnectionTable const & audioConnections () const
 
AudioConnectionTable::const_iterator audioConnectionBegin () const
 
AudioConnectionTable::const_iterator audioConnectionEnd () const
 
ParameterConnectionTable::const_iterator parameterConnectionBegin () const
 
ParameterConnectionTable::const_iterator parameterConnectionEnd () const
 
- Public Member Functions inherited from visr::impl::ComponentImplementation
 ComponentImplementation (visr::Component &component, SignalFlowContext const &context, char const *componentName, CompositeComponentImplementation *parent)
 
virtual ~ComponentImplementation ()
 
 ComponentImplementation ()=delete
 
 ComponentImplementation (ComponentImplementation const &)=delete
 
 ComponentImplementation (ComponentImplementation &&)=delete
 
ComponentImplementationoperator= (ComponentImplementation const &)=delete
 
ComponentImplementationoperator= (ComponentImplementation &&)=delete
 
std::string const & name () const
 
std::string fullName () const
 
SamplingFrequencyType samplingFrequency () const
 
std::size_t period () const
 
void registerParameterPort (ParameterPortBaseImplementation *port)
 
bool unregisterParameterPort (ParameterPortBaseImplementation *port)
 
ParameterPortContainer::iterator findParameterPortEntry (char const *portName)
 
ParameterPortContainer::const_iterator findParameterPortEntry (char const *portName) const
 
ParameterPortBase const * findParameterPort (char const *portName) const
 
ParameterPortBasefindParameterPort (char const *portName)
 
AudioPortBasefindAudioPort (char const *name)
 
AudioPortBase const * findAudioPort (char const *name) const
 
void status (StatusMessage::Kind statusId, char const *message)
 
bool isTopLevel () const
 
CompositeComponentImplementationparent ()
 
CompositeComponentImplementation const * parent () const
 
SignalFlowContext const & context () const
 
template<>
ComponentImplementation::PortContainer< AudioPortBaseImplementation > const & ports () const
 
template<>
ComponentImplementation::PortContainer< ParameterPortBaseImplementation > const & ports () const
 
template<>
ComponentImplementation::PortContainer< AudioPortBaseImplementation > & ports ()
 
template<>
ComponentImplementation::PortContainer< ParameterPortBaseImplementation > & ports ()
 
template<class PortType >
TypedPortContainer< PortType >::const_iterator findPortEntry (char const *portName) const
 
template<class PortType >
TypedPortContainer< PortType >::iterator findPortEntry (char const *portName)
 
AudioPortContainer const & audioPorts () const
 
AudioPortContaineraudioPorts ()
 
AudioPortContainer::const_iterator audioPortBegin () const
 
AudioPortContainer::const_iterator audioPortEnd () const
 
visr::Componentcomponent ()
 
visr::Component const & component () const
 
ParameterPortContainer const & parameterPorts () const
 
ParameterPortContainerparameterPorts ()
 
ParameterPortContainer::const_iterator parameterPortBegin () const
 
ParameterPortContainer::const_iterator parameterPortEnd () const
 
ParameterPortContainer::iterator parameterPortBegin ()
 
ParameterPortContainer::iterator parameterPortEnd ()
 
template<class PortType >
PortContainer< PortType > const & ports () const
 
template<class PortType >
PortContainer< PortType > & ports ()
 
template<class PortType >
PortContainer< PortType >::iterator portBegin ()
 
template<class PortType >
PortContainer< PortType >::iterator portEnd ()
 
template<class PortType >
PortContainer< PortType >::const_iterator portBegin () const
 
template<class PortType >
PortContainer< PortType >::const_iterator portEnd () const
 
template<class PortType >
PortContainer< PortType >::const_iterator findPortEntry (char const *portName) const
 
template<class PortType >
PortContainer< PortType >::iterator findPortEntry (char const *portName)
 

Additional Inherited Members

- Static Public Attributes inherited from visr::impl::ComponentImplementation
static const std::string cNameSeparator = ":"
 

Member Typedef Documentation

◆ ComponentTable

Constructor & Destructor Documentation

◆ CompositeComponentImplementation() [1/4]

visr::impl::CompositeComponentImplementation::CompositeComponentImplementation ( CompositeComponent component,
SignalFlowContext const &  context,
char const *  componentName,
CompositeComponentImplementation parent 
)
explicit

◆ ~CompositeComponentImplementation()

visr::impl::CompositeComponentImplementation::~CompositeComponentImplementation ( )
overridevirtual

◆ CompositeComponentImplementation() [2/4]

visr::impl::CompositeComponentImplementation::CompositeComponentImplementation ( )
delete

◆ CompositeComponentImplementation() [3/4]

visr::impl::CompositeComponentImplementation::CompositeComponentImplementation ( CompositeComponentImplementation const &  )
delete

◆ CompositeComponentImplementation() [4/4]

visr::impl::CompositeComponentImplementation::CompositeComponentImplementation ( CompositeComponentImplementation &&  )
delete

Member Function Documentation

◆ audioConnection() [1/3]

void visr::impl::CompositeComponentImplementation::audioConnection ( char const *  sendComponent,
char const *  sendPort,
ChannelList const &  sendIndices,
char const *  receiveComponent,
char const *  receivePort,
ChannelList const &  receiveIndices 
)

◆ audioConnection() [2/3]

void visr::impl::CompositeComponentImplementation::audioConnection ( AudioPortBase sendPort,
ChannelList const &  sendIndices,
AudioPortBase receivePort,
ChannelList const &  receiveIndices 
)

◆ audioConnection() [3/3]

void visr::impl::CompositeComponentImplementation::audioConnection ( AudioPortBase sendPort,
AudioPortBase receivePort 
)

◆ audioConnectionBegin()

AudioConnectionTable::const_iterator visr::impl::CompositeComponentImplementation::audioConnectionBegin ( ) const

◆ audioConnectionEnd()

AudioConnectionTable::const_iterator visr::impl::CompositeComponentImplementation::audioConnectionEnd ( ) const

◆ audioConnections()

AudioConnectionTable const & visr::impl::CompositeComponentImplementation::audioConnections ( ) const

◆ componentBegin()

CompositeComponentImplementation::ComponentTable::const_iterator visr::impl::CompositeComponentImplementation::componentBegin ( ) const

◆ componentEnd()

CompositeComponentImplementation::ComponentTable::const_iterator visr::impl::CompositeComponentImplementation::componentEnd ( ) const

◆ findAudioPort()

AudioPortBase * visr::impl::CompositeComponentImplementation::findAudioPort ( char const *  componentName,
char const *  portName 
)

Find an audio port within the composite component. This can be either an external port of the composite itself (if componentName is either empty or equals "this") or a port of the contained component with name componentName

Parameters
componentName
portNameThe port name (case-sensitive)

◆ findComponent() [1/2]

ComponentImplementation * visr::impl::CompositeComponentImplementation::findComponent ( char const *  componentName)

◆ findComponent() [2/2]

ComponentImplementation const * visr::impl::CompositeComponentImplementation::findComponent ( char const *  componentName) const

◆ findComponentEntry() [1/2]

CompositeComponentImplementation::ComponentTable::iterator visr::impl::CompositeComponentImplementation::findComponentEntry ( char const *  componentName)

◆ findComponentEntry() [2/2]

CompositeComponentImplementation::ComponentTable::const_iterator visr::impl::CompositeComponentImplementation::findComponentEntry ( char const *  componentName) const

◆ findParameterPort()

ParameterPortBase * visr::impl::CompositeComponentImplementation::findParameterPort ( char const *  componentName,
char const *  portName 
)

Find a parameter port within the composite component. This can be either an external port of the composite itself (if componentName is either empty or equals "this") or a port of the contained component with name componentName

Parameters
componentName
portNameThe port name (case-sensitive)

◆ isComposite()

bool visr::impl::CompositeComponentImplementation::isComposite ( ) const
finalvirtual

Query whether the corresponding component is atomic or composite.

Todo:
Check whether the current approach of storing this information in the class hierarchy of the externally visible components is the right way to go, or whether this information should be held local in the internal object.

Reimplemented from visr::impl::ComponentImplementation.

◆ numberOfComponents()

std::size_t visr::impl::CompositeComponentImplementation::numberOfComponents ( ) const
inline

Return the number of contained components (not including the composite itself). This method considers only atomic and composite components at the next level, i.e., not recursively.

◆ operator=() [1/2]

CompositeComponentImplementation& visr::impl::CompositeComponentImplementation::operator= ( CompositeComponentImplementation const &  )
delete

◆ operator=() [2/2]

CompositeComponentImplementation& visr::impl::CompositeComponentImplementation::operator= ( CompositeComponentImplementation &&  )
delete

◆ parameterConnectionBegin()

ParameterConnectionTable::const_iterator visr::impl::CompositeComponentImplementation::parameterConnectionBegin ( ) const

◆ parameterConnectionEnd()

ParameterConnectionTable::const_iterator visr::impl::CompositeComponentImplementation::parameterConnectionEnd ( ) const

◆ registerChildComponent()

void visr::impl::CompositeComponentImplementation::registerChildComponent ( char const *  name,
impl::ComponentImplementation child 
)

Register a child component

Parameters
nameThe local (nonhierarchical) name of the component.
childThe component to be registered. The pointer does not carry ownership responsibilities.
Note
The name has to be provided separately, because typically the object pointed to by child is not fully constructed at the time of the call.

◆ registerParameterConnection() [1/2]

void visr::impl::CompositeComponentImplementation::registerParameterConnection ( char const *  sendComponent,
char const *  sendPort,
char const *  receiveComponent,
char const *  receivePort 
)

◆ registerParameterConnection() [2/2]

void visr::impl::CompositeComponentImplementation::registerParameterConnection ( ParameterPortBase sendPort,
ParameterPortBase receivePort 
)

◆ unregisterChildComponent()

void visr::impl::CompositeComponentImplementation::unregisterChildComponent ( impl::ComponentImplementation child)

The documentation for this class was generated from the following files: