The BLOCKS SDK
TopologySource Class Referenceabstract

Description

Base class for an entity that provides access to a blocks topology.

Inheritance diagram for TopologySource:

Public Member Functions

virtual ~TopologySource ()=default
 Destructor. More...
 
virtual BlockTopology getCurrentTopology () const =0
 Returns the current topology that this object manages. More...
 
virtual void setActive (bool shouldBeActive)=0
 Sets the TopologySource as active, occupying the midi port and trying to connect to the block devices. More...
 
virtual bool isActive () const =0
 Returns true, if the TopologySource is currently trying to connect the block devices. More...
 
virtual bool isLockedFromOutside () const =0
 Returns true if the topology is locked externally. More...
 
void addListener (Listener *l)
 
void removeListener (Listener *l)
 
virtual void cancelAllActiveTouches () noexcept
 Invoke this to force touches-off on all physical devices. More...
 
Block::Array getBlocks () const
 Gets blocks from the current topology. More...
 
Block::Ptr getBlockWithUID (Block::UID uid) const
 Gets a block with given uid from the current topology. More...
 

Protected Attributes

juce::ListenerList< Listenerlisteners
 

Classes

struct  Listener
 Used to receive callbacks for topology changes. More...
 

Constructor & Destructor Documentation

◆ ~TopologySource()

virtual TopologySource::~TopologySource ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getCurrentTopology()

virtual BlockTopology TopologySource::getCurrentTopology ( ) const
pure virtual

Returns the current topology that this object manages.

Implemented in RuleBasedTopologySource, and PhysicalTopologySource.

Referenced by getBlocks(), and getBlockWithUID().

◆ setActive()

virtual void TopologySource::setActive ( bool  shouldBeActive)
pure virtual

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

Implemented in RuleBasedTopologySource, and PhysicalTopologySource.

◆ isActive()

virtual bool TopologySource::isActive ( ) const
pure virtual

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

Implemented in RuleBasedTopologySource, and PhysicalTopologySource.

◆ isLockedFromOutside()

virtual bool TopologySource::isLockedFromOutside ( ) const
pure virtual

Returns true if the topology is locked externally.

Implemented in RuleBasedTopologySource, and PhysicalTopologySource.

◆ addListener()

void TopologySource::addListener ( Listener l)

References listeners.

◆ removeListener()

void TopologySource::removeListener ( Listener l)

References listeners.

◆ cancelAllActiveTouches()

virtual void TopologySource::cancelAllActiveTouches ( )
virtualnoexcept

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

Reimplemented in PhysicalTopologySource.

◆ getBlocks()

Block::Array TopologySource::getBlocks ( ) const

Gets blocks from the current topology.

References BlockTopology::blocks, and getCurrentTopology().

◆ getBlockWithUID()

Block::Ptr TopologySource::getBlockWithUID ( Block::UID  uid) const

Gets a block with given uid from the current topology.

References BlockTopology::getBlockWithUID(), and getCurrentTopology().

Member Data Documentation

◆ listeners

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

Referenced by addListener(), and removeListener().


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