[Rcpp-commits] r2483 - scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Nov 21 23:46:46 CET 2010
Author: romain
Date: 2010-11-21 23:46:46 +0100 (Sun, 21 Nov 2010)
New Revision: 2483
Modified:
scripts/generator_Module_method.R
Log:
added docstring
Modified: scripts/generator_Module_method.R
===================================================================
--- scripts/generator_Module_method.R 2010-11-21 22:42:51 UTC (rev 2482)
+++ scripts/generator_Module_method.R 2010-11-21 22:46:46 UTC (rev 2483)
@@ -13,26 +13,26 @@
txt <- sprintf( '
template <typename OUT, %s>
- self& method( const char* name_, OUT (Class::*fun)(%s), ValidMethod valid = &yes_arity<%d> ){
- AddMethod( name_, new CppMethod%d<Class,OUT,%s>( fun ), valid ) ;
+ self& method( const char* name_, OUT (Class::*fun)(%s), const char* docstring = 0, ValidMethod valid = &yes_arity<%d> ){
+ AddMethod( name_, new CppMethod%d<Class,OUT,%s>( fun ), valid, docstring) ;
return *this ;
}
template <typename OUT, %s>
- self& method( const char* name_, OUT (Class::*fun)(%s) const, ValidMethod valid = &yes_arity<%d> ){
- AddMethod( name_, new const_CppMethod%d<Class,OUT,%s>( fun ), valid ) ;
+ self& method( const char* name_, OUT (Class::*fun)(%s) const, const char* docstring = 0, ValidMethod valid = &yes_arity<%d> ){
+ AddMethod( name_, new const_CppMethod%d<Class,OUT,%s>( fun ), valid, docstring ) ;
return *this ;
}
template <typename OUT, %s>
- self& nonconst_method( const char* name_, OUT (Class::*fun)(%s), ValidMethod valid = &yes_arity<%d> ){
- AddMethod( name_, new CppMethod%d<Class,OUT,%s>( fun ), valid ) ;
+ self& nonconst_method( const char* name_, OUT (Class::*fun)(%s), const char* docstring = 0, ValidMethod valid = &yes_arity<%d> ){
+ AddMethod( name_, new CppMethod%d<Class,OUT,%s>( fun ), valid, docstring ) ;
return *this ;
}
template <typename OUT, %s>
- self& const_method( const char* name_, OUT (Class::*fun)(%s) const , ValidMethod valid = &yes_arity<%d>){
- AddMethod( name_, new const_CppMethod%d<Class,OUT,%s>( fun ), valid ) ;
+ self& const_method( const char* name_, OUT (Class::*fun)(%s) const, const char* docstring = 0, ValidMethod valid = &yes_arity<%d>){
+ AddMethod( name_, new const_CppMethod%d<Class,OUT,%s>( fun ), valid, docstring ) ;
return *this ;
}
@@ -91,26 +91,26 @@
#define Rcpp_Module_generated_method_h
template <typename OUT>
- self& method( const char* name_, OUT (Class::*fun)(void), ValidMethod valid = &yes ){
- AddMethod( name_, new CppMethod0<Class,OUT>( fun ), valid) ;
+ self& method( const char* name_, OUT (Class::*fun)(void), const char* docstring = 0, ValidMethod valid = &yes ){
+ AddMethod( name_, new CppMethod0<Class,OUT>( fun ), valid, docstring) ;
return *this ;
}
template <typename OUT>
- self& method( const char* name_, OUT (Class::*fun)(void) const, ValidMethod valid = &yes ){
- AddMethod( name_, new const_CppMethod0<Class,OUT>( fun ), valid ) ;
+ self& method( const char* name_, OUT (Class::*fun)(void) const, const char* docstring = 0, ValidMethod valid = &yes ){
+ AddMethod( name_, new const_CppMethod0<Class,OUT>( fun ), valid, docstring ) ;
return *this ;
}
template <typename OUT>
- self& nonconst_method( const char* name_, OUT (Class::*fun)(void), ValidMethod valid = &yes ){
- AddMethod( name_, new CppMethod0<Class,OUT>( fun ) , valid) ;
+ self& nonconst_method( const char* name_, OUT (Class::*fun)(void), const char* docstring = 0, ValidMethod valid = &yes ){
+ AddMethod( name_, new CppMethod0<Class,OUT>( fun ) , valid, docstring ) ;
return *this ;
}
template <typename OUT>
- self& const_method( const char* name_, OUT (Class::*fun)(void) const, ValidMethod valid = &yes ){
- AddMethod( name_, new const_CppMethod0<Class,OUT>( fun ), valid ) ;
+ self& const_method( const char* name_, OUT (Class::*fun)(void) const, const char* docstring = 0, ValidMethod valid = &yes ){
+ AddMethod( name_, new const_CppMethod0<Class,OUT>( fun ), valid, docstring ) ;
return *this ;
}
More information about the Rcpp-commits
mailing list