47 #ifndef _MIRA_RUNNABLE_H_ 48 #define _MIRA_RUNNABLE_H_ 51 #include <boost/enable_shared_from_this.hpp> 72 class IRunnable :
public boost::enable_shared_from_this<IRunnable>
114 template <
typename F>
129 "Exception while invoking Runnable")) {
133 catch(std::exception& ex) {
136 "Exception while invoking Runnable")) {
F function
Definition: Runnable.h:142
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Runnable that wraps any function pointer.
Definition: Runnable.h:115
virtual ~IRunnable()
Definition: Runnable.h:76
DiagnosticRunnable(DiagnosticsModulePtr module=NULL)
Definition: Runnable.h:95
Base for all runnable classes that can be signaled when they need to run again.
Definition: Runnable.h:72
Auxiliary logging macros for special entities like exceptions, etc.
virtual void run(DispatcherThread *dispatcher)
Called from dispatcher thread this runnable is attached to, whenever the runnable should be executed...
Definition: Runnable.h:121
std::string message() const MIRA_NOEXCEPT_OR_NOTHROW
Similar to what().
virtual void run(DispatcherThread *dispatcher)=0
Called from dispatcher thread this runnable is attached to, whenever the runnable should be executed...
void setDiagnosticsModule(DiagnosticsModulePtr module)
Definition: Runnable.h:98
boost::shared_ptr< DiagnosticRunnable > DiagnosticRunnablePtr
Definition: Runnable.h:107
DiagnosticsModulePtr mDiagnosticsModule
Definition: Runnable.h:105
Definition: Runnable.h:91
boost::shared_ptr< IRunnable > IRunnablePtr
a runnable pointer
Definition: Runnable.h:63
Base class for exceptions.
Definition: Exception.h:199
Class that can be used whenever you want to have ONE thread where several handlers are assigned to...
Definition: DispatcherThread.h:131
FunctionRunnable(F &&fn, DiagnosticsModulePtr module=NULL)
Definition: Runnable.h:118
#define MIRA_LOG_EXCEPTION(level, ex)
Log the specified exception, including all information that the exception object carries.
Definition: LoggingAux.h:107
bool error(const std::string &category, const std::string &message, const std::string &trText="")
Signal an error in a category.
DiagnosticsModulePtr getDiagnosticsModule()
Definition: Runnable.h:101
Definition: LoggingCore.h:75
Base class for modules that want to use diagnostics and set the current status.
Definition: Status.h:138
Status and status management classes used for diagnostics.