[Rcpp-commits] r2484 - scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 21 23:48:09 CET 2010


Author: romain
Date: 2010-11-21 23:48:09 +0100 (Sun, 21 Nov 2010)
New Revision: 2484

Modified:
   scripts/generator_Module_Pointer_method.R
Log:
added docstring

Modified: scripts/generator_Module_Pointer_method.R
===================================================================
--- scripts/generator_Module_Pointer_method.R	2010-11-21 22:46:46 UTC (rev 2483)
+++ scripts/generator_Module_Pointer_method.R	2010-11-21 22:48:09 UTC (rev 2484)
@@ -13,8 +13,8 @@
 txt <- sprintf( '
 
 	template <typename OUT, %s>
-	self& method( const char* name_, OUT (*fun)(Class*, %s), ValidMethod valid = &yes_arity<%d> ){
-		AddMethod( name_, new Pointer_CppMethod%d<Class,OUT,%s>( fun ), valid ) ;
+	self& method( const char* name_, OUT (*fun)(Class*, %s), const char* docstring = 0, ValidMethod valid = &yes_arity<%d> ){
+		AddMethod( name_, new Pointer_CppMethod%d<Class,OUT,%s>( fun ), valid, docstring ) ;
   		return *this ;
 	}
 	
@@ -56,8 +56,8 @@
 #define Rcpp_Module_generated_Pointer_method_h
 
 	template <typename OUT>
-	self& method( const char* name_, OUT (*fun)(Class*), ValidMethod valid = &yes ){
-		AddMethod( name_, new Pointer_CppMethod0<Class,OUT>( fun ), valid ) ;
+	self& method( const char* name_, OUT (*fun)(Class*), const char* docstring = 0, ValidMethod valid = &yes ){
+		AddMethod( name_, new Pointer_CppMethod0<Class,OUT>( fun ), valid, docstring ) ;
   		return *this ;
 	}
 	



More information about the Rcpp-commits mailing list