<div dir="ltr">Hi Holger,<div><br></div><div>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.</div><div><br></div><div>I did look into generating the interface from something like roxygen comments - </div><div>  <a href="https://github.com/richfitz/RcppR6/issues/1">https://github.com/richfitz/RcppR6/issues/1</a><br></div><div><span style="line-height:1.5">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:</span><br></div><div><span style="line-height:1.5">  </span><a href="https://github.com/richfitz/cppinfo">https://github.com/richfitz/cppinfo</a></div><div><br></div><div>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.</div><div>  <a href="https://github.com/traitecoevo/plant/blob/master/inst/RcppR6_classes.yml">https://github.com/traitecoevo/plant/blob/master/inst/RcppR6_classes.yml</a></div><div>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 <span style="line-height:1.5">¯</span><span style="line-height:1.5">\_(ツ)_/¯</span></div><div><br></div><div>Cheers,</div><div>Rich</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Feb 5, 2016 at 1:44 PM Whit Armstrong <<a href="mailto:armstrong.whit@gmail.com">armstrong.whit@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.<div><br></div><div>There are lots of examples online, but I haven't yet tackled this for R.</div><div><br></div><div><a href="http://eli.thegreenplace.net/2012/06/08/basic-source-to-source-transformation-with-clang" target="_blank">http://eli.thegreenplace.net/2012/06/08/basic-source-to-source-transformation-with-clang</a><br></div><div><a href="http://stackoverflow.com/questions/28711580/how-to-write-a-source-to-source-compiler-api" target="_blank">http://stackoverflow.com/questions/28711580/how-to-write-a-source-to-source-compiler-api</a><br></div><div><a href="http://szelei.me/code-generator/" target="_blank">http://szelei.me/code-generator/</a><br></div><div>etc.</div><div><br></div><div>good luck!</div></div><div dir="ltr"><div><br></div><div>-Whit</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 5, 2016 at 7:58 AM, Holger Hoefling <span dir="ltr"><<a href="mailto:hhoeflin@gmail.com" target="_blank">hhoeflin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Does anyone have more experience and can give pointers on how to best approach this problem? </div><div><br></div><div>Also, how best to handle multiple inheritance in this context?</div><div><br></div><div>Thanks a lot for anyone's help!</div><span><font color="#888888"><div><br></div><div>Holger</div></font></span></div>
<br>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br></blockquote></div><br></div>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></blockquote></div>