[Rcpp-devel] Wrapper generation, keep source untouched

Gábor Csárdi csardi.gabor at gmail.com
Wed Feb 12 18:05:47 CET 2014

On Wed, Feb 12, 2014 at 11:41 AM, Dirk Eddelbuettel <edd at debian.org> wrote:

> | My question is, is there a way you keep the original sources of the
> wrapped
> | library intact? I would be updating the sources regularly, and I figured
> the
> | best would be not to touch them at all.
> Did you see the 'Rcpp-extending.pdf' vignette about intrusive vs
> non-intrusive as<> and wrap?

Sure, I have read that. This helps with the conversions, if I want to write
the wrapper myself.

Ideally I would have the wrapper generated by Rcpp attributes. Essentially
what I am asking for is the possibility to avoid adding the //
[[Rcpp::export]] lines (and other attributes configuration) to the original
sources, but having these lines in a separate file (or files?). This file
would be essentially the description of the wrapper to be generated by Rcpp

I have to admit that I have only tried the Rcpp examples in the manuals so
far, so please forgive me if what I am asking for is unreasonable, or is
already solved.


> | According to the docs, compileAttributes does not support this. Do you
> have
| anything against implementing this in Rcpp? If not, and you can help me
> coming
> | up with some syntax that you like, I can code it up.
> Attributes can surely be extended, but some discussion or prototyping may
> not
> hurt.

OK, so I'll open an issue for this in your github issue tracker, and fork
the repo as well.


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

More information about the Rcpp-devel mailing list