Skip to content
Prev 9099 / 10988 Next

[Rcpp-devel] Exposing a large number of C++ classes in R

Hi Holger,

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
comments -
  https://github.com/richfitz/RcppR6/issues/1
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:
  https://github.com/richfitz/cppinfo

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.
  https://github.com/traitecoevo/plant/blob/master/inst/RcppR6_classes.yml
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 ?\_(?)_/?

Cheers,
Rich


On Fri, Feb 5, 2016 at 1:44 PM Whit Armstrong <armstrong.whit at gmail.com>
wrote:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160205/acab0929/attachment.html>