neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::function_task< T > Class Template Reference

#include <task.hpp>

Inheritance diagram for neolib::function_task< T >:
neolib::task< Base > neolib::i_task

Public Member Functions

 function_task (std::function< T()> aFunction)
 
std::future< Tget_future ()
 
const std::string & name () const override
 
void run (yield_type) override
 
void run (yield_type)
 
- Public Member Functions inherited from neolib::task< Base >
 task (const std::string &aName=std::string{})
 
const std::string & name () const override
 
bool do_work (yield_type aYieldType=yield_type::NoYield) override
 
void cancel () noexcept override
 
bool cancelled () const override
 
- Public Member Functions inherited from neolib::i_task
virtual ~i_task ()=default
 

Detailed Description

template<typename T>
class neolib::function_task< T >

Definition at line 81 of file task.hpp.

Constructor & Destructor Documentation

◆ function_task()

template<typename T >
neolib::function_task< T >::function_task ( std::function< T()>  aFunction)
inline

Definition at line 84 of file task.hpp.

Member Function Documentation

◆ get_future()

template<typename T >
std::future< T > neolib::function_task< T >::get_future ( )
inline

Definition at line 88 of file task.hpp.

◆ name()

template<typename T >
const std::string & neolib::function_task< T >::name ( ) const
inlineoverridevirtual

Implements neolib::i_task.

Definition at line 93 of file task.hpp.

◆ run() [1/2]

void neolib::function_task< void >::run ( yield_type  )
inlinevirtual

Implements neolib::i_task.

Definition at line 108 of file task.hpp.

◆ run() [2/2]

template<typename T >
void neolib::function_task< T >::run ( yield_type  )
inlineoverridevirtual

Implements neolib::i_task.

Definition at line 98 of file task.hpp.


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