fw4spl
Bundles/ui/console/include/console/Plugin.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __CONSOLE_PLUGIN_HPP__
8 #define __CONSOLE_PLUGIN_HPP__
9 
10 #include "console/config.hpp"
11 
12 #include <fwRuntime/Plugin.hpp>
13 
14 namespace fwThread
15 {
16 class Worker;
17 } //namespace fwThread
18 
19 namespace console
20 {
24 class CONSOLE_CLASS_API Plugin : public ::fwRuntime::Plugin
25 {
26 
27 public:
28 
30  CONSOLE_API ~Plugin() noexcept;
31 
33  CONSOLE_API void start();
34 
36  CONSOLE_API void stop() noexcept;
37 
39  CONSOLE_API int run() noexcept;
40 
41 private:
42 
43  SPTR(::fwThread::Worker) m_worker;
44 
45 };
46 
47 } // namespace console
48 
49 #endif //__CONSOLE_PLUGIN_HPP__
#define SPTR(_cls_)
Provides a default plugin implementation.
This class is called when the console bundle is loaded.
The namespace console contains no service. It is only used to launch a main loop for console applicat...
This class creates and manages a task loop. The default implementation create a loop in a new thread...
Definition: Worker.hpp:32
This namespace fwThread provides few tools to execute asynchronous tasks on different threads...