SAGA Adaptor CPI v.1.0
|
00001 // Copyright (c) 2005 Stephan Hirmer (stephan.hirmer@gmail.com) 00002 // 00003 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00005 00006 #ifndef BULK_STRATEGY_BASE_HPP 00007 #define BULK_STRATEGY_BASE_HPP 00008 00009 #include <boost/futures.hpp> 00010 #include <saga/impl/engine/bulk_analyser.hpp> 00011 00012 #if defined(BOOST_MSVC) 00013 #pragma warning(push) 00014 #pragma warning(disable: 4251 4231 4275 4660) 00015 #endif 00016 00017 namespace saga 00018 { 00019 namespace adaptors 00020 { 00026 struct task_blocker_for_bulk 00027 { 00028 saga::impl::task_container* tc; 00029 00033 task_blocker_for_bulk(impl::task_container* tc_); 00034 00038 ~task_blocker_for_bulk(void); 00039 }; 00040 00044 class bulk_strategy_base 00045 { 00046 protected: 00047 00053 void default_process_func_name(std::string const& func_name, 00054 std::string& cpi_name_, 00055 std::string& op_name_); 00056 typedef saga::impl::bulk_analyser::sorted_tc_type sorted_tc_type; 00057 00058 boost::futures::simple_future<int> thread_; 00059 00060 public: 00064 bulk_strategy_base(void); 00065 00069 virtual ~bulk_strategy_base (void); 00070 00075 virtual void apply(sorted_tc_type& analyser_res_); 00076 00077 virtual void complete_wait(void); 00078 00079 }; 00080 } 00081 } 00082 00083 #endif // BULK_STRATEGY_BASE_HPP