[Rcpp-commits] r3293 - in pkg/Rcpp: . inst/doc/Rcpp-modules inst/include/Rcpp/module
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Nov 6 18:12:12 CET 2011
Author: romain
Date: 2011-11-06 18:12:12 +0100 (Sun, 06 Nov 2011)
New Revision: 3293
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw
pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Pointer_CppMethod.h
pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Pointer_method.h
Log:
deal with const free methods in modules
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2011-11-06 17:09:09 UTC (rev 3292)
+++ pkg/Rcpp/ChangeLog 2011-11-06 17:12:12 UTC (rev 3293)
@@ -1,3 +1,11 @@
+2011-11-06 Romain Francois <romain at r-enthusiasts.com>
+
+ * include/Rcpp/modules/Module_generated_Pointer_method.h: added code to deal
+ with const free "methods", e.g. OUT foo( const Class*, ...) in modules
+ Before const_method could only deal with actual const methods of the class,
+ e.g. OUT Class::foo( ... ) const
+ * include/Rcpp/modules/Module_generated_Pointer_CppMethod.h: idem
+
2011-10-31 Romain Francois <romain at r-enthusiasts.com>
* include/Rcpp/int64/int64_lite.h: handling int64_t and uint64_t types,
Modified: pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw 2011-11-06 17:09:09 UTC (rev 3292)
+++ pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw 2011-11-06 17:12:12 UTC (rev 3293)
@@ -1030,6 +1030,13 @@
obj->at( i ) = value;
}
+int vec_size( vec* obj ){ return obj->size(); }
+int vec_max_size( vec* obj){ return obj->max_size() ; }
+int vec_capacity( vec* obj){ return obj->capacity() ; }
+void vec_reserve( vec* obj, int n){ obj->reserve( n ); }
+void vec_resize(vec* obj, int n){ obj->resize(n); }
+double vec_at( const vec* obj, int i){ return obj->at(i); }
+
RCPP_MODULE(mod_vec) {
using namespace Rcpp;
@@ -1054,7 +1061,7 @@
// specifically exposing const member functions
.const_method( "back", &vec::back )
.const_method( "front", &vec::front )
- .const_method( "at", &vec::at )
+ .const_method( "at", &vec_at )
// exposing free functions taking a std::vector<double>*
// as their first argument
@@ -1063,7 +1070,7 @@
.method( "as.vector", &vec_asR )
// special methods for indexing
- .const_method( "[[", &vec::at )
+ .const_method( "[[", &vec_at )
.method( "[[<-", &vec_set )
;
Modified: pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Pointer_CppMethod.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Pointer_CppMethod.h 2011-11-06 17:09:09 UTC (rev 3292)
+++ pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Pointer_CppMethod.h 2011-11-06 17:12:12 UTC (rev 3293)
@@ -2,7 +2,7 @@
//
// Module_generated_CppMethod.h: Rcpp R/C++ interface class library -- Rcpp modules
//
-// Copyright (C) 2010 - 2011 Doug Bates, Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2010 Doug Bates, Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
@@ -58,9 +58,49 @@
private:
Method met ;
} ;
+
+
+
+
+ template <typename Class, typename OUT> class Const_Pointer_CppMethod0 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*) ;
+ typedef CppMethod<Class> method_class ;
+ Const_Pointer_CppMethod0( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* ){
+ return Rcpp::wrap( met(object) ) ;
+ }
+ inline int nargs(){ return 0 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template <typename Class> class Const_Pointer_CppMethod0<Class,void> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*) ;
+ typedef CppMethod<Class> method_class ;
+ Const_Pointer_CppMethod0( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* ){
+ met( object ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 0 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+
-
template < typename Class, typename OUT, typename U0 > class Pointer_CppMethod1 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0) ;
@@ -98,10 +138,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0 > class Const_Pointer_CppMethod1 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod1(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ) ) ) ;
+ }
+ inline int nargs(){ return 1 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0 > class Const_Pointer_CppMethod1<Class,void,U0> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod1( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 1 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1 > class Pointer_CppMethod2 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1) ;
@@ -139,10 +219,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1 > class Const_Pointer_CppMethod2 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod2(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ) ) ) ;
+ }
+ inline int nargs(){ return 2 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1 > class Const_Pointer_CppMethod2<Class,void,U0, U1> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod2( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 2 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2 > class Pointer_CppMethod3 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2) ;
@@ -180,10 +300,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2 > class Const_Pointer_CppMethod3 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod3(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ) ) ) ;
+ }
+ inline int nargs(){ return 3 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2 > class Const_Pointer_CppMethod3<Class,void,U0, U1, U2> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod3( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 3 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3 > class Pointer_CppMethod4 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3) ;
@@ -221,10 +381,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3 > class Const_Pointer_CppMethod4 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod4(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ) ) ) ;
+ }
+ inline int nargs(){ return 4 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2, U3>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2, typename U3 > class Const_Pointer_CppMethod4<Class,void,U0, U1, U2, U3> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod4( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 4 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2, U3>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4 > class Pointer_CppMethod5 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4) ;
@@ -262,10 +462,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4 > class Const_Pointer_CppMethod5 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod5(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ) ) ) ;
+ }
+ inline int nargs(){ return 5 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2, U3, U4>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2, typename U3, typename U4 > class Const_Pointer_CppMethod5<Class,void,U0, U1, U2, U3, U4> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod5( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 5 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2, U3, U4>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5 > class Pointer_CppMethod6 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5) ;
@@ -303,10 +543,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5 > class Const_Pointer_CppMethod6 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod6(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ) ) ) ;
+ }
+ inline int nargs(){ return 6 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2, U3, U4, U5>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5 > class Const_Pointer_CppMethod6<Class,void,U0, U1, U2, U3, U4, U5> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod6( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 6 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2, U3, U4, U5>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > class Pointer_CppMethod7 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6) ;
@@ -344,10 +624,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > class Const_Pointer_CppMethod7 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod7(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ) ) ) ;
+ }
+ inline int nargs(){ return 7 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2, U3, U4, U5, U6>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > class Const_Pointer_CppMethod7<Class,void,U0, U1, U2, U3, U4, U5, U6> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod7( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 7 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2, U3, U4, U5, U6>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7 > class Pointer_CppMethod8 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7) ;
@@ -385,10 +705,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7 > class Const_Pointer_CppMethod8 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod8(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U7 >::type >( args[7] ) ) ) ;
+ }
+ inline int nargs(){ return 8 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2, U3, U4, U5, U6, U7>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7 > class Const_Pointer_CppMethod8<Class,void,U0, U1, U2, U3, U4, U5, U6, U7> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod8( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U7 >::type >( args[7] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 8 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2, U3, U4, U5, U6, U7>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8 > class Pointer_CppMethod9 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8) ;
@@ -426,10 +786,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8 > class Const_Pointer_CppMethod9 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod9(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U7 >::type >( args[7] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U8 >::type >( args[8] ) ) ) ;
+ }
+ inline int nargs(){ return 9 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2, U3, U4, U5, U6, U7, U8>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8 > class Const_Pointer_CppMethod9<Class,void,U0, U1, U2, U3, U4, U5, U6, U7, U8> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod9( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U7 >::type >( args[7] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U8 >::type >( args[8] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 9 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2, U3, U4, U5, U6, U7, U8>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9 > class Pointer_CppMethod10 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9) ;
@@ -467,10 +867,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9 > class Const_Pointer_CppMethod10 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod10(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ return Rcpp::wrap( met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U7 >::type >( args[7] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U8 >::type >( args[8] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U9 >::type >( args[9] ) ) ) ;
+ }
+ inline int nargs(){ return 10 ; }
+ inline bool is_void(){ return false ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
+ template < typename Class, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9 > class Const_Pointer_CppMethod10<Class,void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9> : public CppMethod<Class> {
+ public:
+ typedef void (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod10( Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
+ met( object, Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U1 >::type >( args[1] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U2 >::type >( args[2] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U3 >::type >( args[3] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U4 >::type >( args[4] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U5 >::type >( args[5] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U6 >::type >( args[6] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U7 >::type >( args[7] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U8 >::type >( args[8] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U9 >::type >( args[9] ) ) ;
+ return R_NilValue ;
+ }
+ inline int nargs(){ return 10 ; }
+ inline bool is_void(){ return true ; }
+ inline bool is_const(){ return true ; }
+ inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9>(s, name) ; }
+
+ private:
+ Method met ;
+ } ;
+
template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10 > class Pointer_CppMethod11 : public CppMethod<Class> {
public:
typedef OUT (*Method)(Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10) ;
@@ -508,10 +948,50 @@
Method met ;
} ;
+
+ // const
+
+ template < typename Class, typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10 > class Const_Pointer_CppMethod11 : public CppMethod<Class> {
+ public:
+ typedef OUT (*Method)(const Class*, U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10) ;
+ typedef CppMethod<Class> method_class ;
+
+ Const_Pointer_CppMethod11(Method m) : method_class(), met(m){}
+ SEXP operator()( Class* object, SEXP* args){
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rcpp -r 3293
More information about the Rcpp-commits
mailing list