[Rcpp-devel] Wrapper generation, keep source untouched

Dirk Eddelbuettel edd at debian.org
Wed Feb 12 17:41:29 CET 2014


On 12 February 2014 at 10:57, Gábor Csárdi wrote:
| Hi All, I knew I wouldn't be able avoid Rcpp forever. :)

We're happy to have you now :)  I'm sure good things will come of this.
 
| I am about create R wrappers to a C++ library, old style, not templating. Rcpp
| attributes, and custom as<> and wrap() seem to be the way to go, and they are
| indeed very appealing. (If only they would have existed when I started with
| igraph!)
| 
| 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?

Of course, this was all written in the dark ages before Rcpp Attributes --
but latter uses when doing the magic.  You may also want custom plugins and
all that, for which you need the automagic conversion.
 
| 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.

Cheers, Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list