DSPatch v.11.4.1
Loading...
Searching...
No Matches
DSPatch::SignalBus Class Referencefinal

Signal container. More...

#include <SignalBus.h>

Public Member Functions

 SignalBus (const SignalBus &)=delete
 
SignalBusoperator= (const SignalBus &)=delete
 
 SignalBus (SignalBus &&)
 
void SetSignalCount (int signalCount)
 
int GetSignalCount () const
 
fast_any::any * GetSignal (int signalIndex)
 
bool HasValue (int signalIndex) const
 
template<typename ValueType >
ValueType * GetValue (int signalIndex) const
 
template<typename ValueType >
void SetValue (int signalIndex, const ValueType &newValue)
 
template<typename ValueType >
void MoveValue (int signalIndex, ValueType &&newValue)
 
void SetSignal (int toSignalIndex, const fast_any::any &fromSignal)
 
void MoveSignal (int toSignalIndex, fast_any::any &fromSignal)
 
void ClearValue (int signalIndex)
 
void ClearAllValues ()
 
fast_any::type_info GetType (int signalIndex) const
 

Detailed Description

Signal container.

Components process and transfer data between each other in the form of "signals" via interconnected wires. SignalBuses are signal containers. Via the Process_() method, a Component receives signals into its "inputs" SignalBus and provides signals to its "outputs" SignalBus. The SignalBus class provides public getters and setters for manipulating its internal signal values, abstracting the need to retrieve and interface with them directly.

Signals can be dynamically typed at runtime, this means a signal has the ability to change its data type at any point during program execution. This is designed such that a SignalBus can hold any number of different typed variables, as well as to allow for a variable to dynamically change its type when needed - this can be useful for inputs that accept a number of different data types (E.g. Varying sample size in an audio buffer: array of byte / int / float).

Definition at line 52 of file SignalBus.h.

Constructor & Destructor Documentation

◆ SignalBus()

DSPatch::SignalBus::SignalBus ( SignalBus && rhs)
inline

Definition at line 92 of file SignalBus.h.

Member Function Documentation

◆ ClearAllValues()

void DSPatch::SignalBus::ClearAllValues ( )
inline

Definition at line 174 of file SignalBus.h.

◆ ClearValue()

void DSPatch::SignalBus::ClearValue ( int signalIndex)
inline

Definition at line 169 of file SignalBus.h.

◆ GetSignal()

fast_any::any * DSPatch::SignalBus::GetSignal ( int signalIndex)
inline

Definition at line 109 of file SignalBus.h.

◆ GetSignalCount()

int DSPatch::SignalBus::GetSignalCount ( ) const
inline

Definition at line 104 of file SignalBus.h.

◆ GetType()

fast_any::type_info DSPatch::SignalBus::GetType ( int signalIndex) const
inline

Definition at line 182 of file SignalBus.h.

◆ GetValue()

template<typename ValueType >
ValueType * DSPatch::SignalBus::GetValue ( int signalIndex) const
inline

Definition at line 128 of file SignalBus.h.

◆ HasValue()

bool DSPatch::SignalBus::HasValue ( int signalIndex) const
inline

Definition at line 122 of file SignalBus.h.

◆ MoveSignal()

void DSPatch::SignalBus::MoveSignal ( int toSignalIndex,
fast_any::any & fromSignal )
inline

Definition at line 154 of file SignalBus.h.

◆ MoveValue()

template<typename ValueType >
void DSPatch::SignalBus::MoveValue ( int signalIndex,
ValueType && newValue )
inline

Definition at line 144 of file SignalBus.h.

◆ SetSignal()

void DSPatch::SignalBus::SetSignal ( int toSignalIndex,
const fast_any::any & fromSignal )
inline

Definition at line 149 of file SignalBus.h.

◆ SetSignalCount()

void DSPatch::SignalBus::SetSignalCount ( int signalCount)
inline

Definition at line 99 of file SignalBus.h.

◆ SetValue()

template<typename ValueType >
void DSPatch::SignalBus::SetValue ( int signalIndex,
const ValueType & newValue )
inline

Definition at line 138 of file SignalBus.h.


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