task.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) Sergey P. Derevyago, 2008-2009.
00003  *
00004  * Permission to copy, use, modify, sell and distribute this software is granted
00005  * provided this copyright notice appears in all copies.
00006  * This software is provided "as is" without express or implied warranty, and
00007  * with no claim as to its suitability for any purpose.
00008  *
00009  */
00010 
00016 #ifndef __DERS__TASK_HPP__
00017 #define __DERS__TASK_HPP__
00018 
00019 #include <ders/config.hpp>
00020 #include <vector>
00021 #include <ders/data_queue.hpp>
00022 
00023 namespace ders {  // ::ders
00024 
00025 typedef std::vector<data_queue*> dq_vec;
00026 
00030 class task_opers : virtual public destroyable {
00031  public:
00032       virtual void invoke(void (*fun)(void*), void* arg)=0;
00033 };
00034 
00038 class task : virtual public destroyable {
00039  public:
00040       virtual void* proc_arg() { return 0; }
00041       virtual void proc(mem_pool& mp, const dq_vec& dqv, void* arg, task_opers&
00042         to)=0;
00043 };
00044 
00045 }  // namespace ::ders
00046 
00047 #endif  // __DERS__TASK_HPP__
00048 

Generated on Tue Dec 8 11:35:32 2009 for derslib by  doxygen 1.5.5