MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mbgl::WorkTask Class Referenceabstract

#include <work_task.hpp>

Inheritance diagram for mbgl::WorkTask:
mbgl::util::non_copyable_::noncopyable mbgl::WorkTaskImpl< F, P >

Public Member Functions

virtual ~WorkTask ()=default
 
virtual void operator() ()=0
 
virtual void cancel ()=0
 
template<class Fn , class... Args>
std::shared_ptr< WorkTaskmake (Fn &&fn, Args &&... args)
 

Static Public Member Functions

template<class Fn , class... Args>
static std::shared_ptr< WorkTaskmake (Fn &&, Args &&...)
 

Detailed Description

A movable type-erasing function wrapper. This allows to store arbitrary invokable things (like std::function<>, or the result of a movable-only std::bind()) in the queue. Source: http://stackoverflow.com/a/29642072/331379

Definition at line 12 of file work_task.hpp.

Constructor & Destructor Documentation

◆ ~WorkTask()

virtual mbgl::WorkTask::~WorkTask ( )
virtualdefault

Member Function Documentation

◆ cancel()

virtual void mbgl::WorkTask::cancel ( )
pure virtual

Implemented in mbgl::WorkTaskImpl< F, P >.

◆ make() [1/2]

template<class Fn , class... Args>
static std::shared_ptr<WorkTask> mbgl::WorkTask::make ( Fn &&  ,
Args &&  ... 
)
static

◆ make() [2/2]

template<class Fn , class... Args>
std::shared_ptr<WorkTask> mbgl::WorkTask::make ( Fn &&  fn,
Args &&...  args 
)

Definition at line 54 of file work_task_impl.hpp.

◆ operator()()

virtual void mbgl::WorkTask::operator() ( )
pure virtual

Implemented in mbgl::WorkTaskImpl< F, P >.


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