gmock-generated-internal-utils.h
Go to the documentation of this file.
1 // This file was GENERATED by command:
2 // pump.py gmock-generated-internal-utils.h.pump
3 // DO NOT EDIT BY HAND!!!
4 
5 // Copyright 2007, Google Inc.
6 // All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
10 // met:
11 //
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 // * Redistributions in binary form must reproduce the above
15 // copyright notice, this list of conditions and the following disclaimer
16 // in the documentation and/or other materials provided with the
17 // distribution.
18 // * Neither the name of Google Inc. nor the names of its
19 // contributors may be used to endorse or promote products derived from
20 // this software without specific prior written permission.
21 //
22 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 //
34 // Author: wan@google.com (Zhanyong Wan)
35 
36 // Google Mock - a framework for writing C++ mock classes.
37 //
38 // This file contains template meta-programming utility classes needed
39 // for implementing Google Mock.
40 
41 #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
42 #define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
43 
45 
46 namespace testing
47 {
48 
49 template <typename T>
50 class Matcher;
51 
52 namespace internal
53 {
54 
55 // An IgnoredValue object can be implicitly constructed from ANY value.
56 // This is used in implementing the IgnoreResult(a) action.
57 class IgnoredValue
58 {
59 public:
60  // This constructor template allows any value to be implicitly
61  // converted to IgnoredValue. The object has no data member and
62  // doesn't try to remember anything about the argument. We
63  // deliberately omit the 'explicit' keyword in order to allow the
64  // conversion to be implicit.
65  template <typename T>
66  IgnoredValue(const T & /* ignored */) {} // NOLINT(runtime/explicit)
67 };
68 
69 // MatcherTuple<T>::type is a tuple type where each field is a Matcher
70 // for the corresponding field in tuple type T.
71 template <typename Tuple>
72 struct MatcherTuple;
73 
74 template <>
75 struct MatcherTuple< ::std::tr1::tuple<> >
76 {
77  typedef ::std::tr1::tuple< > type;
78 };
79 
80 template <typename A1>
81 struct MatcherTuple< ::std::tr1::tuple<A1> >
82 {
83  typedef ::std::tr1::tuple<Matcher<A1> > type;
84 };
85 
86 template <typename A1, typename A2>
87 struct MatcherTuple< ::std::tr1::tuple<A1, A2> >
88 {
89  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2> > type;
90 };
91 
92 template <typename A1, typename A2, typename A3>
93 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3> >
94 {
95  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
96 };
97 
98 template <typename A1, typename A2, typename A3, typename A4>
99 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4> >
100 {
101  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>,
103 };
104 
105 template <typename A1, typename A2, typename A3, typename A4, typename A5>
106 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5> >
107 {
108  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
110 };
111 
112 template <typename A1, typename A2, typename A3, typename A4, typename A5,
113  typename A6>
114 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> >
115 {
116  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
118 };
119 
120 template <typename A1, typename A2, typename A3, typename A4, typename A5,
121  typename A6, typename A7>
122 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> >
123 {
124  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
126 };
127 
128 template <typename A1, typename A2, typename A3, typename A4, typename A5,
129  typename A6, typename A7, typename A8>
130 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> >
131 {
132  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
134 };
135 
136 template <typename A1, typename A2, typename A3, typename A4, typename A5,
137  typename A6, typename A7, typename A8, typename A9>
138 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> >
139 {
140  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
142 };
143 
144 template <typename A1, typename A2, typename A3, typename A4, typename A5,
145  typename A6, typename A7, typename A8, typename A9, typename A10>
146 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
147  A10> >
148 {
149  typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
152 };
153 
154 // Template struct Function<F>, where F must be a function type, contains
155 // the following typedefs:
156 //
157 // Result: the function's return type.
158 // ArgumentN: the type of the N-th argument, where N starts with 1.
159 // ArgumentTuple: the tuple type consisting of all parameters of F.
160 // ArgumentMatcherTuple: the tuple type consisting of Matchers for all
161 // parameters of F.
162 // MakeResultVoid: the function type obtained by substituting void
163 // for the return type of F.
164 // MakeResultIgnoredValue:
165 // the function type obtained by substituting Something
166 // for the return type of F.
167 template <typename F>
168 struct Function;
169 
170 template <typename R>
171 struct Function<R()>
172 {
173  typedef R Result;
174  typedef ::std::tr1::tuple<> ArgumentTuple;
176  typedef void MakeResultVoid();
178 };
179 
180 template <typename R, typename A1>
181 struct Function<R(A1)>
182 : Function<R()>
183 {
184  typedef A1 Argument1;
185  typedef ::std::tr1::tuple<A1> ArgumentTuple;
187  typedef void MakeResultVoid(A1);
189 };
190 
191 template <typename R, typename A1, typename A2>
192 struct Function<R(A1, A2)>
193 : Function<R(A1)>
194 {
195  typedef A2 Argument2;
196  typedef ::std::tr1::tuple<A1, A2> ArgumentTuple;
198  typedef void MakeResultVoid(A1, A2);
200 };
201 
202 template <typename R, typename A1, typename A2, typename A3>
203 struct Function<R(A1, A2, A3)>
204 : Function<R(A1, A2)>
205 {
206  typedef A3 Argument3;
207  typedef ::std::tr1::tuple<A1, A2, A3> ArgumentTuple;
209  typedef void MakeResultVoid(A1, A2, A3);
211 };
212 
213 template <typename R, typename A1, typename A2, typename A3, typename A4>
214 struct Function<R(A1, A2, A3, A4)>
215 : Function<R(A1, A2, A3)>
216 {
217  typedef A4 Argument4;
218  typedef ::std::tr1::tuple<A1, A2, A3, A4> ArgumentTuple;
220  typedef void MakeResultVoid(A1, A2, A3, A4);
221  typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4);
222 };
223 
224 template <typename R, typename A1, typename A2, typename A3, typename A4,
225  typename A5>
226 struct Function<R(A1, A2, A3, A4, A5)>
227 : Function<R(A1, A2, A3, A4)>
228 {
229  typedef A5 Argument5;
230  typedef ::std::tr1::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
232  typedef void MakeResultVoid(A1, A2, A3, A4, A5);
233  typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5);
234 };
235 
236 template <typename R, typename A1, typename A2, typename A3, typename A4,
237  typename A5, typename A6>
238 struct Function<R(A1, A2, A3, A4, A5, A6)>
239 : Function<R(A1, A2, A3, A4, A5)>
240 {
241  typedef A6 Argument6;
242  typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
244  typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6);
245  typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6);
246 };
247 
248 template <typename R, typename A1, typename A2, typename A3, typename A4,
249  typename A5, typename A6, typename A7>
250 struct Function<R(A1, A2, A3, A4, A5, A6, A7)>
251 : Function<R(A1, A2, A3, A4, A5, A6)>
252 {
253  typedef A7 Argument7;
254  typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
256  typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7);
257  typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7);
258 };
259 
260 template <typename R, typename A1, typename A2, typename A3, typename A4,
261  typename A5, typename A6, typename A7, typename A8>
262 struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8)>
263 : Function<R(A1, A2, A3, A4, A5, A6, A7)>
264 {
265  typedef A8 Argument8;
266  typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
268  typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8);
269  typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8);
270 };
271 
272 template <typename R, typename A1, typename A2, typename A3, typename A4,
273  typename A5, typename A6, typename A7, typename A8, typename A9>
274 struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
275 : Function<R(A1, A2, A3, A4, A5, A6, A7, A8)>
276 {
277  typedef A9 Argument9;
278  typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
280  typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9);
281  typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
282  A9);
283 };
284 
285 template <typename R, typename A1, typename A2, typename A3, typename A4,
286  typename A5, typename A6, typename A7, typename A8, typename A9,
287  typename A10>
288 struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
289 : Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
290 {
291  typedef A10 Argument10;
292  typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
295  typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
296  typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
297  A9, A10);
298 };
299 
300 } // namespace internal
301 
302 } // namespace testing
303 
304 #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 > > type
MatcherTuple< ArgumentTuple >::type ArgumentMatcherTuple
IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 >, Matcher< A4 >, Matcher< A5 > > type
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 >, Matcher< A4 >, Matcher< A5 >, Matcher< A6 >, Matcher< A7 >, Matcher< A8 > > type
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 >, Matcher< A4 >, Matcher< A5 >, Matcher< A6 >, Matcher< A7 >, Matcher< A8 >, Matcher< A9 >, Matcher< A10 > > type
::std::tr1::tuple< A1, A2, A3, A4, A5, A6, A7, A8 > ArgumentTuple
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 >, Matcher< A4 >, Matcher< A5 >, Matcher< A6 > > type
MatcherTuple< ArgumentTuple >::type ArgumentMatcherTuple
MatcherTuple< ArgumentTuple >::type ArgumentMatcherTuple
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 >, Matcher< A4 > > type
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 >, Matcher< A4 >, Matcher< A5 >, Matcher< A6 >, Matcher< A7 > > type
MatcherTuple< ArgumentTuple >::type ArgumentMatcherTuple
::std::tr1::tuple< A1, A2, A3, A4, A5, A6, A7, A8, A9 > ArgumentTuple
::std::tr1::tuple< A1, A2, A3, A4, A5, A6, A7, A8, A9, A10 > ArgumentTuple
::std::tr1::tuple< Matcher< A1 >, Matcher< A2 >, Matcher< A3 >, Matcher< A4 >, Matcher< A5 >, Matcher< A6 >, Matcher< A7 >, Matcher< A8 >, Matcher< A9 > > type


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:06:05