CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Fireworks/Core/src/CmsShowTaskExecutor.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Core
00004 // Class  :     CmsShowTaskExecutor
00005 //
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Fri Jul 11 12:09:47 EDT 2008
00011 // $Id: CmsShowTaskExecutor.cc,v 1.2 2008/11/06 22:05:24 amraktad Exp $
00012 //
00013 
00014 // system include files
00015 
00016 // user include files
00017 #include "Fireworks/Core/src/CmsShowTaskExecutor.h"
00018 
00019 
00020 //
00021 // constants, enums and typedefs
00022 //
00023 
00024 //
00025 // static data member definitions
00026 //
00027 
00028 //
00029 // constructors and destructor
00030 //
00031 CmsShowTaskExecutor::CmsShowTaskExecutor()
00032 {
00033 }
00034 
00035 // CmsShowTaskExecutor::CmsShowTaskExecutor(const CmsShowTaskExecutor& rhs)
00036 // {
00037 //    // do actual copying here;
00038 // }
00039 
00040 CmsShowTaskExecutor::~CmsShowTaskExecutor()
00041 {
00042 }
00043 
00044 //
00045 // assignment operators
00046 //
00047 // const CmsShowTaskExecutor& CmsShowTaskExecutor::operator=(const CmsShowTaskExecutor& rhs)
00048 // {
00049 //   //An exception safe implementation is
00050 //   CmsShowTaskExecutor temp(rhs);
00051 //   swap(rhs);
00052 //
00053 //   return *this;
00054 // }
00055 
00056 //
00057 // member functions
00058 //
00059 void
00060 CmsShowTaskExecutor::addTask(const TaskFunctor& iTask)
00061 {
00062    m_tasks.push_back(iTask);
00063 }
00064 
00065 void
00066 CmsShowTaskExecutor::startDoingTasks()
00067 {
00068    if(m_tasks.size()) {
00069       requestNextTask();
00070    }
00071 }
00072 
00073 void
00074 CmsShowTaskExecutor::doNextTaskImp()
00075 {
00076    TaskFunctor f = m_tasks.front();
00077    m_tasks.pop_front();
00078    f();
00079 }
00080 
00081 bool
00082 CmsShowTaskExecutor::moreTasksAvailable()
00083 {
00084    return !m_tasks.empty();
00085 }
00086 
00087 //
00088 // const member functions
00089 //
00090 
00091 //
00092 // static member functions
00093 //