[Rcpp-commits] r2502 - in pkg/Rcpp: . R inst/include/Rcpp inst/include/Rcpp/module src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 23 14:56:56 CET 2010


Author: romain
Date: 2010-11-23 14:56:56 +0100 (Tue, 23 Nov 2010)
New Revision: 2502

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/R/00_classes.R
   pkg/Rcpp/R/01_show.R
   pkg/Rcpp/R/Module.R
   pkg/Rcpp/inst/include/Rcpp/Module.h
   pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h
   pkg/Rcpp/inst/include/Rcpp/module/Module_generated_function.h
   pkg/Rcpp/src/Module.cpp
Log:
self doc for exposed C++ functions

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2010-11-23 13:44:17 UTC (rev 2501)
+++ pkg/Rcpp/ChangeLog	2010-11-23 13:56:56 UTC (rev 2502)
@@ -2,6 +2,16 @@
 
     * R/Module.R: calling an exposed C++ more efficiently by using the xp directly 
     rather than traversing the map internally
+    
+    * R/00_classes.R: C++Function gains a docstring slot to host self documentation
+    of the internal function
+    
+    * R/01_show.R: updated show( C++Function )
+    
+    * inst/include/Rcpp/module/Module_generated_CppFunction.h: self documentation
+    for exposed C++ functions
+    
+    * inst/include/Rcpp/module/Module_generated_function.h: idem
 
 2010-11-22  Romain Francois <romain at r-enthusiasts.com>
 

Modified: pkg/Rcpp/R/00_classes.R
===================================================================
--- pkg/Rcpp/R/00_classes.R	2010-11-23 13:44:17 UTC (rev 2501)
+++ pkg/Rcpp/R/00_classes.R	2010-11-23 13:56:56 UTC (rev 2502)
@@ -85,7 +85,10 @@
 setClass( "C++Object")
 
 setClass( "C++Function", 
-	representation( pointer = "externalptr" ), 
+	representation( 
+	    pointer = "externalptr", 
+	    docstring = "character"
+	), 
 	contains = "function"
 )
 

Modified: pkg/Rcpp/R/01_show.R
===================================================================
--- pkg/Rcpp/R/01_show.R	2010-11-23 13:44:17 UTC (rev 2501)
+++ pkg/Rcpp/R/01_show.R	2010-11-23 13:56:56 UTC (rev 2502)
@@ -78,7 +78,13 @@
 } )
 
 setMethod( "show", "C++Function", function(object){
-	writeLines( sprintf( "internal C++ function <%s>", externalptr_address(object at pointer) ) )
+	txt <- sprintf( "internal C++ function <%s>", externalptr_address(object at pointer) )
+    writeLines( txt )
+    
+    doc <- object at docstring
+    if( length(doc) && nchar( doc ) ){
+        writeLines( sprintf( "    docstring : %s", doc ) )
+    }
 } )
 
 setMethod( "show", "Module", function( object ){

Modified: pkg/Rcpp/R/Module.R
===================================================================
--- pkg/Rcpp/R/Module.R	2010-11-23 13:44:17 UTC (rev 2501)
+++ pkg/Rcpp/R/Module.R	2010-11-23 13:56:56 UTC (rev 2502)
@@ -73,6 +73,7 @@
 	if( .Call( Module__has_function, pointer, name ) ){
 		info <- .Call( Module__get_function, pointer, name )
 		fun_ptr <- info[[1L]]
+		doc     <- info[[3L]]
 		f <- function(...) NULL
 		stuff <- list( fun_pointer = fun_ptr, InternalFunction_invoke = InternalFunction_invoke )
 		body(f) <- if( info[[2]] ) {
@@ -85,7 +86,7 @@
 		        .External( InternalFunction_invoke, fun_pointer, ... )
 		    }, stuff ) 
 		}
-		new( "C++Function", f, pointer = fun_ptr )
+		new( "C++Function", f, pointer = fun_ptr, docstring = doc )
 	} else if( .Call( Module__has_class, pointer, name ) ){
         value <- .Call( Module__get_class, pointer, name )
         value at generator <-  get("refClassGenerators",envir=x)[[as.character(value)]]

Modified: pkg/Rcpp/inst/include/Rcpp/Module.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Module.h	2010-11-23 13:44:17 UTC (rev 2501)
+++ pkg/Rcpp/inst/include/Rcpp/Module.h	2010-11-23 13:56:56 UTC (rev 2502)
@@ -32,13 +32,15 @@
 
 class CppFunction {
 	public:
-		CppFunction() {}
+		CppFunction(const char* doc = 0) : docstring( doc == 0 ? "" : doc) {}
 		virtual SEXP operator()(SEXP*) { 
 			return R_NilValue ;
 		}
 		virtual ~CppFunction(){} ;
 		virtual int nargs(){ return 0 ; }
 		virtual bool is_void(){ return false ; }
+		
+		std::string docstring ;
 };
 
 

Modified: pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h	2010-11-23 13:44:17 UTC (rev 2501)
+++ pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h	2010-11-23 13:56:56 UTC (rev 2502)
@@ -1,6 +1,6 @@
 // -*- 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
+// Module_generated_CppFunction.h: Rcpp R/C++ interface class library -- Rcpp modules
 //
 // Copyright (C) 2010	Dirk Eddelbuettel and Romain Francois
 //
@@ -25,7 +25,7 @@
 template <typename OUT>
 class CppFunction0 : public CppFunction {
 	public:
-		CppFunction0(OUT (*fun)(void) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction0(OUT (*fun)(void), const char* docstring = 0 ) : CppFunction(docstring), ptr_fun(fun){}
 		SEXP operator()(SEXP*) throw(std::range_error) {
 			return Rcpp::wrap( ptr_fun() ) ;
 		}
@@ -40,7 +40,7 @@
 template <>
 class CppFunction0<void> : public CppFunction {
 	public:
-		CppFunction0(void (*fun)(void) ) : CppFunction(), ptr_fun(fun){} ;
+		CppFunction0(void (*fun)(void), const char* docstring = 0 ) : CppFunction(docstring), ptr_fun(fun){} ;
 		
 		SEXP operator()(SEXP*) throw(std::exception) {
 			ptr_fun() ;
@@ -59,7 +59,7 @@
 class CppFunction1 : public CppFunction {
 	public:
 
-		CppFunction1(OUT (*fun)(U0) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction1(OUT (*fun)(U0) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0 >::type >( args[0] ) ) ) ;
@@ -74,7 +74,7 @@
 template <typename U0>
 class CppFunction1<void,U0> : public CppFunction {
 	public:
-		CppFunction1(void (*fun)(U0) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction1(void (*fun)(U0) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U0>::type >( args[0] ) ) ;
@@ -94,7 +94,7 @@
 class CppFunction2 : public CppFunction {
 	public:
 
-		CppFunction2(OUT (*fun)(U0, U1) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction2(OUT (*fun)(U0, U1) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -109,7 +109,7 @@
 template <typename U0, typename U1>
 class CppFunction2<void,U0, U1> : public CppFunction {
 	public:
-		CppFunction2(void (*fun)(U0, U1) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction2(void (*fun)(U0, U1) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -129,7 +129,7 @@
 class CppFunction3 : public CppFunction {
 	public:
 
-		CppFunction3(OUT (*fun)(U0, U1, U2) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction3(OUT (*fun)(U0, U1, U2) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -144,7 +144,7 @@
 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){}
+		CppFunction3(void (*fun)(U0, U1, U2) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -164,7 +164,7 @@
 class CppFunction4 : public CppFunction {
 	public:
 
-		CppFunction4(OUT (*fun)(U0, U1, U2, U3) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction4(OUT (*fun)(U0, U1, U2, U3) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -179,7 +179,7 @@
 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){}
+		CppFunction4(void (*fun)(U0, U1, U2, U3) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -199,7 +199,7 @@
 class CppFunction5 : public CppFunction {
 	public:
 
-		CppFunction5(OUT (*fun)(U0, U1, U2, U3, U4) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction5(OUT (*fun)(U0, U1, U2, U3, U4) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -214,7 +214,7 @@
 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){}
+		CppFunction5(void (*fun)(U0, U1, U2, U3, U4) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -234,7 +234,7 @@
 class CppFunction6 : public CppFunction {
 	public:
 
-		CppFunction6(OUT (*fun)(U0, U1, U2, U3, U4, U5) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction6(OUT (*fun)(U0, U1, U2, U3, U4, U5) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -249,7 +249,7 @@
 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){}
+		CppFunction6(void (*fun)(U0, U1, U2, U3, U4, U5) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -269,7 +269,7 @@
 class CppFunction7 : public CppFunction {
 	public:
 
-		CppFunction7(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction7(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -284,7 +284,7 @@
 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){}
+		CppFunction7(void (*fun)(U0, U1, U2, U3, U4, U5, U6) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -304,7 +304,7 @@
 class CppFunction8 : public CppFunction {
 	public:
 
-		CppFunction8(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction8(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -319,7 +319,7 @@
 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){}
+		CppFunction8(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -339,7 +339,7 @@
 class CppFunction9 : public CppFunction {
 	public:
 
-		CppFunction9(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction9(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -354,7 +354,7 @@
 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){}
+		CppFunction9(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -374,7 +374,7 @@
 class CppFunction10 : public CppFunction {
 	public:
 
-		CppFunction10(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction10(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ) ) ) ;
@@ -389,7 +389,7 @@
 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){}
+		CppFunction10(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ) ) ;
@@ -409,7 +409,7 @@
 class CppFunction11 : public CppFunction {
 	public:
 
-		CppFunction11(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction11(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U10 >::type >( args[10] ) ) ) ;
@@ -424,7 +424,7 @@
 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){}
+		CppFunction11(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U10>::type >( args[10] ) ) ;
@@ -444,7 +444,7 @@
 class CppFunction12 : public CppFunction {
 	public:
 
-		CppFunction12(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11) ) : CppFunction(), ptr_fun(fun){}
+		CppFunction12(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U10 >::type >( args[10] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U11 >::type >( args[11] ) ) ) ;
@@ -459,7 +459,7 @@
 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){}
+		CppFunction12(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U10>::type >( args[10] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U11>::type >( args[11] ) ) ;
@@ -479,7 +479,7 @@
 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){}
+		CppFunction13(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
 			return Rcpp::wrap( ptr_fun( 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] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U10 >::type >( args[10] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U11 >::type >( args[11] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U12 >::type >( args[12] ) ) ) ;
@@ -494,7 +494,7 @@
 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){}
+		CppFunction13(void (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception) {
 			ptr_fun( 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] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U10>::type >( args[10] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U11>::type >( args[11] ), Rcpp::as< typename Rcpp::traits::remove_const_and_reference< U12>::type >( args[12] ) ) ;
@@ -514,7 +514,7 @@
 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){}
+		CppFunction14(OUT (*fun)(U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 		
 		SEXP operator()(SEXP* args) throw(std::exception){
[TRUNCATED]

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


More information about the Rcpp-commits mailing list