SAGA Adaptor CPI v.1.0
task_declaration.hpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
00002 //  Copyright (c) 2005-2006 Stephan Hirmer (shirmer@cct.lsu.edu)
00003 // 
00004 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
00005 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 #ifndef SAGA_ADAPTOR_TASK_V1_HPP
00008 #define SAGA_ADAPTOR_TASK_V1_HPP
00009 
00010 #include <saga/saga/util.hpp>
00011 #include <saga/saga/task.hpp>
00012 #include <saga/impl/engine/task_fwd.hpp>
00013 #include <saga/saga/uuid.hpp>
00014 
00016 namespace saga 
00017 { 
00018   namespace adaptors 
00019   {
00020     
00029     class task : public saga::task
00030     {
00031     private:
00032         typedef saga::task base_type;
00033         
00038         template<typename Cpi, typename Base, typename RetVal>
00039         static inline saga::impl::task<Cpi, Base, RetVal> *
00040         create_task(char const *func_name, TR1::shared_ptr<Cpi> cpi, 
00041             impl::proxy* prxy, void (Base::*sync)(RetVal&), 
00042             bool (Base::*prep)(RetVal&, saga::uuid));
00043 
00052         template<typename Cpi, typename Base, typename RetVal>
00053         static inline saga::impl::wrapper_task<Cpi, Base, RetVal> *
00054         create_task(char const* func_name, TR1::shared_ptr<Cpi> cpi, 
00055             impl::proxy* prxy, void (Base::*sync)(RetVal&, saga::uuid), 
00056             bool (Base::*prep)(RetVal&, saga::uuid));
00057 
00058     public:
00059         task(void);
00060         
00061         ~task (void) 
00062         {
00063         }
00064         
00071         template<typename Cpi, typename Base, typename RetVal>
00072         task (char const* func_name, TR1::shared_ptr<Cpi> cpi, 
00073               impl::proxy* prxy, void (Base::*sync)(RetVal&), 
00074               bool (Base::*prep)(RetVal&, saga::uuid) = NULL);
00075 
00076         template<typename Cpi, typename Base, typename RetVal>
00077         task (char const* func_name, TR1::shared_ptr<Cpi> cpi, 
00078               void (Base::*sync)(RetVal&), 
00079               bool (Base::*prep)(RetVal&, saga::uuid) = NULL);
00080 
00089         template<typename Cpi, typename Base, typename RetVal>
00090         task (char const* func_name, TR1::shared_ptr<Cpi> cpi, impl::proxy* prxy, 
00091               void (Base::*sync)(RetVal, saga::uuid), 
00092               bool (Base::*prep)(RetVal, saga::uuid) = NULL);
00093 
00094         template<typename Cpi, typename Base, typename RetVal>
00095         task (char const* func_name, TR1::shared_ptr<Cpi> cpi, 
00096               void (Base::*sync)(RetVal, saga::uuid), 
00097               bool (Base::*prep)(RetVal, saga::uuid) = NULL);
00098 
00100         // bring in the generated constructors with 1 to N parameters.
00101         #include <saga/saga/adaptors/task_declaration_impl.hpp>
00102     };
00103 
00104   } // adaptors
00105 
00106 } // namespace saga
00108 
00109 #endif // SAGA_ADAPTOR_TASK_V1_HPP
00110 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines