kanzi::TaskDispatcherBase Class Referenceabstract

Base class for TaskDispatcher implementation. More...

#include <kanzi/core.ui/platform/task_dispatcher/common/task_dispatcher_base.hpp>

Inheritance diagram for kanzi::TaskDispatcherBase:
kanzi::TaskDispatcher

Public Types

typedef function< void()> Task
 Task is a callback that is dispatched by TaskDispatcher and executed on a specific UI thread. More...
 

Public Member Functions

void submit (Task task)
 Submits a task. More...
 
void executeTasks ()
 Executes the tasks that have been dispatched to the UI thread. More...
 
virtual void notifyTasksAvailable ()=0
 Notifies this class that tasks are available. More...
 
virtual void notifyTasksConsumed ()=0
 Notifies this class that tasks have been consumed. More...
 

Protected Member Functions

 TaskDispatcherBase ()
 Constructor. More...
 
virtual ~TaskDispatcherBase ()
 Destructor. More...
 

Detailed Description

Base class for TaskDispatcher implementation.

Member Typedef Documentation

typedef function<void()> kanzi::TaskDispatcherBase::Task

Task is a callback that is dispatched by TaskDispatcher and executed on a specific UI thread.

Constructor & Destructor Documentation

kanzi::TaskDispatcherBase::TaskDispatcherBase ( )
explicitprotected

Constructor.

virtual kanzi::TaskDispatcherBase::~TaskDispatcherBase ( )
protectedvirtual

Destructor.

Member Function Documentation

void kanzi::TaskDispatcherBase::submit ( Task  task)

Submits a task.

The task will be dispatched to and executed on the UI thread that this task dispatcher belongs to. You can call this function from any thread.

void kanzi::TaskDispatcherBase::executeTasks ( )

Executes the tasks that have been dispatched to the UI thread.

Kanzi calls this function automatically. This function can only be called from the UI thread that this dispatcher belongs to.

virtual void kanzi::TaskDispatcherBase::notifyTasksAvailable ( )
pure virtual

Notifies this class that tasks are available.

This is an internal function.

Implemented in kanzi::TaskDispatcher.

virtual void kanzi::TaskDispatcherBase::notifyTasksConsumed ( )
pure virtual

Notifies this class that tasks have been consumed.

This is an internal function.

Implemented in kanzi::TaskDispatcher.


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