39 #ifndef ORO_INVOKER_HPP 40 #define ORO_INVOKER_HPP 42 #include <boost/function.hpp> 43 #include <boost/function_types/function_type.hpp> 44 #include <boost/type_traits.hpp> 52 template<
int,
class F,
class BaseImpl>
60 template<
class F,
class BaseImpl>
62 :
public InvokerImpl<boost::function_traits<F>::arity, F, BaseImpl>
65 template<
class F,
class BaseImpl>
67 :
public Return<F,BaseImpl>
69 typedef typename boost::function_traits<F>::result_type
result_type;
75 return BaseImpl::template call_impl<int>();
80 return BaseImpl::send_impl();
85 template<
class F,
class BaseImpl>
87 :
public Return<F,BaseImpl>
89 typedef typename boost::function_traits<F>::result_type
result_type;
90 typedef typename boost::function_traits<F>::arg1_type
arg1_type;
94 result_type
call(arg1_type a1)
96 return BaseImpl::template call_impl<arg1_type>( a1 );
98 result_type
ret(arg1_type a1)
100 return BaseImpl::template ret_impl<arg1_type>( a1 );
104 return BaseImpl::ret_impl();
108 return BaseImpl::template send_impl<arg1_type>( a1 );
112 template<
class F,
class BaseImpl>
114 :
public Return<F,BaseImpl>
116 typedef typename boost::function_traits<F>::result_type
result_type;
117 typedef typename boost::function_traits<F>::arg1_type
arg1_type;
118 typedef typename boost::function_traits<F>::arg2_type
arg2_type;
123 result_type
call(arg1_type t1, arg2_type t2)
125 return BaseImpl::template call_impl<arg1_type, arg2_type>(t1, t2);
128 result_type
ret(arg1_type t1, arg2_type t2)
130 return BaseImpl::template ret_impl<arg1_type, arg2_type>(t1, t2);
135 return BaseImpl::ret_impl();
140 return BaseImpl::template send_impl<arg1_type, arg2_type>(t1, t2);
144 template<
class F,
class BaseImpl>
146 :
public Return<F,BaseImpl>
148 typedef typename boost::function_traits<F>::result_type
result_type;
149 typedef typename boost::function_traits<F>::arg1_type
arg1_type;
150 typedef typename boost::function_traits<F>::arg2_type
arg2_type;
151 typedef typename boost::function_traits<F>::arg3_type
arg3_type;
156 result_type
call(arg1_type t1, arg2_type t2, arg3_type t3)
158 return BaseImpl::template call_impl<arg1_type, arg2_type, arg3_type>(t1, t2, t3);
161 result_type
ret(arg1_type t1, arg2_type t2, arg3_type t3)
163 return BaseImpl::template ret_impl<arg1_type, arg2_type, arg3_type>(t1, t2, t3);
168 return BaseImpl::ret_impl();
173 return BaseImpl::template send_impl<arg1_type, arg2_type, arg3_type>(t1, t2, t3);
178 template<
class F,
class BaseImpl>
180 :
public Return<F,BaseImpl>
182 typedef typename boost::function_traits<F>::result_type
result_type;
183 typedef typename boost::function_traits<F>::arg1_type
arg1_type;
184 typedef typename boost::function_traits<F>::arg2_type
arg2_type;
185 typedef typename boost::function_traits<F>::arg3_type
arg3_type;
186 typedef typename boost::function_traits<F>::arg4_type
arg4_type;
191 result_type
call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4)
193 return BaseImpl::template call_impl<arg1_type, arg2_type, arg3_type, arg4_type>(t1, t2, t3, t4);
196 result_type
ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4)
198 return BaseImpl::template ret_impl<arg1_type, arg2_type, arg3_type, arg4_type>(t1, t2, t3, t4);
203 return BaseImpl::ret_impl();
208 return BaseImpl::template send_impl<arg1_type, arg2_type, arg3_type, arg4_type>(t1, t2, t3, t4);
213 template<
class F,
class BaseImpl>
215 :
public Return<F,BaseImpl>
217 typedef typename boost::function_traits<F>::result_type
result_type;
218 typedef typename boost::function_traits<F>::arg1_type
arg1_type;
219 typedef typename boost::function_traits<F>::arg2_type
arg2_type;
220 typedef typename boost::function_traits<F>::arg3_type
arg3_type;
221 typedef typename boost::function_traits<F>::arg4_type
arg4_type;
222 typedef typename boost::function_traits<F>::arg5_type
arg5_type;
227 result_type
call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5)
229 return BaseImpl::template call_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type>(t1, t2, t3, t4, t5);
232 result_type
ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5)
234 return BaseImpl::template ret_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type>(t1, t2, t3, t4, t5);
239 return BaseImpl::ret_impl();
244 return BaseImpl::template send_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type>(t1, t2, t3, t4, t5);
249 template<
class F,
class BaseImpl>
251 :
public Return<F,BaseImpl>
253 typedef typename boost::function_traits<F>::result_type
result_type;
254 typedef typename boost::function_traits<F>::arg1_type
arg1_type;
255 typedef typename boost::function_traits<F>::arg2_type
arg2_type;
256 typedef typename boost::function_traits<F>::arg3_type
arg3_type;
257 typedef typename boost::function_traits<F>::arg4_type
arg4_type;
258 typedef typename boost::function_traits<F>::arg5_type
arg5_type;
259 typedef typename boost::function_traits<F>::arg6_type
arg6_type;
264 result_type
call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6)
266 return BaseImpl::template call_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type>(t1, t2, t3, t4, t5, t6);
269 result_type
ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6)
271 return BaseImpl::template ret_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type>(t1, t2, t3, t4, t5, t6);
276 return BaseImpl::ret_impl();
279 SendHandle<F> send(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6)
281 return BaseImpl::template send_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type>(t1, t2, t3, t4, t5, t6);
286 template<
class F,
class BaseImpl>
288 :
public Return<F,BaseImpl>
290 typedef typename boost::function_traits<F>::result_type
result_type;
291 typedef typename boost::function_traits<F>::arg1_type
arg1_type;
292 typedef typename boost::function_traits<F>::arg2_type
arg2_type;
293 typedef typename boost::function_traits<F>::arg3_type
arg3_type;
294 typedef typename boost::function_traits<F>::arg4_type
arg4_type;
295 typedef typename boost::function_traits<F>::arg5_type
arg5_type;
296 typedef typename boost::function_traits<F>::arg6_type
arg6_type;
297 typedef typename boost::function_traits<F>::arg7_type
arg7_type;
302 result_type
call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6, arg7_type t7)
304 return BaseImpl::template call_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type>(t1, t2, t3, t4, t5, t6, t7);
307 result_type
ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6, arg7_type t7)
309 return BaseImpl::template ret_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type>(t1, t2, t3, t4, t5, t6, t7);
314 return BaseImpl::ret_impl();
317 SendHandle<F> send(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6, arg7_type t7)
319 return BaseImpl::template send_impl<arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type>(t1, t2, t3, t4, t5, t6, t7);
boost::function_traits< F >::arg1_type arg1_type
boost::function_traits< F >::arg5_type arg5_type
result_type call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4)
boost::function_traits< F >::arg7_type arg7_type
boost::function_traits< F >::arg3_type arg3_type
SendHandle< F > send(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4)
result_type call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6, arg7_type t7)
boost::function_traits< F >::arg2_type arg2_type
boost::function_traits< F >::result_type result_type
result_type call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6)
boost::function_traits< F >::arg1_type arg1_type
result_type call(arg1_type a1)
result_type call(arg1_type t1, arg2_type t2)
boost::function_traits< F >::arg4_type arg4_type
boost::function_traits< F >::result_type result_type
boost::function_traits< F >::result_type result_type
result_type ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6, arg7_type t7)
boost::function_traits< F >::result_type result_type
SendHandle< F > send(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5)
boost::function_traits< F >::arg3_type arg3_type
result_type ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4)
boost::function_traits< F >::arg1_type arg1_type
boost::function_traits< F >::arg4_type arg4_type
boost::function_traits< F >::arg6_type arg6_type
boost::function_traits< F >::arg3_type arg3_type
SendHandle< F > send(arg1_type t1, arg2_type t2)
result_type call(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5)
boost::function_traits< F >::arg5_type arg5_type
SendHandle< F > send(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6, arg7_type t7)
result_type ret(arg1_type t1, arg2_type t2, arg3_type t3)
result_type ret(arg1_type a1)
boost::function_traits< F >::arg2_type arg2_type
boost::function_traits< F >::arg4_type arg4_type
result_type ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5)
boost::function_traits< F >::arg2_type arg2_type
The SendHandle is used to collect the result values of an asynchronous invocation. The template argument Signature must have the same type as the method being invoked.
boost::function_traits< F >::arg6_type arg6_type
boost::function_traits< F >::arg3_type arg3_type
boost::function_traits< F >::arg2_type arg2_type
boost::function_traits< F >::result_type result_type
boost::function_traits< F >::arg5_type arg5_type
boost::function_traits< F >::arg1_type arg1_type
boost::function_traits< F >::arg3_type arg3_type
result_type ret(arg1_type t1, arg2_type t2)
boost::function_traits< F >::result_type result_type
boost::function_traits< F >::result_type result_type
SendHandle< F > send(arg1_type a1)
SendHandle< F > send(arg1_type t1, arg2_type t2, arg3_type t3)
boost::function_traits< F >::arg4_type arg4_type
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
boost::function_traits< F >::arg2_type arg2_type
result_type call(arg1_type t1, arg2_type t2, arg3_type t3)
boost::function_traits< F >::arg2_type arg2_type
result_type ret(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6)
boost::function_traits< F >::arg1_type arg1_type
boost::function_traits< F >::result_type result_type
SendHandle< F > send(arg1_type t1, arg2_type t2, arg3_type t3, arg4_type t4, arg5_type t5, arg6_type t6)
boost::function_traits< F >::arg1_type arg1_type
boost::function_traits< F >::arg1_type arg1_type