[Rcpp-commits] r1283 - pkg/Rcpp/inst/include/Rcpp pkg/Rcpp/inst/include/Rcpp/module scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 19 13:54:04 CEST 2010


Author: romain
Date: 2010-05-19 13:54:03 +0200 (Wed, 19 May 2010)
New Revision: 1283

Added:
   pkg/Rcpp/inst/include/Rcpp/module/
   pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h
   pkg/Rcpp/inst/include/Rcpp/module/Module_generated_function.h
   pkg/Rcpp/inst/include/Rcpp/module/Module_generated_make_function.h
   scripts/generator_Module_CppFunction.R
   scripts/generator_Module_function.R
   scripts/generator_Module_make_function.R
Modified:
   pkg/Rcpp/inst/include/Rcpp/Module.h
Log:
auto-generated (znd generator) code to support functions with up to 65 parameters in Rcpp modules

Modified: pkg/Rcpp/inst/include/Rcpp/Module.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Module.h	2010-05-19 10:17:27 UTC (rev 1282)
+++ pkg/Rcpp/inst/include/Rcpp/Module.h	2010-05-19 11:54:03 UTC (rev 1283)
@@ -33,144 +33,10 @@
 		virtual bool is_void(){ return false ; }
 };
 
-template <typename OUT>
-class CppFunction0 : public CppFunction {
-	public:
-		CppFunction0(OUT (*fun)(void) ) : CppFunction(), ptr_fun(fun){}
-		SEXP operator()(SEXP* args){
-			SEXP res = R_NilValue ;
-			try{
-				res = Rcpp::wrap( ptr_fun() ) ;
-			} catch( std::exception& __ex__ ){
-				forward_exception_to_r( __ex__ ) ;
-			}
-			return res ;
-		}
-		
-		inline int nargs(){ return 0; }
-		
-	private:
-		OUT (*ptr_fun)(void) ;	
-} ;
+#include <Rcpp/module/Module_generated_CppFunction.h>
 
-template <>
-class CppFunction0<void> : public CppFunction {
-	public:
-		CppFunction0(void (*fun)(void) )  ;
-		
-		SEXP operator()(SEXP* args) ;
-		
-		inline int nargs(){ return 0; }
-		inline bool is_void(){ return true; }
-		
-	private:
-		void (*ptr_fun)(void) ;	
-} ;
+#include <Rcpp/module/Module_generated_make_function.h>
 
-
-template <typename OUT, typename U0>
-class CppFunction1 : public CppFunction {
-	public:
-		CppFunction1(OUT (*fun)(U0 u0) ) : CppFunction(), ptr_fun(fun){}
-		SEXP operator()(SEXP* args){
-			SEXP res = R_NilValue ;
-			try{
-				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ) ) ) ;
-			} catch( std::exception& __ex__ ){
-				forward_exception_to_r( __ex__ ) ;
-			}
-			return res ;
-		}
-		
-		inline int nargs(){ return 1; }
-		
-	private:
-		OUT (*ptr_fun)(U0 u0) ;	
-} ;
-
-template <typename U0>
-class CppFunction1<void,U0> : public CppFunction {
-	public:
-		CppFunction1(void (*fun)(U0 u0) ) : CppFunction(), ptr_fun(fun){}
-		SEXP operator()(SEXP* args){
-			try{
-				ptr_fun( Rcpp::as<U0>( args[0] ) ) ;
-			} catch( std::exception& __ex__ ){
-				forward_exception_to_r( __ex__ ) ;
-			}
-			return R_NilValue ;
-		}
-		
-		inline int nargs(){ return 1; }
-		inline bool is_void(){ return true; }
-		
-	private:
-		void (*ptr_fun)(U0 u0) ;	
-} ;
-
-
-
-template <typename OUT, typename U0, typename U1>
-class CppFunction2 : public CppFunction {
-	public:
-		CppFunction2(OUT (*fun)(U0 u0, U1 u1) ) : CppFunction(), ptr_fun(fun){}
-		SEXP operator()(SEXP* args){
-			SEXP res = R_NilValue ;
-			try{
-				res = Rcpp::wrap( ptr_fun( 
-					Rcpp::as<U0>( args[0] ), 
-					Rcpp::as<U1>( args[1] )
-					) ) ;
-			} catch( std::exception& __ex__ ){
-				forward_exception_to_r( __ex__ ) ;
-			}
-			return res ;
-		}
-		inline int nargs(){ return 2; }
-		
-		
-	private:
-		OUT (*ptr_fun)(U0 u0, U1 u1) ;	
-} ;
-
-template <typename U0, typename U1>
-class CppFunction2<void,U0,U1> : public CppFunction {
-	public:
-		CppFunction2(void (*fun)(U0 u0, U1 u1) ) : CppFunction(), ptr_fun(fun){}
-		SEXP operator()(SEXP* args){
-			try{
-				ptr_fun( 
-					Rcpp::as<U0>( args[0] ), 
-					Rcpp::as<U1>( args[1] )
-					);
-			} catch( std::exception& __ex__ ){
-				forward_exception_to_r( __ex__ ) ;
-			}
-			return R_NilValue ;
-		}
-		inline int nargs(){ return 2; }
-		inline bool is_void(){ return true; }
-		
-		
-	private:
-		void (*ptr_fun)(U0 u0, U1 u1) ;	
-} ;
-
-template <typename OUT>
-CppFunction* make_function( OUT (*fun)(void) ){
-	return new CppFunction0<OUT>( fun ) ;
-}
-
-template <typename OUT, typename U0>
-CppFunction* make_function( OUT (*fun)(U0 u0) ){
-	return new CppFunction1<OUT,U0>( fun ) ;
-}
-
-template <typename OUT, typename U0, typename U1>
-CppFunction* make_function( OUT (*fun)(U0 u0, U1 u1) ){
-	return new CppFunction2<OUT,U0,U1>( fun ) ;
-}
-	
 class Module {
 	public:    
 		typedef std::map<std::string,CppFunction*> MAP ;
@@ -203,36 +69,17 @@
 		
 	private:
 		std::map<std::string,CppFunction*> functions ;
-		
+		           
 };
 
 extern Rcpp::Module* current_scope ;
 
-template <typename OUT>
-void function( const char* name,  OUT (*fun)(void)){
-	if( Rcpp::current_scope ){
-		Rcpp::current_scope->Add( name, new CppFunction0<OUT>( fun ) ) ;
-	}
-}
+#include <Rcpp/module/Module_generated_function.h>
 
-template <typename OUT, typename U0>
-void function( const char* name,  OUT (*fun)(U0 u0)){
-	if( Rcpp::current_scope ){
-		Rcpp::current_scope->Add( name, new CppFunction1<OUT,U0>( fun ) ) ;
-	}
-}
 
-template <typename OUT, typename U0, typename U1>
-void function( const char* name,  OUT (*fun)(U0 u0, U1 u1)){
-	if( Rcpp::current_scope ){
-		Rcpp::current_scope->Add( name, new CppFunction2<OUT,U0,U1>( fun ) ) ;
-	}
 }
 
 
-}
-
-
 #define RCPP_MODULE(name)                                            \
 void _rcpp_module_##name##_init() ;                                  \
 static Rcpp::Module _rcpp_module_##name( # name ) ;                  \

Added: pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h	                        (rev 0)
+++ pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h	2010-05-19 11:54:03 UTC (rev 1283)
@@ -0,0 +1,2857 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Module_generated_function.h: Rcpp R/C++ interface class library -- Rcpp modules
+//
+// Copyright (C) 2010	Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_Module_generated_CppFunction_h
+#define Rcpp_Module_generated_CppFunction_h
+    
+template <typename OUT>
+class CppFunction0 : public CppFunction {
+	public:
+		CppFunction0(OUT (*fun)(void) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun() ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 0; }
+		
+	private:
+		OUT (*ptr_fun)(void) ;	                    
+} ;
+
+
+template <>
+class CppFunction0<void> : public CppFunction {
+	public:
+		CppFunction0(void (*fun)(void) )  ;
+		
+		SEXP operator()(SEXP* args) ;
+		
+		inline int nargs(){ return 0; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(void) ;	
+} ;
+
+
+template <typename OUT, typename U0>
+class CppFunction1 : public CppFunction {
+	public:
+
+		CppFunction1(OUT (*fun)(U0) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 1; }
+		
+	private:
+		OUT (*ptr_fun)(U0) ;	
+} ;
+
+template <typename U0>
+class CppFunction1<void,U0> : public CppFunction {
+	public:
+		CppFunction1(void (*fun)(U0) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 1; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1>
+class CppFunction2 : public CppFunction {
+	public:
+
+		CppFunction2(OUT (*fun)(U0, U1) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 2; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1) ;	
+} ;
+
+template <typename U0, typename U1>
+class CppFunction2<void,U0, U1> : public CppFunction {
+	public:
+		CppFunction2(void (*fun)(U0, U1) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 2; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2>
+class CppFunction3 : public CppFunction {
+	public:
+
+		CppFunction3(OUT (*fun)(U0, U1, U2) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 3; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2) ;	
+} ;
+
+template <typename U0, typename U1, typename U2>
+class CppFunction3<void,U0, U1, U2> : public CppFunction {
+	public:
+		CppFunction3(void (*fun)(U0, U1, U2) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 3; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3>
+class CppFunction4 : public CppFunction {
+	public:
+
+		CppFunction4(OUT (*fun)(U0, U1, U2, U3) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 4; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3>
+class CppFunction4<void,U0, U1, U2, U3> : public CppFunction {
+	public:
+		CppFunction4(void (*fun)(U0, U1, U2, U3) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 4; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4>
+class CppFunction5 : public CppFunction {
+	public:
+
+		CppFunction5(OUT (*fun)(U0, U1, U2, U3, U4) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 5; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4>
+class CppFunction5<void,U0, U1, U2, U3, U4> : public CppFunction {
+	public:
+		CppFunction5(void (*fun)(U0, U1, U2, U3, U4) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 5; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5>
+class CppFunction6 : public CppFunction {
+	public:
+
+		CppFunction6(OUT (*fun)(U0, U1, U2, U3, U4, U5) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 6; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5>
+class CppFunction6<void,U0, U1, U2, U3, U4, U5> : public CppFunction {
+	public:
+		CppFunction6(void (*fun)(U0, U1, U2, U3, U4, U5) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 6; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6>
+class CppFunction7 : public CppFunction {
+	public:
+
+		CppFunction7(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 7; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6>
+class CppFunction7<void,U0, U1, U2, U3, U4, U5, U6> : public CppFunction {
+	public:
+		CppFunction7(void (*fun)(U0, U1, U2, U3, U4, U5, U6) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 7; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7>
+class CppFunction8 : public CppFunction {
+	public:
+
+		CppFunction8(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 8; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7>
+class CppFunction8<void,U0, U1, U2, U3, U4, U5, U6, U7> : public CppFunction {
+	public:
+		CppFunction8(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 8; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8>
+class CppFunction9 : public CppFunction {
+	public:
+
+		CppFunction9(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 9; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8>
+class CppFunction9<void,U0, U1, U2, U3, U4, U5, U6, U7, U8> : public CppFunction {
+	public:
+		CppFunction9(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 9; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9>
+class CppFunction10 : public CppFunction {
+	public:
+
+		CppFunction10(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 10; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9>
+class CppFunction10<void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9> : public CppFunction {
+	public:
+		CppFunction10(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 10; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9) ;	
+} ;
+
+
+
+template <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 CppFunction11 : public CppFunction {
+	public:
+
+		CppFunction11(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 11; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10>
+class CppFunction11<void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10> : public CppFunction {
+	public:
+		CppFunction11(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 11; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11>
+class CppFunction12 : public CppFunction {
+	public:
+
+		CppFunction12(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 12; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11>
+class CppFunction12<void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11> : public CppFunction {
+	public:
+		CppFunction12(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 12; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12>
+class CppFunction13 : public CppFunction {
+	public:
+
+		CppFunction13(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ), Rcpp::as<U12>( args[12] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 13; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12>
+class CppFunction13<void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12> : public CppFunction {
+	public:
+		CppFunction13(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ), Rcpp::as<U12>( args[12] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 13; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13>
+class CppFunction14 : public CppFunction {
+	public:
+
+		CppFunction14(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ), Rcpp::as<U12>( args[12] ), Rcpp::as<U13>( args[13] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 14; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13>
+class CppFunction14<void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13> : public CppFunction {
+	public:
+		CppFunction14(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ), Rcpp::as<U12>( args[12] ), Rcpp::as<U13>( args[13] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 14; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14>
+class CppFunction15 : public CppFunction {
+	public:
+
+		CppFunction15(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ), Rcpp::as<U12>( args[12] ), Rcpp::as<U13>( args[13] ), Rcpp::as<U14>( args[14] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 15; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14>
+class CppFunction15<void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14> : public CppFunction {
+	public:
+		CppFunction15(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
+				ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ), Rcpp::as<U12>( args[12] ), Rcpp::as<U13>( args[13] ), Rcpp::as<U14>( args[14] ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return R_NilValue ;
+		}
+		
+		inline int nargs(){ return 15; }
+		inline bool is_void(){ return true; }
+		
+	private:
+		void (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14) ;	
+} ;
+
+
+
+template <typename OUT, typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15>
+class CppFunction16 : public CppFunction {
+	public:
+
+		CppFunction16(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			SEXP res = R_NilValue ;
+			try{
+				res = Rcpp::wrap( ptr_fun( Rcpp::as<U0>( args[0] ), Rcpp::as<U1>( args[1] ), Rcpp::as<U2>( args[2] ), Rcpp::as<U3>( args[3] ), Rcpp::as<U4>( args[4] ), Rcpp::as<U5>( args[5] ), Rcpp::as<U6>( args[6] ), Rcpp::as<U7>( args[7] ), Rcpp::as<U8>( args[8] ), Rcpp::as<U9>( args[9] ), Rcpp::as<U10>( args[10] ), Rcpp::as<U11>( args[11] ), Rcpp::as<U12>( args[12] ), Rcpp::as<U13>( args[13] ), Rcpp::as<U14>( args[14] ), Rcpp::as<U15>( args[15] ) ) ) ;
+			} catch( std::exception& __ex__ ){
+				forward_exception_to_r( __ex__ ) ;
+			}
+			return res ;
+		}
+		
+		inline int nargs(){ return 16; }
+		
+	private:
+		OUT (*ptr_fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15) ;	
+} ;
+
+template <typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15>
+class CppFunction16<void,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15> : public CppFunction {
+	public:
+		CppFunction16(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15) ) : CppFunction(), ptr_fun(fun){}
+		SEXP operator()(SEXP* args){
+			try{
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/rcpp -r 1283


More information about the Rcpp-commits mailing list