[Rcpp-devel] Exposing a large number of C++ classes in R
rich.fitzjohn at gmail.com
Fri Feb 5 15:48:27 CET 2016
The yaml should be easy enough to generate (if you can create a list then
yaml::as.yaml will dump out suitable yaml probably). While yaml is used
for the configuration now, it's not essential to how the package works.
I did look into generating the interface from something like roxygen
I think with the same reading list as Whit suggested. There are some
starts there that I haven't looked at in a long time, mostly in this repo:
In the end it was not too unpleasant just to write the yaml out so I gave
up on it. If you have a lot of classes though, there is a lot of yaml -
this was from the project that motivated the package.
With a decent access to something that can parse C++ you could get at a lot
of the type information, but it's a lot of work and corner cases,
especially once you deal with templated classes ¯\_(ツ)_/¯
On Fri, Feb 5, 2016 at 1:44 PM Whit Armstrong <armstrong.whit at gmail.com>
> I've been thinking for a while about using clang to do source-to-source
> translation to generate the R bindings for a given c++ class.
> There are lots of examples online, but I haven't yet tackled this for R.
> good luck!
> On Fri, Feb 5, 2016 at 7:58 AM, Holger Hoefling <hhoeflin at gmail.com>
>> I am trying to write a package that exposes a large number of C++ classes
>> from an external project to R and was looking into how to lighten the
>> workload. Dirk already pointed my to the RcppR6 package, which looks really
>> However, even this would require to write quite a bit of yaml to achieve
>> this. So, is there a converter (e.g. based on doxygen xml) that can help
>> with the yaml writing?
>> Does anyone have more experience and can give pointers on how to best
>> approach this problem?
>> Also, how best to handle multiple inheritance in this context?
>> Thanks a lot for anyone's help!
>> Rcpp-devel mailing list
>> Rcpp-devel at lists.r-forge.r-project.org
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel