Remote Call Framework 3.1
boost/tuple.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2019, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 3.1
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
19 #ifndef INCLUDE_SF_TUPLE_HPP
20 #define INCLUDE_SF_TUPLE_HPP
21 
22 #include <RCF/Config.hpp>
23 
24 #include <boost/tuple/tuple.hpp>
25 
26 namespace SF {
27 
28  class Archive;
29 
30  // boost::tuple
31 
32  template<
33  typename T0>
34  void serialize(SF::Archive &ar, boost::tuples::tuple<T0> &t)
35  {
36  ar
37  & t.template get<0>();
38  }
39 
40  template<
41  typename T0,
42  typename T1>
43  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1> &t)
44  {
45  ar
46  & t.template get<0>()
47  & t.template get<1>();
48  }
49 
50  template<
51  typename T0,
52  typename T1,
53  typename T2>
54  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2> &t)
55  {
56  ar
57  & t.template get<0>()
58  & t.template get<1>()
59  & t.template get<2>();
60  }
61 
62  template<
63  typename T0,
64  typename T1,
65  typename T2,
66  typename T3>
67  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2,T3> &t)
68  {
69  ar
70  & t.template get<0>()
71  & t.template get<1>()
72  & t.template get<2>()
73  & t.template get<3>();
74  }
75 
76  template<
77  typename T0,
78  typename T1,
79  typename T2,
80  typename T3,
81  typename T4>
82  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2,T3,T4> &t)
83  {
84  ar
85  & t.template get<0>()
86  & t.template get<1>()
87  & t.template get<2>()
88  & t.template get<3>()
89  & t.template get<4>();
90  }
91 
92  template<
93  typename T0,
94  typename T1,
95  typename T2,
96  typename T3,
97  typename T4,
98  typename T5>
99  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2,T3,T4,T5> &t)
100  {
101  ar
102  & t.template get<0>()
103  & t.template get<1>()
104  & t.template get<2>()
105  & t.template get<3>()
106  & t.template get<4>()
107  & t.template get<5>();
108  }
109 
110  template<
111  typename T0,
112  typename T1,
113  typename T2,
114  typename T3,
115  typename T4,
116  typename T5,
117  typename T6>
118  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2,T3,T4,T5,T6> &t)
119  {
120  ar
121  & t.template get<0>()
122  & t.template get<1>()
123  & t.template get<2>()
124  & t.template get<3>()
125  & t.template get<4>()
126  & t.template get<5>()
127  & t.template get<6>();
128  }
129 
130  template<
131  typename T0,
132  typename T1,
133  typename T2,
134  typename T3,
135  typename T4,
136  typename T5,
137  typename T6,
138  typename T7>
139  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2,T3,T4,T5,T6,T7> &t)
140  {
141  ar
142  & t.template get<0>()
143  & t.template get<1>()
144  & t.template get<2>()
145  & t.template get<3>()
146  & t.template get<4>()
147  & t.template get<5>()
148  & t.template get<6>()
149  & t.template get<7>();
150  }
151 
152  template<
153  typename T0,
154  typename T1,
155  typename T2,
156  typename T3,
157  typename T4,
158  typename T5,
159  typename T6,
160  typename T7,
161  typename T8>
162  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8> &t)
163  {
164  ar
165  & t.template get<0>()
166  & t.template get<1>()
167  & t.template get<2>()
168  & t.template get<3>()
169  & t.template get<4>()
170  & t.template get<5>()
171  & t.template get<6>()
172  & t.template get<7>()
173  & t.template get<8>();
174  }
175 
176  template<
177  typename T0,
178  typename T1,
179  typename T2,
180  typename T3,
181  typename T4,
182  typename T5,
183  typename T6,
184  typename T7,
185  typename T8,
186  typename T9>
187  void serialize(SF::Archive &ar, boost::tuples::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> &t)
188  {
189  ar
190  & t.template get<0>()
191  & t.template get<1>()
192  & t.template get<2>()
193  & t.template get<3>()
194  & t.template get<4>()
195  & t.template get<5>()
196  & t.template get<6>()
197  & t.template get<7>()
198  & t.template get<8>()
199  & t.template get<9>();
200  }
201 }
202 
203 #endif // ! INCLUDE_SF_TUPLE_HPP
Represents an archive, in which serialized objects are stored.
Definition: Archive.hpp:32
Definition: ByteBuffer.hpp:189