Jobrocket
jobrocket::JobFunction< Fn, Args > Struct Template Reference

#include <Job.hpp>

Overview

template<typename Fn, typename... Args>
struct jobrocket::JobFunction< Fn, Args >

Holds a jobs function pointer and argument tuple, applying the arguments to the function and calling it when execute() is called.

Inherits jobrocket::JobFunctionBase.

Public Member Functions

 JobFunction (Fn function, Args &&... args)
 
constexpr uint32_t size ()
 
void execute () override
 

Public Attributes

Fn function_ptr
 
std::tuple< Args... > arg_tuple
 

Constructor & Destructor Documentation

◆ JobFunction()

template<typename Fn , typename... Args>
jobrocket::JobFunction< Fn, Args >::JobFunction ( Fn  function,
Args &&...  args 
)
inlineexplicit

Member Function Documentation

◆ execute()

template<typename Fn , typename... Args>
void jobrocket::JobFunction< Fn, Args >::execute ( )
inlineoverridevirtual

◆ size()

template<typename Fn , typename... Args>
constexpr uint32_t jobrocket::JobFunction< Fn, Args >::size ( )
inline

Member Data Documentation

◆ arg_tuple

template<typename Fn , typename... Args>
std::tuple<Args...> jobrocket::JobFunction< Fn, Args >::arg_tuple

◆ function_ptr

template<typename Fn , typename... Args>
Fn jobrocket::JobFunction< Fn, Args >::function_ptr