Return.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: The SourceWorks Tue Sep 7 00:55:18 CEST 2010 Return.hpp
3 
4  Return.hpp - description
5  -------------------
6  begin : Tue September 07 2010
7  copyright : (C) 2010 The SourceWorks
8  email : peter@thesourceworks.com
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU General Public *
13  * License as published by the Free Software Foundation; *
14  * version 2 of the License. *
15  * *
16  * As a special exception, you may use this file as part of a free *
17  * software library without restriction. Specifically, if other files *
18  * instantiate templates or use macros or inline functions from this *
19  * file, or you compile this file and link it with other files to *
20  * produce an executable, this file does not by itself cause the *
21  * resulting executable to be covered by the GNU General Public *
22  * License. This exception does not however invalidate any other *
23  * reasons why the executable file might be covered by the GNU General *
24  * Public License. *
25  * *
26  * This library is distributed in the hope that it will be useful, *
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
29  * Lesser General Public License for more details. *
30  * *
31  * You should have received a copy of the GNU General Public *
32  * License along with this library; if not, write to the Free Software *
33  * Foundation, Inc., 59 Temple Place, *
34  * Suite 330, Boston, MA 02111-1307 USA *
35  * *
36  ***************************************************************************/
37 
38 
39 #ifndef ORO_RETURN_HPP
40 #define ORO_RETURN_HPP
41 
42 #include "Collect.hpp"
43 
44 namespace RTT
45 {
46  namespace internal
47  {
52  template<int, class F, class BaseImpl>
53  struct ReturnImpl;
54 
55  template<class F, class BaseImpl>
56  struct Return
57  : public ReturnImpl<boost::function_traits<F>::arity,F,BaseImpl>
58  {};
59 
60 
61  template<class F, class BaseImpl>
62  struct ReturnImpl<0,F, BaseImpl>
63  : public Collect<F,BaseImpl>
64  {
65  virtual ~ReturnImpl() {}
66 
67  };
68 
69  template<class F, class BaseImpl>
70  struct ReturnImpl<1,F,BaseImpl>
71  : public Collect<F,BaseImpl>
72  {
73  typedef typename boost::function<F>::result_type result_type;
74  typedef typename boost::function<F>::arg1_type arg1_type;
75  virtual ~ReturnImpl() {}
76 
77  };
78 
79  template<class F, class BaseImpl>
80  struct ReturnImpl<2,F,BaseImpl>
81  : public Collect<F,BaseImpl>
82  {
83  typedef typename boost::function<F>::arg1_type arg1_type;
84  typedef typename boost::function<F>::arg2_type arg2_type;
85  virtual ~ReturnImpl() {}
86 
87  };
88 
89  template<class F, class BaseImpl>
90  struct ReturnImpl<3,F,BaseImpl>
91  : public Collect<F,BaseImpl>
92  {
93  typedef typename boost::function<F>::arg1_type arg1_type;
94  typedef typename boost::function<F>::arg2_type arg2_type;
95  typedef typename boost::function<F>::arg3_type arg3_type;
96  virtual ~ReturnImpl() {}
97 
98  };
99 
100  template<class F, class BaseImpl>
101  struct ReturnImpl<4,F,BaseImpl>
102  : public Collect<F,BaseImpl>
103  {
104  typedef typename boost::function<F>::arg1_type arg1_type;
105  typedef typename boost::function<F>::arg2_type arg2_type;
106  typedef typename boost::function<F>::arg3_type arg3_type;
107  typedef typename boost::function<F>::arg4_type arg4_type;
108  virtual ~ReturnImpl() {}
109 
110  };
111 
112  template<class F, class BaseImpl>
113  struct ReturnImpl<5,F,BaseImpl>
114  : public Collect<F,BaseImpl>
115  {
116  typedef typename boost::function<F>::arg1_type arg1_type;
117  typedef typename boost::function<F>::arg2_type arg2_type;
118  typedef typename boost::function<F>::arg3_type arg3_type;
119  typedef typename boost::function<F>::arg4_type arg4_type;
120  typedef typename boost::function<F>::arg5_type arg5_type;
121  virtual ~ReturnImpl() {}
122 
123  };
124 
125  template<class F, class BaseImpl>
126  struct ReturnImpl<6,F,BaseImpl>
127  : public Collect<F,BaseImpl>
128  {
129  typedef typename boost::function<F>::arg1_type arg1_type;
130  typedef typename boost::function<F>::arg2_type arg2_type;
131  typedef typename boost::function<F>::arg3_type arg3_type;
132  typedef typename boost::function<F>::arg4_type arg4_type;
133  typedef typename boost::function<F>::arg5_type arg5_type;
134  typedef typename boost::function<F>::arg6_type arg6_type;
135  virtual ~ReturnImpl() {}
136 
137  };
138 
139  template<class F, class BaseImpl>
140  struct ReturnImpl<7,F,BaseImpl>
141  : public Collect<F,BaseImpl>
142  {
143  typedef typename boost::function<F>::arg1_type arg1_type;
144  typedef typename boost::function<F>::arg2_type arg2_type;
145  typedef typename boost::function<F>::arg3_type arg3_type;
146  typedef typename boost::function<F>::arg4_type arg4_type;
147  typedef typename boost::function<F>::arg5_type arg5_type;
148  typedef typename boost::function<F>::arg6_type arg6_type;
149  typedef typename boost::function<F>::arg7_type arg7_type;
150  virtual ~ReturnImpl() {}
151 
152  };
153  }
154 }
155 #endif
boost::function< F >::arg1_type arg1_type
Definition: Return.hpp:74
boost::function< F >::arg2_type arg2_type
Definition: Return.hpp:117
boost::function< F >::arg2_type arg2_type
Definition: Return.hpp:105
boost::function< F >::arg1_type arg1_type
Definition: Return.hpp:143
boost::function< F >::arg3_type arg3_type
Definition: Return.hpp:145
boost::function< F >::arg4_type arg4_type
Definition: Return.hpp:146
boost::function< F >::arg6_type arg6_type
Definition: Return.hpp:148
boost::function< F >::arg2_type arg2_type
Definition: Return.hpp:84
boost::function< F >::arg5_type arg5_type
Definition: Return.hpp:147
boost::function< F >::arg7_type arg7_type
Definition: Return.hpp:149
boost::function< F >::arg4_type arg4_type
Definition: Return.hpp:119
boost::function< F >::arg1_type arg1_type
Definition: Return.hpp:83
boost::function< F >::arg1_type arg1_type
Definition: Return.hpp:129
boost::function< F >::arg5_type arg5_type
Definition: Return.hpp:133
boost::function< F >::arg4_type arg4_type
Definition: Return.hpp:107
boost::function< F >::arg5_type arg5_type
Definition: Return.hpp:120
boost::function< F >::arg3_type arg3_type
Definition: Return.hpp:131
boost::function< F >::arg3_type arg3_type
Definition: Return.hpp:106
boost::function< F >::arg4_type arg4_type
Definition: Return.hpp:132
boost::function< F >::arg2_type arg2_type
Definition: Return.hpp:144
boost::function< F >::arg1_type arg1_type
Definition: Return.hpp:104
boost::function< F >::arg3_type arg3_type
Definition: Return.hpp:118
boost::function< F >::arg2_type arg2_type
Definition: Return.hpp:130
boost::function< F >::arg6_type arg6_type
Definition: Return.hpp:134
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:53
boost::function< F >::arg1_type arg1_type
Definition: Return.hpp:116
boost::function< F >::arg1_type arg1_type
Definition: Return.hpp:93
boost::function< F >::arg2_type arg2_type
Definition: Return.hpp:94
boost::function< F >::result_type result_type
Definition: Return.hpp:73
boost::function< F >::arg3_type arg3_type
Definition: Return.hpp:95


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:35