Hi Hadley,

Dirk has an example in the Rcpp gallery --
http://gallery.rcpp.org/articles/custom-as-and-wrap-example/. Not sure if
you've seen it already, but it might help.

-Kevin

On Tue, Feb 19, 2013 at 9:19 AM, Hadley Wickham <[email protected]> wrote:

> > 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.
>
> That'd be cool!
>
> > Once we have that, you won't need the SEXP constructor or the SEXP
> > conversion operator, and you would only need that before your class
> > declaration:
> >
> > RCPP_EXPOSED_CLASS(Simple)
> >
> > So that as and wrap are taken care of.
>
> Until that happens, is it possible to write my own as and wrap methods?
>
> Hadley
>
> --
> Chief Scientist, RStudio
> http://had.co.nz/
> _______________________________________________
> Rcpp-devel mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to