Rcpp Version 0.10.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
lang.h
Go to the documentation of this file.
1 // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
2 //
3 // lang.h: Rcpp R/C++ interface class library -- extra lang_* functions
4 //
5 // Copyright (C) 2011 Dirk Eddelbuettel and Romain Francois
6 //
7 // This file is part of Rcpp.
8 //
9 // Rcpp is free software: you can redistribute it and/or modify it
10 // under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 2 of the License, or
12 // (at your option) any later version.
13 //
14 // Rcpp is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
21 
22 #ifndef Rcpp__lang_h
23 #define Rcpp__lang_h
24 
25 #define Rcpp_list1 Rf_list1
26 #define Rcpp_lang1 Rf_lang1
27 
28 inline SEXP Rcpp_lcons(SEXP car, SEXP cdr){
29  PROTECT(car) ;
30  car = Rf_lcons( car, cdr ) ;
31  UNPROTECT(1) ;
32  return car ;
33 }
34 
35 inline SEXP Rcpp_list2( SEXP x0, SEXP x1 )
36 {
37  PROTECT(x0);
38  x0 = Rf_cons(x0, Rcpp_list1(x1));
39  UNPROTECT(1);
40  return x0;
41 }
42 
43 inline SEXP Rcpp_lang2( SEXP x0, SEXP x1 )
44 {
45  PROTECT(x0);
46  x0 = Rf_lcons(x0, Rcpp_list1(x1));
47  UNPROTECT(1);
48  return x0;
49 }
50 
51 
52 
53 
54 
55 inline SEXP Rcpp_list3( SEXP x0, SEXP x1, SEXP x2 )
56 {
57  PROTECT(x0);
58  x0 = Rf_cons(x0, Rcpp_list2(x1, x2));
59  UNPROTECT(1);
60  return x0;
61 }
62 
63 inline SEXP Rcpp_lang3( SEXP x0, SEXP x1, SEXP x2 )
64 {
65  PROTECT(x0);
66  x0 = Rf_lcons(x0, Rcpp_list2(x1, x2));
67  UNPROTECT(1);
68  return x0;
69 }
70 
71 
72 
73 
74 
75 inline SEXP Rcpp_list4( SEXP x0, SEXP x1, SEXP x2, SEXP x3 )
76 {
77  PROTECT(x0);
78  x0 = Rf_cons(x0, Rcpp_list3(x1, x2, x3));
79  UNPROTECT(1);
80  return x0;
81 }
82 
83 inline SEXP Rcpp_lang4( SEXP x0, SEXP x1, SEXP x2, SEXP x3 )
84 {
85  PROTECT(x0);
86  x0 = Rf_lcons(x0, Rcpp_list3(x1, x2, x3));
87  UNPROTECT(1);
88  return x0;
89 }
90 
91 
92 
93 
94 
95 inline SEXP Rcpp_list5( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4 )
96 {
97  PROTECT(x0);
98  x0 = Rf_cons(x0, Rcpp_list4(x1, x2, x3, x4));
99  UNPROTECT(1);
100  return x0;
101 }
102 
103 inline SEXP Rcpp_lang5( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4 )
104 {
105  PROTECT(x0);
106  x0 = Rf_lcons(x0, Rcpp_list4(x1, x2, x3, x4));
107  UNPROTECT(1);
108  return x0;
109 }
110 
111 
112 
113 
114 
115 inline SEXP Rcpp_list6( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5 )
116 {
117  PROTECT(x0);
118  x0 = Rf_cons(x0, Rcpp_list5(x1, x2, x3, x4, x5));
119  UNPROTECT(1);
120  return x0;
121 }
122 
123 inline SEXP Rcpp_lang6( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5 )
124 {
125  PROTECT(x0);
126  x0 = Rf_lcons(x0, Rcpp_list5(x1, x2, x3, x4, x5));
127  UNPROTECT(1);
128  return x0;
129 }
130 
131 
132 
133 
134 
135 inline SEXP Rcpp_list7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6 )
136 {
137  PROTECT(x0);
138  x0 = Rf_cons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6));
139  UNPROTECT(1);
140  return x0;
141 }
142 
143 inline SEXP Rcpp_lang7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6 )
144 {
145  PROTECT(x0);
146  x0 = Rf_lcons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6));
147  UNPROTECT(1);
148  return x0;
149 }
150 
151 
152 
153 
154 
155 inline SEXP Rcpp_list8( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7 )
156 {
157  PROTECT(x0);
158  x0 = Rf_cons(x0, Rcpp_list7(x1, x2, x3, x4, x5, x6, x7));
159  UNPROTECT(1);
160  return x0;
161 }
162 
163 inline SEXP Rcpp_lang8( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7 )
164 {
165  PROTECT(x0);
166  x0 = Rf_lcons(x0, Rcpp_list7(x1, x2, x3, x4, x5, x6, x7));
167  UNPROTECT(1);
168  return x0;
169 }
170 
171 
172 
173 
174 
175 inline SEXP Rcpp_list9( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8 )
176 {
177  PROTECT(x0);
178  x0 = Rf_cons(x0, Rcpp_list8(x1, x2, x3, x4, x5, x6, x7, x8));
179  UNPROTECT(1);
180  return x0;
181 }
182 
183 inline SEXP Rcpp_lang9( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8 )
184 {
185  PROTECT(x0);
186  x0 = Rf_lcons(x0, Rcpp_list8(x1, x2, x3, x4, x5, x6, x7, x8));
187  UNPROTECT(1);
188  return x0;
189 }
190 
191 
192 
193 
194 
195 inline SEXP Rcpp_list10( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9 )
196 {
197  PROTECT(x0);
198  x0 = Rf_cons(x0, Rcpp_list9(x1, x2, x3, x4, x5, x6, x7, x8, x9));
199  UNPROTECT(1);
200  return x0;
201 }
202 
203 inline SEXP Rcpp_lang10( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9 )
204 {
205  PROTECT(x0);
206  x0 = Rf_lcons(x0, Rcpp_list9(x1, x2, x3, x4, x5, x6, x7, x8, x9));
207  UNPROTECT(1);
208  return x0;
209 }
210 
211 
212 
213 
214 
215 inline SEXP Rcpp_list11( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10 )
216 {
217  PROTECT(x0);
218  x0 = Rf_cons(x0, Rcpp_list10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10));
219  UNPROTECT(1);
220  return x0;
221 }
222 
223 inline SEXP Rcpp_lang11( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10 )
224 {
225  PROTECT(x0);
226  x0 = Rf_lcons(x0, Rcpp_list10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10));
227  UNPROTECT(1);
228  return x0;
229 }
230 
231 
232 
233 
234 
235 inline SEXP Rcpp_list12( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11 )
236 {
237  PROTECT(x0);
238  x0 = Rf_cons(x0, Rcpp_list11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11));
239  UNPROTECT(1);
240  return x0;
241 }
242 
243 inline SEXP Rcpp_lang12( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11 )
244 {
245  PROTECT(x0);
246  x0 = Rf_lcons(x0, Rcpp_list11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11));
247  UNPROTECT(1);
248  return x0;
249 }
250 
251 
252 
253 
254 
255 inline SEXP Rcpp_list13( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12 )
256 {
257  PROTECT(x0);
258  x0 = Rf_cons(x0, Rcpp_list12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12));
259  UNPROTECT(1);
260  return x0;
261 }
262 
263 inline SEXP Rcpp_lang13( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12 )
264 {
265  PROTECT(x0);
266  x0 = Rf_lcons(x0, Rcpp_list12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12));
267  UNPROTECT(1);
268  return x0;
269 }
270 
271 
272 
273 
274 
275 inline SEXP Rcpp_list14( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13 )
276 {
277  PROTECT(x0);
278  x0 = Rf_cons(x0, Rcpp_list13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13));
279  UNPROTECT(1);
280  return x0;
281 }
282 
283 inline SEXP Rcpp_lang14( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13 )
284 {
285  PROTECT(x0);
286  x0 = Rf_lcons(x0, Rcpp_list13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13));
287  UNPROTECT(1);
288  return x0;
289 }
290 
291 
292 
293 
294 
295 inline SEXP Rcpp_list15( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14 )
296 {
297  PROTECT(x0);
298  x0 = Rf_cons(x0, Rcpp_list14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14));
299  UNPROTECT(1);
300  return x0;
301 }
302 
303 inline SEXP Rcpp_lang15( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14 )
304 {
305  PROTECT(x0);
306  x0 = Rf_lcons(x0, Rcpp_list14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14));
307  UNPROTECT(1);
308  return x0;
309 }
310 
311 
312 
313 
314 
315 inline SEXP Rcpp_list16( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15 )
316 {
317  PROTECT(x0);
318  x0 = Rf_cons(x0, Rcpp_list15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15));
319  UNPROTECT(1);
320  return x0;
321 }
322 
323 inline SEXP Rcpp_lang16( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15 )
324 {
325  PROTECT(x0);
326  x0 = Rf_lcons(x0, Rcpp_list15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15));
327  UNPROTECT(1);
328  return x0;
329 }
330 
331 
332 
333 
334 
335 inline SEXP Rcpp_list17( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16 )
336 {
337  PROTECT(x0);
338  x0 = Rf_cons(x0, Rcpp_list16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16));
339  UNPROTECT(1);
340  return x0;
341 }
342 
343 inline SEXP Rcpp_lang17( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16 )
344 {
345  PROTECT(x0);
346  x0 = Rf_lcons(x0, Rcpp_list16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16));
347  UNPROTECT(1);
348  return x0;
349 }
350 
351 
352 
353 
354 
355 inline SEXP Rcpp_list18( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17 )
356 {
357  PROTECT(x0);
358  x0 = Rf_cons(x0, Rcpp_list17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17));
359  UNPROTECT(1);
360  return x0;
361 }
362 
363 inline SEXP Rcpp_lang18( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17 )
364 {
365  PROTECT(x0);
366  x0 = Rf_lcons(x0, Rcpp_list17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17));
367  UNPROTECT(1);
368  return x0;
369 }
370 
371 
372 
373 
374 
375 inline SEXP Rcpp_list19( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18 )
376 {
377  PROTECT(x0);
378  x0 = Rf_cons(x0, Rcpp_list18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18));
379  UNPROTECT(1);
380  return x0;
381 }
382 
383 inline SEXP Rcpp_lang19( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18 )
384 {
385  PROTECT(x0);
386  x0 = Rf_lcons(x0, Rcpp_list18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18));
387  UNPROTECT(1);
388  return x0;
389 }
390 
391 
392 
393 
394 
395 inline SEXP Rcpp_list20( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19 )
396 {
397  PROTECT(x0);
398  x0 = Rf_cons(x0, Rcpp_list19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19));
399  UNPROTECT(1);
400  return x0;
401 }
402 
403 inline SEXP Rcpp_lang20( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19 )
404 {
405  PROTECT(x0);
406  x0 = Rf_lcons(x0, Rcpp_list19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19));
407  UNPROTECT(1);
408  return x0;
409 }
410 
411 
412 
413 
414 #endif
415