11#ifndef FRAMEWORK_ALGORITHMSPEC_H
12#define FRAMEWORK_ALGORITHMSPEC_H
87template <StringLiteral lit,
typename T>
90 static constexpr auto size =
sizeof(lit.value);
97 operator T
const&()
const
99 return ctx.
inputs().template get<T>(lit.value);
103template <
typename T,
typename S = std::
void_t<>>
127 static_assert(always_static_assert_v<S>,
"Should be ConfigParamRegistry const&");
164template <StringLiteral L,
typename T>
172template <StringLiteral L,
typename T>
176 static_assert(always_static_assert_v<Input<L, T>>,
"Should be Input<L, T> const&");
180template <
typename... CONTEXTELEMENT>
188template <
typename... CONTEXTELEMENT>
196template <
typename R,
typename... ARGS>
199 std::function<
R(ARGS...)>
f = callback;
228template <
typename LAMBDA>
235template <
typename LAMBDA>
ServiceRegistryRef services()
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
Defining PrimaryVertex explicitly as messageable.
AlgorithmSpec::InitCallback adaptStatefulF(std::function< AlgorithmSpec::ProcessCallback(CONTEXTELEMENT &...)> callback)
AlgorithmSpec::ProcessCallback adaptStatelessP(R(*callback)(ARGS...))
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
AlgorithmSpec::ProcessCallback adaptStatelessF(std::function< void(CONTEXTELEMENT &...)> callback)
memfun_type< decltype(&F::operator())>::type FFL(F const &func)
AlgorithmSpec::InitCallback adaptStateful(LAMBDA l)
Helper class for an algorithm which is loaded as a plugin.
virtual AlgorithmSpec create(ConfigContext const &)=0
std::function< ProcessCallback(InitContext &)> InitCallback
AlgorithmSpec(AlgorithmSpec &)=default
static AlgorithmSpec dummyAlgorithm()
std::function< void(InitErrorContext &)> InitErrorCallback
AlgorithmSpec(InitCallback init, ErrorCallback &error=emptyErrorCallback(), InitErrorCallback &initError=emptyInitErrorCallback())
AlgorithmSpec & operator=(const AlgorithmSpec &)=default
std::function< void(ProcessingContext &)> ProcessCallback
static ErrorCallback & emptyErrorCallback()
AlgorithmSpec(const AlgorithmSpec &)=default
static InitErrorCallback & emptyInitErrorCallback()
std::function< void(ErrorContext &)> ErrorCallback
AlgorithmSpec(ProcessCallback process, ErrorCallback &error=emptyErrorCallback())
InitErrorCallback onInitError
AlgorithmSpec(AlgorithmSpec &&)=default
ProcessCallback onProcess
static ConfigParamRegistry const & get(InitContext &ctx)
static ConfigParamRegistry const & get(InitContext &ctx)
static DataAllocator & get(ProcessingContext &ctx)
static InitContext & get(InitContext &ctx)
static InputRecord & get(ProcessingContext &ctx)
static Input< L, T > get(ProcessingContext &ctx)
static Input< L, T > get(ProcessingContext &ctx)
static ProcessingContext & get(ProcessingContext &ctx)
static decltype(auto) get(ProcessingContext &ctx)
static decltype(auto) get(InitContext &ctx)