JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::RuleBasedTopologySource Class Reference

This topology source holds and applies a set of rules for transforming one device topology into another one that may involve virtual and/or aggregate devices. More...

#include <juce_RuleBasedTopologySource.h>

Inheritance diagram for juce::RuleBasedTopologySource:
Collaboration diagram for juce::RuleBasedTopologySource:

Classes

struct  Rule
 A rule that can transform parts of a topology. More...
 

Public Member Functions

 RuleBasedTopologySource (TopologySource &)
 Creates a RuleBasedTopologySource which wraps another TopologySource passed in here. More...
 
 ~RuleBasedTopologySource ()
 Destructor. More...
 
void addListener (Listener *l)
 
void addRule (Rule *)
 Adds a rule to the list that will be applied. More...
 
virtual void cancelAllActiveTouches () noexcept
 Invoke this to force touches-off on all physical devices. More...
 
void clearRules ()
 Clears the list of active rules. More...
 
BlockTopology getCurrentTopology () const override
 Returns the currently active topology. More...
 
bool isActive () const override
 Returns true, if the TopologySource is currently trying to connect the block devices. More...
 
void removeListener (Listener *l)
 
void setActive (bool shouldBeActive) override
 Sets the TopologySource as active, occupying the midi port and trying to connect to the block devices. More...
 

Protected Attributes

juce::ListenerList< Listenerlisteners
 

Private Attributes

std::unique_ptr< Internal > internal
 

Detailed Description

This topology source holds and applies a set of rules for transforming one device topology into another one that may involve virtual and/or aggregate devices.

Given an input PhysicalTopologySource and a set of Rule objects, this class will apply the rules and present the resulting topology to clients.

{Blocks}

Constructor & Destructor Documentation

◆ RuleBasedTopologySource()

juce::RuleBasedTopologySource::RuleBasedTopologySource ( TopologySource )

Creates a RuleBasedTopologySource which wraps another TopologySource passed in here.

◆ ~RuleBasedTopologySource()

juce::RuleBasedTopologySource::~RuleBasedTopologySource ( )

Destructor.

Member Function Documentation

◆ addListener()

void juce::TopologySource::addListener ( Listener l)
inlineinherited

◆ addRule()

void juce::RuleBasedTopologySource::addRule ( Rule )

Adds a rule to the list that will be applied.

The object passed-in will be owned by this object, so don't keep any references to it. Calling this method will cause an asynchronous topology update if the new rule-set results in a change to the topology.

Referenced by juce::RuleBasedTopologySource::Rule::~Rule().

◆ cancelAllActiveTouches()

virtual void juce::TopologySource::cancelAllActiveTouches ( )
inlinevirtualnoexceptinherited

Invoke this to force touches-off on all physical devices.

Reimplemented in juce::PhysicalTopologySource.

◆ clearRules()

void juce::RuleBasedTopologySource::clearRules ( )

Clears the list of active rules.

Calling this method will cause an asynchronous topology update if the new rule-set results in a change to the topology.

Referenced by juce::RuleBasedTopologySource::Rule::~Rule().

◆ getCurrentTopology()

BlockTopology juce::RuleBasedTopologySource::getCurrentTopology ( ) const
overridevirtual

Returns the currently active topology.

Implements juce::TopologySource.

◆ isActive()

bool juce::RuleBasedTopologySource::isActive ( ) const
overridevirtual

Returns true, if the TopologySource is currently trying to connect the block devices.

Implements juce::TopologySource.

Referenced by juce::RuleBasedTopologySource::Rule::~Rule().

◆ removeListener()

void juce::TopologySource::removeListener ( Listener l)
inlineinherited

◆ setActive()

void juce::RuleBasedTopologySource::setActive ( bool  shouldBeActive)
overridevirtual

Sets the TopologySource as active, occupying the midi port and trying to connect to the block devices.

Implements juce::TopologySource.

Referenced by juce::RuleBasedTopologySource::Rule::~Rule().

Member Data Documentation

◆ internal

std::unique_ptr<Internal> juce::RuleBasedTopologySource::internal
private

◆ listeners

juce::ListenerList<Listener> juce::TopologySource::listeners
protectedinherited

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