EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
echomap::WorkerResultDespatcher Class Reference

Manages channels for WorkerResult message routing. More...

#include <WorkerResultDespatcher.hpp>

Public Member Functions

void publish (WorkerResult &&result)
 Publish new WorkerResult message on the suitable channel.

Public Attributes

ResultChannel< DFTResultdft_finished_channel
 Channel to indicate completion of DFTTask.
ResultChannel< DownsampleResultdownsample_finished_channel
 Channel to indicate completion of DownsampleTask.
ResultChannel< LoadProjectResultload_project_finished_channel
 Channel to indicate completion of LoadProjectTask.
ResultChannel< LoadSignalFileResultload_signal_file_channel
 Channel to indicate completion of LoadSignalFileTask.
ResultChannel< const ErrorResulterror_channel
 Channel to indicate emission of ErrorResult.

Private Member Functions

void publish_payload (DFTResult &&payload)
void publish_payload (DownsampleResult &&payload)
void publish_payload (LoadProjectResult &&payload)
void publish_payload (LoadSignalFileResult &&payload)
void publish_payload (const ErrorResult &payload)

Detailed Description

Manages channels for WorkerResult message routing.

A receiver of WorkerResult objects publishes messages through the WorkerResultDespatcher, which routes it to the correct ResultChannel. The ResultChannel forwards the WorkerResult to all subscribers and transfers ownership of the object to the nominated consumer.

Definition at line 26 of file WorkerResultDespatcher.hpp.

Member Function Documentation

◆ publish()

void echomap::WorkerResultDespatcher::publish ( WorkerResult && result)

Publish new WorkerResult message on the suitable channel.

Parameters
resultThe message to publish.

Definition at line 20 of file WorkerResultDespatcher.cpp.

23{
25 [this]<typename T0>(T0 payload) {
26 publish_payload(std::move(payload));
27 },
28 std::move(result)
29 );
30}
T visit(T... args)

◆ publish_payload() [1/5]

void echomap::WorkerResultDespatcher::publish_payload ( const ErrorResult & payload)
private

Definition at line 60 of file WorkerResultDespatcher.cpp.

63{
64 error_channel.publish(payload);
65}
ResultChannel< const ErrorResult > error_channel
Channel to indicate emission of ErrorResult.

◆ publish_payload() [2/5]

void echomap::WorkerResultDespatcher::publish_payload ( DFTResult && payload)
private

Definition at line 32 of file WorkerResultDespatcher.cpp.

35{
36 dft_finished_channel.publish(std::move(payload));
37}
ResultChannel< DFTResult > dft_finished_channel
Channel to indicate completion of DFTTask.

◆ publish_payload() [3/5]

void echomap::WorkerResultDespatcher::publish_payload ( DownsampleResult && payload)
private

Definition at line 39 of file WorkerResultDespatcher.cpp.

42{
43 downsample_finished_channel.publish(std::move(payload));
44}
ResultChannel< DownsampleResult > downsample_finished_channel
Channel to indicate completion of DownsampleTask.

◆ publish_payload() [4/5]

void echomap::WorkerResultDespatcher::publish_payload ( LoadProjectResult && payload)
private

Definition at line 46 of file WorkerResultDespatcher.cpp.

49{
50 load_project_finished_channel.publish(std::move(payload));
51}
ResultChannel< LoadProjectResult > load_project_finished_channel
Channel to indicate completion of LoadProjectTask.

◆ publish_payload() [5/5]

void echomap::WorkerResultDespatcher::publish_payload ( LoadSignalFileResult && payload)
private

Definition at line 53 of file WorkerResultDespatcher.cpp.

56{
57 load_signal_file_channel.publish(std::move(payload));
58}
ResultChannel< LoadSignalFileResult > load_signal_file_channel
Channel to indicate completion of LoadSignalFileTask.

Member Data Documentation

◆ dft_finished_channel

ResultChannel<DFTResult> echomap::WorkerResultDespatcher::dft_finished_channel

Channel to indicate completion of DFTTask.

Definition at line 39 of file WorkerResultDespatcher.hpp.

◆ downsample_finished_channel

ResultChannel<DownsampleResult> echomap::WorkerResultDespatcher::downsample_finished_channel

Channel to indicate completion of DownsampleTask.

Definition at line 44 of file WorkerResultDespatcher.hpp.

◆ error_channel

ResultChannel<const ErrorResult> echomap::WorkerResultDespatcher::error_channel

Channel to indicate emission of ErrorResult.

Definition at line 59 of file WorkerResultDespatcher.hpp.

◆ load_project_finished_channel

ResultChannel<LoadProjectResult> echomap::WorkerResultDespatcher::load_project_finished_channel

Channel to indicate completion of LoadProjectTask.

Definition at line 49 of file WorkerResultDespatcher.hpp.

◆ load_signal_file_channel

ResultChannel<LoadSignalFileResult> echomap::WorkerResultDespatcher::load_signal_file_channel

Channel to indicate completion of LoadSignalFileTask.

Definition at line 54 of file WorkerResultDespatcher.hpp.


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