2
2
#
3
3
# Generator for inst/include/Rcpp/module/Module_generated_CppFunction.h
4
4
#
5
- # Copyright (C) 2010 - 2014 Dirk Eddelbuettel and Romain Francois
5
+ # Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois
6
6
7
7
fun <- function (i ) {
8
8
@@ -16,10 +16,8 @@ template <typename RESULT_TYPE, %s> class CppFunction%d : public CppFunction {
16
16
CppFunction%d(RESULT_TYPE (*fun)(%s) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
17
17
18
18
SEXP operator()(SEXP* args) {
19
- BEGIN_RCPP
20
19
%s
21
20
return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun(%s));
22
- END_RCPP
23
21
}
24
22
25
23
inline int nargs() { return %d; }
@@ -36,10 +34,9 @@ class CppFunction%d<void,%s> : public CppFunction {
36
34
CppFunction%d(void (*fun)(%s) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
37
35
38
36
SEXP operator()(SEXP* args) {
39
- BEGIN_RCPP
40
37
%s
41
38
ptr_fun(%s);
42
- END_RCPP
39
+ return R_NilValue;
43
40
}
44
41
45
42
inline int nargs() { return %d; }
@@ -61,10 +58,8 @@ class CppFunction_WithFormals%d : public CppFunction {
61
58
CppFunction(docstring), formals(formals_), ptr_fun(fun) {}
62
59
63
60
SEXP operator()(SEXP* args) {
64
- BEGIN_RCPP
65
61
%s
66
62
return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun(%s));
67
- END_RCPP
68
63
}
69
64
70
65
inline int nargs() { return %d; }
@@ -84,10 +79,9 @@ class CppFunction_WithFormals%d<void,%s> : public CppFunction {
84
79
CppFunction(docstring), formals(formals_), ptr_fun(fun) {}
85
80
86
81
SEXP operator()(SEXP* args) {
87
- BEGIN_RCPP
88
82
%s
89
83
ptr_fun(%s);
90
- END_RCPP
84
+ return R_NilValue;
91
85
}
92
86
93
87
inline int nargs() { return %d; }
@@ -157,7 +151,7 @@ file <- sprintf(
157
151
// Module_generated_CppFunction.h: -- generated helper code for Modules
158
152
// see rcpp-scripts repo for generator script
159
153
//
160
- // Copyright (C) 2010 - 2014 Dirk Eddelbuettel and Romain Francois
154
+ // Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois
161
155
//
162
156
// This file is part of Rcpp.
163
157
//
@@ -184,9 +178,7 @@ class CppFunction0 : public CppFunction {
184
178
public:
185
179
CppFunction0(RESULT_TYPE (*fun)(void), const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
186
180
SEXP operator()(SEXP*) {
187
- BEGIN_RCPP
188
181
return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun());
189
- END_RCPP
190
182
}
191
183
192
184
inline int nargs() { return 0; }
@@ -204,9 +196,8 @@ class CppFunction0<void> : public CppFunction {
204
196
CppFunction0(void (*fun)(void), const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {};
205
197
206
198
SEXP operator()(SEXP*) {
207
- BEGIN_RCPP
208
199
ptr_fun();
209
- END_RCPP
200
+ return R_NilValue;
210
201
}
211
202
212
203
inline int nargs() { return 0; }
@@ -224,9 +215,7 @@ class CppFunction_WithFormals0 : public CppFunction {
224
215
public:
225
216
CppFunction_WithFormals0(RESULT_TYPE (*fun)(void), Rcpp::List, const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
226
217
SEXP operator()(SEXP*) {
227
- BEGIN_RCPP
228
218
return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun());
229
- END_RCPP
230
219
}
231
220
232
221
inline int nargs() { return 0; }
@@ -244,9 +233,8 @@ class CppFunction_WithFormals0<void> : public CppFunction {
244
233
CppFunction_WithFormals0(void (*fun)(void), Rcpp::List, const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {} ;
245
234
246
235
SEXP operator()(SEXP*) {
247
- BEGIN_RCPP
248
236
ptr_fun() ;
249
- END_RCPP
237
+ return R_NilValue;
250
238
}
251
239
252
240
inline int nargs() { return 0; }
0 commit comments