[Rcpp-devel] Rcpp modules and parsing an object back and forth between R & C++

JJ Allaire jj.allaire at gmail.com
Sun Feb 24 13:12:46 CET 2013

> Unfortunately, at the moment modules and attributes don't play together.
> The attributes feature used to be built on top of modules, but this caused
> issues on windows.
> One thing we could perhaps negociate with JJ is recognition of the export
> attribute on module. Something like :
> // [[Rcpp::export]]
> RCPP_MODULE(SimpleModule) {
>   class_<Simple>( "Simple")
>         .constructor<double>()
>         .const_method("times", &Simple::times)
>   ;
> }
> or perhaps even just recognizing the RCPP_MODULE declaration.

Rev 4272 adds support for recognizing RCPP_MODULE declarations in
sourceCpp. Any module defined in the file will be automatically loaded
using a call to Module (the name will be the same as the name specified in

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130224/ec20e29c/attachment.html>

More information about the Rcpp-devel mailing list