DSPatch v.10.2.3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DSPatch::SignalBus Class Referencefinal

Signal container. More...

#include <SignalBus.h>

Public Member Functions

 NONCOPYABLE (SignalBus)
 
 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 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 54 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 202 of file SignalBus.h.

◆ GetSignal()

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

Definition at line 107 of file SignalBus.h.

◆ GetSignalCount()

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

Definition at line 102 of file SignalBus.h.

◆ GetType()

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

Definition at line 210 of file SignalBus.h.

◆ GetValue()

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

Definition at line 142 of file SignalBus.h.

◆ HasValue()

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

Definition at line 129 of file SignalBus.h.

◆ MoveSignal()

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

Definition at line 184 of file SignalBus.h.

◆ MoveValue()

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

Definition at line 168 of file SignalBus.h.

◆ SetSignal()

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

Definition at line 176 of file SignalBus.h.

◆ SetSignalCount()

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

Definition at line 97 of file SignalBus.h.

◆ SetValue()

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

Definition at line 159 of file SignalBus.h.


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