CMS 3D CMS Logo

CmsShowTaskExecutor.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_CmsShowTaskExecutor_h
2 #define Fireworks_Core_CmsShowTaskExecutor_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : CmsShowTaskExecutor
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Fri Jul 11 12:09:45 EDT 2008
19 //
20 
21 // system include files
22 #include <deque>
23 #include <functional>
24 
25 // user include files
27 
28 // forward declarations
29 
31 public:
33  ~CmsShowTaskExecutor() override;
34 
35  typedef std::function<void()> TaskFunctor;
36  // ---------- const member functions ---------------------
37 
38  // ---------- static member functions --------------------
39 
40  // ---------- member functions ---------------------------
41  void addTask(const TaskFunctor& iTask);
42 
43  void startDoingTasks() override;
44 
45 protected:
46  void doNextTaskImp() override;
47  bool moreTasksAvailable() override;
48 
49 public:
50  CmsShowTaskExecutor(const CmsShowTaskExecutor&) = delete; // stop default
51 
52  const CmsShowTaskExecutor& operator=(const CmsShowTaskExecutor&) = delete; // stop default
53 
54 private:
55  // ---------- member data --------------------------------
56  std::deque<TaskFunctor> m_tasks;
57 };
58 
59 #endif
void startDoingTasks() override
std::function< void()> TaskFunctor
void doNextTaskImp() override
std::deque< TaskFunctor > m_tasks
const CmsShowTaskExecutor & operator=(const CmsShowTaskExecutor &)=delete
bool moreTasksAvailable() override
void addTask(const TaskFunctor &iTask)