[Rcpp-devel] Exposing a large number of C++ classes in R
hhoeflin at gmail.com
Fri Feb 5 16:20:17 CET 2016
Thank you - I will have a look at those.
I am currently somewhat torn. I have a C++ interface, but also an
equivalent C version. Having a method such as RcppR6 sounds great that does
the heavy lifting. Currently, in my mind, this is competing with writing a
bit of code that produces a ton of little snippets that I can copy/paste
and adjust as needed and create a "regular" package with everything as
normal code. Not so easy to update when something changes, but the project
I want to wrap is quite stable.
Thanks for all your input!
On Fri, Feb 5, 2016 at 3:48 PM, Rich FitzJohn <rich.fitzjohn at gmail.com>
> 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 -
> 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 useful.
>>> 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