1//
2// Tuple.h
3//
4// Library: Foundation
5// Package: Core
6// Module: Tuple
7//
8// Definition of the Tuple class.
9//
10// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
11// and Contributors.
12//
13// SPDX-License-Identifier: BSL-1.0
14//
15
16
17#ifndef Foundation_Tuple_INCLUDED
18#define Foundation_Tuple_INCLUDED
19
20
21// TODO: std::tuple doesn't accept partial initialization
22
23//#define POCO_CXX11_TUPLE_FINISHED
24
25
26#include "Poco/Foundation.h"
27#if defined(POCO_CXX11_TUPLE_FINISHED)
28#include <tuple>
29#endif
30#include "Poco/TypeList.h"
31
32
33namespace Poco {
34
35
36#if defined(POCO_CXX11_TUPLE_FINISHED)
37
38template<class ...Types>
39class Tuple : public std::tuple<Types...>
40{
41public:
42 //using std::tuple<Types...>::tuple;
43
44 Tuple() : std::tuple<Types...>()
45 {
46
47 }
48
49 /*
50 Tuple(Types... args) : std::tuple<Types...>(args...)
51 {
52
53 }
54 */
55
56 template < typename ...Args >
57 Tuple(Args&&... args) : std::tuple<Types...>(std::forward<Args>(args)...)
58 {
59
60 }
61
62 //Tuple(const Tuple<Types...> &other) = delete;
63 //Tuple(const Tuple<Types...> &&other) = delete;
64
65 /*
66 Tuple(Types&... args) : std::tuple<Types...>(args...)
67 {
68
69 }
70
71 Tuple(Types&&... args) : std::tuple<Types...>(args...)
72 {
73
74 }
75 */
76
77 enum TupleLengthType
78 {
79 length = std::tuple_size<std::tuple<Types...>>::value
80 };
81
82 template <int N, typename C>
83 void set(C value)
84 {
85 std::get<N>(*this) = value;
86 }
87
88 template <int N>
89 typename std::tuple_element<N, std::tuple<Types...>>::type& get()
90 {
91 return std::get<N>(*this);
92 }
93};
94
95
96#else
97
98
99#if defined(_MSC_VER)
100#define POCO_TYPEWRAPPER_DEFAULTVALUE(T) TypeWrapper<T>::TYPE()
101#else
102#define POCO_TYPEWRAPPER_DEFAULTVALUE(T) typename TypeWrapper<T>::TYPE()
103#endif
104
105
106template <class T0,
107 class T1 = NullTypeList,
108 class T2 = NullTypeList,
109 class T3 = NullTypeList,
110 class T4 = NullTypeList,
111 class T5 = NullTypeList,
112 class T6 = NullTypeList,
113 class T7 = NullTypeList,
114 class T8 = NullTypeList,
115 class T9 = NullTypeList,
116 class T10 = NullTypeList,
117 class T11 = NullTypeList,
118 class T12 = NullTypeList,
119 class T13 = NullTypeList,
120 class T14 = NullTypeList,
121 class T15 = NullTypeList,
122 class T16 = NullTypeList,
123 class T17 = NullTypeList,
124 class T18 = NullTypeList,
125 class T19 = NullTypeList>
126struct Tuple
127{
128 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType Type;
129
130 enum TupleLengthType
131 {
132 length = Type::length
133 };
134
135 Tuple():_data()
136 {
137 }
138
139 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
140 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
141 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
142 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
143 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
144 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
145 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
146 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
147 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
148 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
149 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
150 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
151 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
152 typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
153 typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
154 typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
155 typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16),
156 typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAULTVALUE(T17),
157 typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAULTVALUE(T18),
158 typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER_DEFAULTVALUE(T19)):
159 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
160 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
161 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
162 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
163 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
164 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
165 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
166 (t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
167 (t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
168 (t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
169 (t10, typename TypeListType<T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
170 (t11, typename TypeListType<T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
171 (t12, typename TypeListType<T13,T14,T15,T16,T17,T18,T19>::HeadType
172 (t13, typename TypeListType<T14,T15,T16,T17,T18,T19>::HeadType
173 (t14, typename TypeListType<T15,T16,T17,T18,T19>::HeadType
174 (t15, typename TypeListType<T16,T17,T18,T19>::HeadType
175 (t16, typename TypeListType<T17,T18,T19>::HeadType
176 (t17, typename TypeListType<T18,T19>::HeadType
177 (t18, typename TypeListType<T19>::HeadType
178 (t19, NullTypeList()))))))))))))))))))))
179 {
180 }
181
182 template <int N>
183 typename TypeGetter<N, Type>::ConstHeadType& get() const
184 {
185 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
186 }
187
188 template <int N>
189 typename TypeGetter<N, Type>::HeadType& get()
190 {
191 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
192 }
193
194 template <int N>
195 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
196 {
197 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
198 }
199
200 bool operator == (const Tuple& other) const
201 {
202 return _data == other._data;
203 }
204
205 bool operator != (const Tuple& other) const
206 {
207 return !(_data == other._data);
208 }
209
210 bool operator < (const Tuple& other) const
211 {
212 return _data < other._data;
213 }
214
215private:
216 Type _data;
217};
218
219
220template <class T0,
221 class T1,
222 class T2,
223 class T3,
224 class T4,
225 class T5,
226 class T6,
227 class T7,
228 class T8,
229 class T9,
230 class T10,
231 class T11,
232 class T12,
233 class T13,
234 class T14,
235 class T15,
236 class T16,
237 class T17,
238 class T18>
239struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,NullTypeList>
240{
241 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType Type;
242
243 enum TupleLengthType
244 {
245 length = Type::length
246 };
247
248 Tuple():_data()
249 {
250 }
251
252 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
253 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
254 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
255 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
256 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
257 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
258 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
259 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
260 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
261 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
262 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
263 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
264 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
265 typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
266 typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
267 typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
268 typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16),
269 typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAULTVALUE(T17),
270 typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAULTVALUE(T18)):
271 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
272 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
273 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
274 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
275 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
276 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
277 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
278 (t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
279 (t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
280 (t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
281 (t10, typename TypeListType<T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
282 (t11, typename TypeListType<T12,T13,T14,T15,T16,T17,T18>::HeadType
283 (t12, typename TypeListType<T13,T14,T15,T16,T17,T18>::HeadType
284 (t13, typename TypeListType<T14,T15,T16,T17,T18>::HeadType
285 (t14, typename TypeListType<T15,T16,T17,T18>::HeadType
286 (t15, typename TypeListType<T16,T17,T18>::HeadType
287 (t16, typename TypeListType<T17,T18>::HeadType
288 (t17, typename TypeListType<T18>::HeadType
289 (t18, NullTypeList())))))))))))))))))))
290 {
291 }
292
293 template <int N>
294 typename TypeGetter<N, Type>::ConstHeadType& get() const
295 {
296 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
297 }
298
299 template <int N>
300 typename TypeGetter<N, Type>::HeadType& get()
301 {
302 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
303 }
304
305 template <int N>
306 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
307 {
308 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
309 }
310
311 bool operator == (const Tuple& other) const
312 {
313 return _data == other._data;
314 }
315
316 bool operator != (const Tuple& other) const
317 {
318 return !(_data == other._data);
319 }
320
321 bool operator < (const Tuple& other) const
322 {
323 return _data < other._data;
324 }
325
326private:
327 Type _data;
328};
329
330
331template <class T0,
332 class T1,
333 class T2,
334 class T3,
335 class T4,
336 class T5,
337 class T6,
338 class T7,
339 class T8,
340 class T9,
341 class T10,
342 class T11,
343 class T12,
344 class T13,
345 class T14,
346 class T15,
347 class T16,
348 class T17>
349struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,NullTypeList>
350{
351 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType Type;
352
353 enum TupleLengthType
354 {
355 length = Type::length
356 };
357
358 Tuple():_data()
359 {
360 }
361
362 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
363 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
364 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
365 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
366 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
367 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
368 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
369 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
370 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
371 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
372 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
373 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
374 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
375 typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
376 typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
377 typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
378 typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16),
379 typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAULTVALUE(T17)):
380 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
381 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
382 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
383 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
384 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
385 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
386 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
387 (t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
388 (t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
389 (t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
390 (t10, typename TypeListType<T11,T12,T13,T14,T15,T16,T17>::HeadType
391 (t11, typename TypeListType<T12,T13,T14,T15,T16,T17>::HeadType
392 (t12, typename TypeListType<T13,T14,T15,T16,T17>::HeadType
393 (t13, typename TypeListType<T14,T15,T16,T17>::HeadType
394 (t14, typename TypeListType<T15,T16,T17>::HeadType
395 (t15, typename TypeListType<T16,T17>::HeadType
396 (t16, typename TypeListType<T17>::HeadType
397 (t17, NullTypeList()))))))))))))))))))
398 {
399 }
400
401 template <int N>
402 typename TypeGetter<N, Type>::ConstHeadType& get() const
403 {
404 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
405 }
406
407 template <int N>
408 typename TypeGetter<N, Type>::HeadType& get()
409 {
410 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
411 }
412
413 template <int N>
414 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
415 {
416 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
417 }
418
419 bool operator == (const Tuple& other) const
420 {
421 return _data == other._data;
422 }
423
424 bool operator != (const Tuple& other) const
425 {
426 return !(_data == other._data);
427 }
428
429 bool operator < (const Tuple& other) const
430 {
431 return _data < other._data;
432 }
433
434private:
435 Type _data;
436};
437
438
439template <class T0,
440 class T1,
441 class T2,
442 class T3,
443 class T4,
444 class T5,
445 class T6,
446 class T7,
447 class T8,
448 class T9,
449 class T10,
450 class T11,
451 class T12,
452 class T13,
453 class T14,
454 class T15,
455 class T16>
456struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,NullTypeList>
457{
458 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType Type;
459
460 enum TupleLengthType
461 {
462 length = Type::length
463 };
464
465 Tuple():_data()
466 {
467 }
468
469 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
470 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
471 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
472 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
473 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
474 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
475 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
476 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
477 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
478 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
479 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
480 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
481 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
482 typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
483 typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
484 typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
485 typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16)):
486 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
487 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
488 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
489 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
490 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
491 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
492 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
493 (t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
494 (t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
495 (t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16>::HeadType
496 (t10, typename TypeListType<T11,T12,T13,T14,T15,T16>::HeadType
497 (t11, typename TypeListType<T12,T13,T14,T15,T16>::HeadType
498 (t12, typename TypeListType<T13,T14,T15,T16>::HeadType
499 (t13, typename TypeListType<T14,T15,T16>::HeadType
500 (t14, typename TypeListType<T15,T16>::HeadType
501 (t15, typename TypeListType<T16>::HeadType
502 (t16, NullTypeList())))))))))))))))))
503 {
504 }
505
506 template <int N>
507 typename TypeGetter<N, Type>::ConstHeadType& get() const
508 {
509 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
510 }
511
512 template <int N>
513 typename TypeGetter<N, Type>::HeadType& get()
514 {
515 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
516 }
517
518 template <int N>
519 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
520 {
521 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
522 }
523
524 bool operator == (const Tuple& other) const
525 {
526 return _data == other._data;
527 }
528
529 bool operator != (const Tuple& other) const
530 {
531 return !(_data == other._data);
532 }
533
534 bool operator < (const Tuple& other) const
535 {
536 return _data < other._data;
537 }
538
539private:
540 Type _data;
541};
542
543
544template <class T0,
545 class T1,
546 class T2,
547 class T3,
548 class T4,
549 class T5,
550 class T6,
551 class T7,
552 class T8,
553 class T9,
554 class T10,
555 class T11,
556 class T12,
557 class T13,
558 class T14,
559 class T15>
560struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,NullTypeList>
561{
562 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType Type;
563
564 enum TupleLengthType
565 {
566 length = Type::length
567 };
568
569 Tuple():_data()
570 {
571 }
572
573 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
574 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
575 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
576 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
577 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
578 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
579 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
580 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
581 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
582 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
583 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
584 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
585 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
586 typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
587 typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
588 typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15)):
589 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
590 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
591 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
592 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
593 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
594 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
595 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
596 (t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
597 (t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15>::HeadType
598 (t9, typename TypeListType<T10,T11,T12,T13,T14,T15>::HeadType
599 (t10, typename TypeListType<T11,T12,T13,T14,T15>::HeadType
600 (t11, typename TypeListType<T12,T13,T14,T15>::HeadType
601 (t12, typename TypeListType<T13,T14,T15>::HeadType
602 (t13, typename TypeListType<T14,T15>::HeadType
603 (t14, typename TypeListType<T15>::HeadType
604 (t15, NullTypeList()))))))))))))))))
605 {
606 }
607
608 template <int N>
609 typename TypeGetter<N, Type>::ConstHeadType& get() const
610 {
611 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
612 }
613
614 template <int N>
615 typename TypeGetter<N, Type>::HeadType& get()
616 {
617 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
618 }
619
620 template <int N>
621 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
622 {
623 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
624 }
625
626 bool operator == (const Tuple& other) const
627 {
628 return _data == other._data;
629 }
630
631 bool operator != (const Tuple& other) const
632 {
633 return !(_data == other._data);
634 }
635
636 bool operator < (const Tuple& other) const
637 {
638 return _data < other._data;
639 }
640
641private:
642 Type _data;
643};
644
645
646template <class T0,
647 class T1,
648 class T2,
649 class T3,
650 class T4,
651 class T5,
652 class T6,
653 class T7,
654 class T8,
655 class T9,
656 class T10,
657 class T11,
658 class T12,
659 class T13,
660 class T14>
661struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,NullTypeList>
662{
663 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType Type;
664
665 enum TupleLengthType
666 {
667 length = Type::length
668 };
669
670 Tuple():_data()
671 {
672 }
673
674 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
675 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
676 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
677 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
678 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
679 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
680 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
681 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
682 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
683 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
684 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
685 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
686 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
687 typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
688 typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14)):
689 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
690 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
691 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
692 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
693 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
694 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
695 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
696 (t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14>::HeadType
697 (t8, typename TypeListType<T9,T10,T11,T12,T13,T14>::HeadType
698 (t9, typename TypeListType<T10,T11,T12,T13,T14>::HeadType
699 (t10, typename TypeListType<T11,T12,T13,T14>::HeadType
700 (t11, typename TypeListType<T12,T13,T14>::HeadType
701 (t12, typename TypeListType<T13,T14>::HeadType
702 (t13, typename TypeListType<T14>::HeadType
703 (t14, NullTypeList())))))))))))))))
704 {
705 }
706
707 template <int N>
708 typename TypeGetter<N, Type>::ConstHeadType& get() const
709 {
710 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
711 }
712
713 template <int N>
714 typename TypeGetter<N, Type>::HeadType& get()
715 {
716 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
717 }
718
719 template <int N>
720 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
721 {
722 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
723 }
724
725 bool operator == (const Tuple& other) const
726 {
727 return _data == other._data;
728 }
729
730 bool operator != (const Tuple& other) const
731 {
732 return !(_data == other._data);
733 }
734
735 bool operator < (const Tuple& other) const
736 {
737 return _data < other._data;
738 }
739
740private:
741 Type _data;
742};
743
744
745template <class T0,
746 class T1,
747 class T2,
748 class T3,
749 class T4,
750 class T5,
751 class T6,
752 class T7,
753 class T8,
754 class T9,
755 class T10,
756 class T11,
757 class T12,
758 class T13>
759struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,NullTypeList>
760{
761 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType Type;
762
763 enum TupleLengthType
764 {
765 length = Type::length
766 };
767
768 Tuple():_data()
769 {
770 }
771
772 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
773 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
774 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
775 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
776 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
777 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
778 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
779 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
780 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
781 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
782 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
783 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
784 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
785 typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13)):
786 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
787 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
788 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
789 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
790 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
791 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
792 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13>::HeadType
793 (t7, typename TypeListType<T8,T9,T10,T11,T12,T13>::HeadType
794 (t8, typename TypeListType<T9,T10,T11,T12,T13>::HeadType
795 (t9, typename TypeListType<T10,T11,T12,T13>::HeadType
796 (t10, typename TypeListType<T11,T12,T13>::HeadType
797 (t11, typename TypeListType<T12,T13>::HeadType
798 (t12, typename TypeListType<T13>::HeadType
799 (t13, NullTypeList()))))))))))))))
800 {
801 }
802
803 template <int N>
804 typename TypeGetter<N, Type>::ConstHeadType& get() const
805 {
806 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
807 }
808
809 template <int N>
810 typename TypeGetter<N, Type>::HeadType& get()
811 {
812 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
813 }
814
815 template <int N>
816 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
817 {
818 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
819 }
820
821 bool operator == (const Tuple& other) const
822 {
823 return _data == other._data;
824 }
825
826 bool operator != (const Tuple& other) const
827 {
828 return !(_data == other._data);
829 }
830
831 bool operator < (const Tuple& other) const
832 {
833 return _data < other._data;
834 }
835
836private:
837 Type _data;
838};
839
840
841template <class T0,
842 class T1,
843 class T2,
844 class T3,
845 class T4,
846 class T5,
847 class T6,
848 class T7,
849 class T8,
850 class T9,
851 class T10,
852 class T11,
853 class T12>
854struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12, NullTypeList>
855{
856 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType Type;
857
858 enum TupleLengthType
859 {
860 length = Type::length
861 };
862
863 Tuple():_data()
864 {
865 }
866
867 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
868 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
869 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
870 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
871 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
872 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
873 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
874 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
875 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
876 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
877 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
878 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
879 typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12)):
880 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
881 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
882 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
883 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
884 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
885 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12>::HeadType
886 (t6, typename TypeListType<T7,T8,T9,T10,T11,T12>::HeadType
887 (t7, typename TypeListType<T8,T9,T10,T11,T12>::HeadType
888 (t8, typename TypeListType<T9,T10,T11,T12>::HeadType
889 (t9, typename TypeListType<T10,T11,T12>::HeadType
890 (t10, typename TypeListType<T11,T12>::HeadType
891 (t11, typename TypeListType<T12>::HeadType
892 (t12, NullTypeList())))))))))))))
893 {
894 }
895
896 template <int N>
897 typename TypeGetter<N, Type>::ConstHeadType& get() const
898 {
899 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
900 }
901
902 template <int N>
903 typename TypeGetter<N, Type>::HeadType& get()
904 {
905 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
906 }
907
908 template <int N>
909 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
910 {
911 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
912 }
913
914 bool operator == (const Tuple& other) const
915 {
916 return _data == other._data;
917 }
918
919 bool operator != (const Tuple& other) const
920 {
921 return !(_data == other._data);
922 }
923
924 bool operator < (const Tuple& other) const
925 {
926 return _data < other._data;
927 }
928
929private:
930 Type _data;
931};
932
933
934template <class T0,
935 class T1,
936 class T2,
937 class T3,
938 class T4,
939 class T5,
940 class T6,
941 class T7,
942 class T8,
943 class T9,
944 class T10,
945 class T11>
946struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,NullTypeList>
947{
948 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType Type;
949
950 enum TupleLengthType
951 {
952 length = Type::length
953 };
954
955 Tuple():_data()
956 {
957 }
958
959 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
960 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
961 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
962 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
963 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
964 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
965 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
966 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
967 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
968 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
969 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
970 typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11)):
971 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
972 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
973 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
974 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
975 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11>::HeadType
976 (t5, typename TypeListType<T6,T7,T8,T9,T10,T11>::HeadType
977 (t6, typename TypeListType<T7,T8,T9,T10,T11>::HeadType
978 (t7, typename TypeListType<T8,T9,T10,T11>::HeadType
979 (t8, typename TypeListType<T9,T10,T11>::HeadType
980 (t9, typename TypeListType<T10,T11>::HeadType
981 (t10, typename TypeListType<T11>::HeadType
982 (t11, NullTypeList()))))))))))))
983 {
984 }
985
986 template <int N>
987 typename TypeGetter<N, Type>::ConstHeadType& get() const
988 {
989 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
990 }
991
992 template <int N>
993 typename TypeGetter<N, Type>::HeadType& get()
994 {
995 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
996 }
997
998 template <int N>
999 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1000 {
1001 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1002 }
1003
1004 bool operator == (const Tuple& other) const
1005 {
1006 return _data == other._data;
1007 }
1008
1009 bool operator != (const Tuple& other) const
1010 {
1011 return !(_data == other._data);
1012 }
1013
1014 bool operator < (const Tuple& other) const
1015 {
1016 return _data < other._data;
1017 }
1018
1019private:
1020 Type _data;
1021};
1022
1023
1024template <class T0,
1025 class T1,
1026 class T2,
1027 class T3,
1028 class T4,
1029 class T5,
1030 class T6,
1031 class T7,
1032 class T8,
1033 class T9,
1034 class T10>
1035struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7,T8,T9,T10, NullTypeList>
1036{
1037 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::HeadType Type;
1038
1039 enum TupleLengthType
1040 {
1041 length = Type::length
1042 };
1043
1044 Tuple():_data()
1045 {
1046 }
1047
1048 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1049 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1050 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1051 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
1052 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
1053 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
1054 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
1055 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
1056 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
1057 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
1058 typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10)):
1059 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::HeadType
1060 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10>::HeadType
1061 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10>::HeadType
1062 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10>::HeadType
1063 (t4, typename TypeListType<T5,T6,T7,T8,T9,T10>::HeadType
1064 (t5, typename TypeListType<T6,T7,T8,T9,T10>::HeadType
1065 (t6, typename TypeListType<T7,T8,T9,T10>::HeadType
1066 (t7, typename TypeListType<T8,T9,T10>::HeadType
1067 (t8, typename TypeListType<T9,T10>::HeadType
1068 (t9, typename TypeListType<T10>::HeadType
1069 (t10, NullTypeList())))))))))))
1070 {
1071 }
1072
1073 template <int N>
1074 typename TypeGetter<N, Type>::ConstHeadType& get() const
1075 {
1076 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1077 }
1078
1079 template <int N>
1080 typename TypeGetter<N, Type>::HeadType& get()
1081 {
1082 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1083 }
1084
1085 template <int N>
1086 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1087 {
1088 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1089 }
1090
1091 bool operator == (const Tuple& other) const
1092 {
1093 return _data == other._data;
1094 }
1095
1096 bool operator != (const Tuple& other) const
1097 {
1098 return !(_data == other._data);
1099 }
1100
1101 bool operator < (const Tuple& other) const
1102 {
1103 return _data < other._data;
1104 }
1105
1106private:
1107 Type _data;
1108};
1109
1110
1111template <class T0,
1112 class T1,
1113 class T2,
1114 class T3,
1115 class T4,
1116 class T5,
1117 class T6,
1118 class T7,
1119 class T8,
1120 class T9>
1121struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7,T8,T9, NullTypeList>
1122{
1123 typedef typename TypeListType<T0, T1,T2,T3,T4,T5,T6,T7,T8,T9>::HeadType Type;
1124
1125 enum TupleLengthType
1126 {
1127 length = Type::length
1128 };
1129
1130 Tuple():_data()
1131 {
1132 }
1133
1134 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1135 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1136 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1137 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
1138 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
1139 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
1140 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
1141 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
1142 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
1143 typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9)):
1144 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9>::HeadType
1145 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9>::HeadType
1146 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9>::HeadType
1147 (t3, typename TypeListType<T4,T5,T6,T7,T8,T9>::HeadType
1148 (t4, typename TypeListType<T5,T6,T7,T8,T9>::HeadType
1149 (t5, typename TypeListType<T6,T7,T8,T9>::HeadType
1150 (t6, typename TypeListType<T7,T8,T9>::HeadType
1151 (t7, typename TypeListType<T8,T9>::HeadType
1152 (t8, typename TypeListType<T9>::HeadType
1153 (t9, NullTypeList()))))))))))
1154 {
1155 }
1156
1157 template <int N>
1158 typename TypeGetter<N, Type>::ConstHeadType& get() const
1159 {
1160 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1161 }
1162
1163 template <int N>
1164 typename TypeGetter<N, Type>::HeadType& get()
1165 {
1166 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1167 }
1168
1169 template <int N>
1170 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1171 {
1172 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1173 }
1174
1175 bool operator == (const Tuple& other) const
1176 {
1177 return _data == other._data;
1178 }
1179
1180 bool operator != (const Tuple& other) const
1181 {
1182 return !(_data == other._data);
1183 }
1184
1185 bool operator < (const Tuple& other) const
1186 {
1187 return _data < other._data;
1188 }
1189
1190private:
1191 Type _data;
1192};
1193
1194
1195template <class T0,
1196 class T1,
1197 class T2,
1198 class T3,
1199 class T4,
1200 class T5,
1201 class T6,
1202 class T7,
1203 class T8>
1204struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7,T8, NullTypeList>
1205{
1206 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8>::HeadType Type;
1207
1208 enum TupleLengthType
1209 {
1210 length = Type::length
1211 };
1212
1213 Tuple():_data()
1214 {
1215 }
1216
1217 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1218 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1219 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1220 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
1221 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
1222 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
1223 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
1224 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
1225 typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8)):
1226 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8>::HeadType
1227 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8>::HeadType
1228 (t2, typename TypeListType<T3,T4,T5,T6,T7,T8>::HeadType
1229 (t3, typename TypeListType<T4,T5,T6,T7,T8>::HeadType
1230 (t4, typename TypeListType<T5,T6,T7,T8>::HeadType
1231 (t5, typename TypeListType<T6,T7,T8>::HeadType
1232 (t6, typename TypeListType<T7,T8>::HeadType
1233 (t7, typename TypeListType<T8>::HeadType
1234 (t8, NullTypeList())))))))))
1235 {
1236 }
1237
1238 template <int N>
1239 typename TypeGetter<N, Type>::ConstHeadType& get() const
1240 {
1241 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1242 }
1243
1244 template <int N>
1245 typename TypeGetter<N, Type>::HeadType& get()
1246 {
1247 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1248 }
1249
1250 template <int N>
1251 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1252 {
1253 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1254 }
1255
1256 bool operator == (const Tuple& other) const
1257 {
1258 return _data == other._data;
1259 }
1260
1261 bool operator != (const Tuple& other) const
1262 {
1263 return !(_data == other._data);
1264 }
1265
1266 bool operator < (const Tuple& other) const
1267 {
1268 return _data < other._data;
1269 }
1270
1271private:
1272 Type _data;
1273};
1274
1275
1276template <class T0,
1277 class T1,
1278 class T2,
1279 class T3,
1280 class T4,
1281 class T5,
1282 class T6,
1283 class T7>
1284struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7, NullTypeList>
1285{
1286 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7>::HeadType Type;
1287
1288 enum TupleLengthType
1289 {
1290 length = Type::length
1291 };
1292
1293 Tuple():_data()
1294 {
1295 }
1296
1297 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1298 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1299 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1300 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
1301 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
1302 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
1303 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
1304 typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7)):
1305 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7>::HeadType
1306 (t1, typename TypeListType<T2,T3,T4,T5,T6,T7>::HeadType
1307 (t2, typename TypeListType<T3,T4,T5,T6,T7>::HeadType
1308 (t3, typename TypeListType<T4,T5,T6,T7>::HeadType
1309 (t4, typename TypeListType<T5,T6,T7>::HeadType
1310 (t5, typename TypeListType<T6,T7>::HeadType
1311 (t6, typename TypeListType<T7>::HeadType
1312 (t7, NullTypeList()))))))))
1313 {
1314 }
1315
1316 template <int N>
1317 typename TypeGetter<N, Type>::ConstHeadType& get() const
1318 {
1319 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1320 }
1321
1322 template <int N>
1323 typename TypeGetter<N, Type>::HeadType& get()
1324 {
1325 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1326 }
1327
1328 template <int N>
1329 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1330 {
1331 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1332 }
1333
1334 bool operator == (const Tuple& other) const
1335 {
1336 return _data == other._data;
1337 }
1338
1339 bool operator != (const Tuple& other) const
1340 {
1341 return !(_data == other._data);
1342 }
1343
1344 bool operator < (const Tuple& other) const
1345 {
1346 return _data < other._data;
1347 }
1348
1349private:
1350 Type _data;
1351};
1352
1353
1354template <class T0,
1355 class T1,
1356 class T2,
1357 class T3,
1358 class T4,
1359 class T5,
1360 class T6>
1361struct Tuple<T0, T1,T2,T3,T4,T5,T6, NullTypeList>
1362{
1363 typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6>::HeadType Type;
1364
1365 enum TupleLengthType
1366 {
1367 length = Type::length
1368 };
1369
1370 Tuple():_data()
1371 {
1372 }
1373
1374 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1375 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1376 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1377 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
1378 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
1379 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
1380 typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6)):
1381 _data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6>::HeadType
1382 (t1, typename TypeListType<T2,T3,T4,T5,T6>::HeadType
1383 (t2, typename TypeListType<T3,T4,T5,T6>::HeadType
1384 (t3, typename TypeListType<T4,T5,T6>::HeadType
1385 (t4, typename TypeListType<T5,T6>::HeadType
1386 (t5, typename TypeListType<T6>::HeadType
1387 (t6, NullTypeList())))))))
1388 {
1389 }
1390
1391 template <int N>
1392 typename TypeGetter<N, Type>::ConstHeadType& get() const
1393 {
1394 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1395 }
1396
1397 template <int N>
1398 typename TypeGetter<N, Type>::HeadType& get()
1399 {
1400 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1401 }
1402
1403 template <int N>
1404 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1405 {
1406 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1407 }
1408
1409 bool operator == (const Tuple& other) const
1410 {
1411 return _data == other._data;
1412 }
1413
1414 bool operator != (const Tuple& other) const
1415 {
1416 return !(_data == other._data);
1417 }
1418
1419 bool operator < (const Tuple& other) const
1420 {
1421 return _data < other._data;
1422 }
1423
1424private:
1425 Type _data;
1426};
1427
1428
1429template <class T0,
1430 class T1,
1431 class T2,
1432 class T3,
1433 class T4,
1434 class T5>
1435struct Tuple<T0, T1,T2,T3,T4,T5, NullTypeList>
1436{
1437 typedef typename TypeListType<T0,T1,T2,T3,T4,T5>::HeadType Type;
1438
1439 enum TupleLengthType
1440 {
1441 length = Type::length
1442 };
1443
1444 Tuple():_data()
1445 {
1446 }
1447
1448 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1449 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1450 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1451 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
1452 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
1453 typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5)):
1454 _data(t0, typename TypeListType<T1,T2,T3,T4,T5>::HeadType
1455 (t1, typename TypeListType<T2,T3,T4,T5>::HeadType
1456 (t2, typename TypeListType<T3,T4,T5>::HeadType
1457 (t3, typename TypeListType<T4,T5>::HeadType
1458 (t4, typename TypeListType<T5>::HeadType
1459 (t5, NullTypeList()))))))
1460 {
1461 }
1462
1463 template <int N>
1464 typename TypeGetter<N, Type>::ConstHeadType& get() const
1465 {
1466 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1467 }
1468
1469 template <int N>
1470 typename TypeGetter<N, Type>::HeadType& get()
1471 {
1472 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1473 }
1474
1475 template <int N>
1476 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1477 {
1478 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1479 }
1480
1481 bool operator == (const Tuple& other) const
1482 {
1483 return _data == other._data;
1484 }
1485
1486 bool operator != (const Tuple& other) const
1487 {
1488 return !(_data == other._data);
1489 }
1490
1491 bool operator < (const Tuple& other) const
1492 {
1493 return _data < other._data;
1494 }
1495
1496private:
1497 Type _data;
1498};
1499
1500
1501template <class T0,
1502 class T1,
1503 class T2,
1504 class T3,
1505 class T4>
1506struct Tuple<T0, T1,T2,T3,T4, NullTypeList>
1507{
1508 typedef typename TypeListType<T0,T1,T2,T3,T4>::HeadType Type;
1509
1510 enum TupleLengthType
1511 {
1512 length = Type::length
1513 };
1514
1515 Tuple():_data()
1516 {
1517 }
1518
1519 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1520 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1521 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1522 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
1523 typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4)):
1524 _data(t0, typename TypeListType<T1,T2,T3,T4>::HeadType
1525 (t1, typename TypeListType<T2,T3,T4>::HeadType
1526 (t2, typename TypeListType<T3,T4>::HeadType
1527 (t3, typename TypeListType<T4>::HeadType
1528 (t4, NullTypeList())))))
1529 {
1530 }
1531
1532 template <int N>
1533 typename TypeGetter<N, Type>::ConstHeadType& get() const
1534 {
1535 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1536 }
1537
1538 template <int N>
1539 typename TypeGetter<N, Type>::HeadType& get()
1540 {
1541 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1542 }
1543
1544 template <int N>
1545 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1546 {
1547 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1548 }
1549
1550 bool operator == (const Tuple& other) const
1551 {
1552 return _data == other._data;
1553 }
1554
1555 bool operator != (const Tuple& other) const
1556 {
1557 return !(_data == other._data);
1558 }
1559
1560 bool operator < (const Tuple& other) const
1561 {
1562 return _data < other._data;
1563 }
1564
1565private:
1566 Type _data;
1567};
1568
1569
1570template <class T0,
1571 class T1,
1572 class T2,
1573 class T3>
1574struct Tuple<T0, T1,T2,T3, NullTypeList>
1575{
1576 typedef typename TypeListType<T0,T1,T2,T3>::HeadType Type;
1577
1578 enum TupleLengthType
1579 {
1580 length = Type::length
1581 };
1582
1583 Tuple():_data()
1584 {
1585 }
1586
1587 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1588 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1589 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
1590 typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3)):
1591 _data(t0, typename TypeListType<T1,T2,T3>::HeadType
1592 (t1, typename TypeListType<T2,T3>::HeadType
1593 (t2, typename TypeListType<T3>::HeadType
1594 (t3, NullTypeList()))))
1595 {
1596 }
1597
1598 template <int N>
1599 typename TypeGetter<N, Type>::ConstHeadType& get() const
1600 {
1601 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1602 }
1603
1604 template <int N>
1605 typename TypeGetter<N, Type>::HeadType& get()
1606 {
1607 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1608 }
1609
1610 template <int N>
1611 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1612 {
1613 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1614 }
1615
1616 bool operator == (const Tuple& other) const
1617 {
1618 return _data == other._data;
1619 }
1620
1621 bool operator != (const Tuple& other) const
1622 {
1623 return !(_data == other._data);
1624 }
1625
1626 bool operator < (const Tuple& other) const
1627 {
1628 return _data < other._data;
1629 }
1630
1631private:
1632 Type _data;
1633};
1634
1635
1636template <class T0,
1637 class T1,
1638 class T2>
1639struct Tuple<T0, T1,T2, NullTypeList>
1640{
1641 typedef typename TypeListType<T0,T1,T2>::HeadType Type;
1642
1643 enum TupleLengthType
1644 {
1645 length = Type::length
1646 };
1647
1648 Tuple():_data()
1649 {
1650 }
1651
1652 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1653 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
1654 typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2)):
1655 _data(t0, typename TypeListType<T1,T2>::HeadType
1656 (t1, typename TypeListType<T2>::HeadType
1657 (t2, NullTypeList())))
1658 {
1659 }
1660
1661 template <int N>
1662 typename TypeGetter<N, Type>::ConstHeadType& get() const
1663 {
1664 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1665 }
1666
1667 template <int N>
1668 typename TypeGetter<N, Type>::HeadType& get()
1669 {
1670 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1671 }
1672
1673 template <int N>
1674 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1675 {
1676 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1677 }
1678
1679 bool operator == (const Tuple& other) const
1680 {
1681 return _data == other._data;
1682 }
1683
1684 bool operator != (const Tuple& other) const
1685 {
1686 return !(_data == other._data);
1687 }
1688
1689 bool operator < (const Tuple& other) const
1690 {
1691 return _data < other._data;
1692 }
1693
1694private:
1695 Type _data;
1696};
1697
1698
1699template <class T0,
1700 class T1>
1701struct Tuple<T0, T1, NullTypeList>
1702{
1703 typedef typename TypeListType<T0,T1>::HeadType Type;
1704
1705 enum TupleLengthType
1706 {
1707 length = Type::length
1708 };
1709
1710 Tuple():_data()
1711 {
1712 }
1713
1714 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
1715 typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1)):
1716 _data(t0, typename TypeListType<T1>::HeadType(t1, NullTypeList()))
1717 {
1718 }
1719
1720 template <int N>
1721 typename TypeGetter<N, Type>::ConstHeadType& get() const
1722 {
1723 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1724 }
1725
1726 template <int N>
1727 typename TypeGetter<N, Type>::HeadType& get()
1728 {
1729 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1730 }
1731
1732 template <int N>
1733 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1734 {
1735 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1736 }
1737
1738 bool operator == (const Tuple& other) const
1739 {
1740 return _data == other._data;
1741 }
1742
1743 bool operator != (const Tuple& other) const
1744 {
1745 return !(_data == other._data);
1746 }
1747
1748 bool operator < (const Tuple& other) const
1749 {
1750 return _data < other._data;
1751 }
1752
1753private:
1754 Type _data;
1755};
1756
1757
1758template <class T0>
1759struct Tuple<T0, NullTypeList>
1760{
1761 typedef TypeList<T0, NullTypeList> Type;
1762
1763 enum TupleLengthType
1764 {
1765 length = Type::length
1766 };
1767
1768 Tuple():_data()
1769 {
1770 }
1771
1772 Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0):
1773 _data(t0, NullTypeList())
1774 {
1775 }
1776
1777 template <int N>
1778 typename TypeGetter<N, Type>::ConstHeadType& get() const
1779 {
1780 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1781 }
1782
1783 template <int N>
1784 typename TypeGetter<N, Type>::HeadType& get()
1785 {
1786 return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
1787 }
1788
1789 template <int N>
1790 void set(typename TypeGetter<N, Type>::ConstHeadType& val)
1791 {
1792 Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
1793 }
1794
1795 bool operator == (const Tuple& other) const
1796 {
1797 return _data == other._data;
1798 }
1799
1800 bool operator != (const Tuple& other) const
1801 {
1802 return !(_data == other._data);
1803 }
1804
1805 bool operator < (const Tuple& other) const
1806 {
1807 return _data < other._data;
1808 }
1809
1810private:
1811 Type _data;
1812};
1813
1814#endif
1815
1816} // namespace Poco
1817
1818
1819#endif // Foundation_Tuple_INCLUDED
1820