CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Member Functions | List of all members
ctkApplicationRunnable Struct Referenceabstract

#include <Libs/PluginFramework/ctkApplicationRunnable.h>

Public Member Functions

virtual QVariant run (const QVariant &context)=0
 
virtual void stop ()=0
 
virtual ~ctkApplicationRunnable ()
 

Detailed Description

Like a QRunnable, an object which captures a block of code which can be passed around and executed as well as stopped. Unlike standard runnables, paramaterized runnables allow an arbitrary QVariant to be passed in when the block is evaluated.

Clients may implement this interface.

Definition at line 38 of file ctkApplicationRunnable.h.

Constructor & Destructor Documentation

◆ ~ctkApplicationRunnable()

virtual ctkApplicationRunnable::~ctkApplicationRunnable ( )
virtual

Member Function Documentation

◆ run()

virtual QVariant ctkApplicationRunnable::run ( const QVariant &  context)
pure virtual

Executes the block of code encapsulated by this runnable in the context of the given object and returns the result. The result may be an invalid QVariant.

Parameters
contextthe context for evaluating the runnable
Returns
the result of evaluating the runnable in the given context
Exceptions
std::exceptionif there is a problem running this runnable

◆ stop()

virtual void ctkApplicationRunnable::stop ( )
pure virtual

Forces this runnable to stop.


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