FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
TimerService.h
1 /**********************************************************\
2 Original Author: Mital Vora <mital.d.vora@gmail.com>
3 
4 Created: Apr 03, 2011
5 License: Dual license model; choose one of two:
6  New BSD License
7  http://www.opensource.org/licenses/bsd-license.php
8  - or -
9  GNU Lesser General Public License, version 2.1
10  http://www.gnu.org/licenses/lgpl-2.1.html
11 \**********************************************************/
12 
13 #pragma once
14 #ifndef H_FB_TIMER_SERVICE
15 #define H_FB_TIMER_SERVICE
16 
17 #include <boost/thread/mutex.hpp>
18 #include <boost/thread/thread.hpp>
19 #include <boost/scoped_ptr.hpp>
20 
21 #include "FBPointers.h"
22 
23 namespace boost { namespace asio { class io_service; } }
24 
25 namespace FB {
26 
27  class TimerServicePimpl;
28  FB_FORWARD_PTR(TimerService);
39  {
40  public:
41  static TimerServicePtr instance();
42  ~TimerService();
43 
44  boost::asio::io_service* getIOService();
45  protected:
46  static TimerServiceWeakPtr inst;
47  static boost::mutex instance_mutex;
48  TimerService();
49 
50  private:
51  boost::scoped_ptr<TimerServicePimpl> pimpl;
52  };
53 };
54 
55 #endif
56 
TimerService Utility.
Definition: TimerService.h:38