00001 #ifndef Fireworks_Core_CmsShowTaskExecutor_h 00002 #define Fireworks_Core_CmsShowTaskExecutor_h 00003 // -*- C++ -*- 00004 // 00005 // Package: Core 00006 // Class : CmsShowTaskExecutor 00007 // 00016 // 00017 // Original Author: Chris Jones 00018 // Created: Fri Jul 11 12:09:45 EDT 2008 00019 // $Id: CmsShowTaskExecutor.h,v 1.3 2009/01/23 21:35:42 amraktad Exp $ 00020 // 00021 00022 // system include files 00023 #include <boost/function.hpp> 00024 #include <deque> 00025 00026 // user include files 00027 #include "Fireworks/Core/src/CmsShowTaskExecutorBase.h" 00028 00029 // forward declarations 00030 00031 class CmsShowTaskExecutor : public CmsShowTaskExecutorBase { 00032 00033 public: 00034 CmsShowTaskExecutor(); 00035 virtual ~CmsShowTaskExecutor(); 00036 00037 typedef boost::function0<void> TaskFunctor; 00038 // ---------- const member functions --------------------- 00039 00040 // ---------- static member functions -------------------- 00041 00042 // ---------- member functions --------------------------- 00043 void addTask(const TaskFunctor& iTask); 00044 00045 void startDoingTasks(); 00046 protected: 00047 virtual void doNextTaskImp(); 00048 virtual bool moreTasksAvailable(); 00049 00050 private: 00051 CmsShowTaskExecutor(const CmsShowTaskExecutor&); // stop default 00052 00053 const CmsShowTaskExecutor& operator=(const CmsShowTaskExecutor&); // stop default 00054 00055 // ---------- member data -------------------------------- 00056 std::deque<TaskFunctor> m_tasks; 00057 }; 00058 00059 00060 #endif