|
PACS System 0.1.0
PACS DICOM system library
|
IJob implementation that wraps a callable. More...
#include <executor_adapter.h>


Public Types | |
| using | job_function = std::function<kcenon::common::VoidResult()> |
Public Member Functions | |
| lambda_job (job_function func, std::string name="lambda_job", int priority=0) | |
| Construct a lambda job. | |
| template<typename F > requires std::is_void_v<std::invoke_result_t<F>> | |
| lambda_job (F &&func, std::string name="lambda_job", int priority=0) | |
| Construct from void-returning callable. | |
| kcenon::common::VoidResult | execute () override |
| std::string | get_name () const override |
| int | get_priority () const override |
Private Attributes | |
| job_function | func_ |
| std::string | name_ |
| int | priority_ |
IJob implementation that wraps a callable.
This class adapts a std::function to the IJob interface, allowing lambda expressions and other callables to be used with IExecutor.
Definition at line 65 of file executor_adapter.h.
| using kcenon::pacs::integration::lambda_job::job_function = std::function<kcenon::common::VoidResult()> |
Definition at line 67 of file executor_adapter.h.
|
inlineexplicit |
Construct a lambda job.
| func | The function to execute |
| name | Job name for logging (default: "lambda_job") |
| priority | Job priority (default: 0) |
Definition at line 76 of file executor_adapter.h.
|
inlineexplicit |
Construct from void-returning callable.
| func | Void-returning function |
| name | Job name for logging |
| priority | Job priority |
Definition at line 93 of file executor_adapter.h.
|
inlineoverride |
Definition at line 101 of file executor_adapter.h.
|
inlinenodiscardoverride |
Definition at line 109 of file executor_adapter.h.
|
inlinenodiscardoverride |
Definition at line 110 of file executor_adapter.h.
|
private |
Definition at line 113 of file executor_adapter.h.
|
private |
Definition at line 114 of file executor_adapter.h.
|
private |
Definition at line 115 of file executor_adapter.h.