fw4spl
SIncrementArray.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-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 __TUTO16MULTITHREADCONSOLE_SINCREMENTARRAY_HPP__
8 #define __TUTO16MULTITHREADCONSOLE_SINCREMENTARRAY_HPP__
9 
10 #include "Tuto16MultithreadConsole/config.hpp"
11 
12 #include <fwServices/IController.hpp>
13 
14 namespace fwThread
15 {
16 class Timer;
17 }
18 
20 {
21 
38 class TUTO16MULTITHREADCONSOLE_CLASS_API SIncrementArray : public ::fwServices::IController
39 {
40 public:
41 
43 
44  TUTO16MULTITHREADCONSOLE_API SIncrementArray() noexcept;
45  TUTO16MULTITHREADCONSOLE_API virtual ~SIncrementArray() noexcept;
46 
47 protected:
48 
50  virtual void starting() override;
51 
53  virtual void stopping() override;
54 
56  virtual void updating() override;
57 
59  virtual void configuring() override;
60 
61 private:
63  void startTimer();
64 
65  SPTR( fwThread::Timer ) m_timer;
66 
67  unsigned int m_periodInMillisec;
68 };
69 
70 } // namespace Tuto16MultithreadConsole
71 
72 #endif // __TUTO16MULTITHREADCONSOLE_SINCREMENTARRAY_HPP__
73 
#define SPTR(_cls_)
This interface defines control service API. Does nothing particularly, can be considered as a default...
Definition: IController.hpp:23
This service increments all the values of a fwData::Array.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
This namespace fwThread provides few tools to execute asynchronous tasks on different threads...
The namespace Tuto16MultithreadConsole contains services to run the Tuto16MultithreadConsole example...