EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
ITask.hpp
Go to the documentation of this file.
1
7
8#ifndef ECHOMAP_ITASK_HPP
9#define ECHOMAP_ITASK_HPP
10
11#include <stop_token>
12
15
16namespace echomap
17{
18
22class ITask : public Object<ITask>
23{
24public:
25 explicit ITask(
26 const std::string_view task_name
27 ) :
28 Object(task_name)
29 {
30 }
31
35 // ReSharper disable once CppHidingFunction
36 virtual ~ITask() noexcept = default;
37
45 const std::stop_token& stop_token
46 );
47
53 WorkerResult operator()();
54
55private:
62};
63
64template <> constexpr std::string_view Object<ITask>::class_name = "Task";
65
66} // namespace echomap
67
68#endif // ECHOMAP_ITASK_HPP
Object specification.
WorkerResult specification.
virtual ~ITask() noexcept=default
Destruct the ITask base.
virtual WorkerResult execute_work()=0
Execute the work and produce a WorkerResult.
WorkerResult execute(const std::stop_token &stop_token)
Execute the work, subject to the given token, and produce a WorkerResult.
Definition ITask.cpp:18
static constexpr std::string_view class_name
Definition Object.hpp:235
The main EchoMap outermost namespace for all non-exported symbols.
std::variant< ErrorResult, DFTResult, DownsampleResult, LoadProjectResult, LoadSignalFileResult > WorkerResult
Issued once an ITask has completed its Worker cycle.
STL namespace.