Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef ORO_RETURN_HPP
00040 #define ORO_RETURN_HPP
00041
00042 #include "Collect.hpp"
00043
00044 namespace RTT
00045 {
00046 namespace internal
00047 {
00052 template<int, class F, class BaseImpl>
00053 struct ReturnImpl;
00054
00055 template<class F, class BaseImpl>
00056 struct Return
00057 : public ReturnImpl<boost::function_traits<F>::arity,F,BaseImpl>
00058 {};
00059
00060
00061 template<class F, class BaseImpl>
00062 struct ReturnImpl<0,F, BaseImpl>
00063 : public Collect<F,BaseImpl>
00064 {
00065 virtual ~ReturnImpl() {}
00066
00067 };
00068
00069 template<class F, class BaseImpl>
00070 struct ReturnImpl<1,F,BaseImpl>
00071 : public Collect<F,BaseImpl>
00072 {
00073 typedef typename boost::function<F>::result_type result_type;
00074 typedef typename boost::function<F>::arg1_type arg1_type;
00075 virtual ~ReturnImpl() {}
00076
00077 };
00078
00079 template<class F, class BaseImpl>
00080 struct ReturnImpl<2,F,BaseImpl>
00081 : public Collect<F,BaseImpl>
00082 {
00083 typedef typename boost::function<F>::arg1_type arg1_type;
00084 typedef typename boost::function<F>::arg2_type arg2_type;
00085 virtual ~ReturnImpl() {}
00086
00087 };
00088
00089 template<class F, class BaseImpl>
00090 struct ReturnImpl<3,F,BaseImpl>
00091 : public Collect<F,BaseImpl>
00092 {
00093 typedef typename boost::function<F>::arg1_type arg1_type;
00094 typedef typename boost::function<F>::arg2_type arg2_type;
00095 typedef typename boost::function<F>::arg3_type arg3_type;
00096 virtual ~ReturnImpl() {}
00097
00098 };
00099
00100 template<class F, class BaseImpl>
00101 struct ReturnImpl<4,F,BaseImpl>
00102 : public Collect<F,BaseImpl>
00103 {
00104 typedef typename boost::function<F>::arg1_type arg1_type;
00105 typedef typename boost::function<F>::arg2_type arg2_type;
00106 typedef typename boost::function<F>::arg3_type arg3_type;
00107 typedef typename boost::function<F>::arg4_type arg4_type;
00108 virtual ~ReturnImpl() {}
00109
00110 };
00111
00112 template<class F, class BaseImpl>
00113 struct ReturnImpl<5,F,BaseImpl>
00114 : public Collect<F,BaseImpl>
00115 {
00116 typedef typename boost::function<F>::arg1_type arg1_type;
00117 typedef typename boost::function<F>::arg2_type arg2_type;
00118 typedef typename boost::function<F>::arg3_type arg3_type;
00119 typedef typename boost::function<F>::arg4_type arg4_type;
00120 typedef typename boost::function<F>::arg5_type arg5_type;
00121 virtual ~ReturnImpl() {}
00122
00123 };
00124
00125 template<class F, class BaseImpl>
00126 struct ReturnImpl<6,F,BaseImpl>
00127 : public Collect<F,BaseImpl>
00128 {
00129 typedef typename boost::function<F>::arg1_type arg1_type;
00130 typedef typename boost::function<F>::arg2_type arg2_type;
00131 typedef typename boost::function<F>::arg3_type arg3_type;
00132 typedef typename boost::function<F>::arg4_type arg4_type;
00133 typedef typename boost::function<F>::arg5_type arg5_type;
00134 typedef typename boost::function<F>::arg6_type arg6_type;
00135 virtual ~ReturnImpl() {}
00136
00137 };
00138
00139 template<class F, class BaseImpl>
00140 struct ReturnImpl<7,F,BaseImpl>
00141 : public Collect<F,BaseImpl>
00142 {
00143 typedef typename boost::function<F>::arg1_type arg1_type;
00144 typedef typename boost::function<F>::arg2_type arg2_type;
00145 typedef typename boost::function<F>::arg3_type arg3_type;
00146 typedef typename boost::function<F>::arg4_type arg4_type;
00147 typedef typename boost::function<F>::arg5_type arg5_type;
00148 typedef typename boost::function<F>::arg6_type arg6_type;
00149 typedef typename boost::function<F>::arg7_type arg7_type;
00150 virtual ~ReturnImpl() {}
00151
00152 };
00153 }
00154 }
00155 #endif