<div dir="ltr">Simon,<div><br></div><div>To make a plugin available for use with both inline and Rcpp attributes you need only define a function named "inlineCxxPlugin" within your package (which can in turn call Rcpp.plugin.maker). This allow you to use it with inline as well as Rcpp::depends.</div>
<div><br></div><div>I think this is the scenario you are targeting (since you are writing a package). The registerPlugin function is used when you want to make available a plugin that isn't part of a package (e.g. for some type of ad-hoc complier/linker recipe you need to cook up).</div>
<div><br></div><div>J.J.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 11, 2013 at 5:54 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Simon,<br>
<div class="im"><br>
On 11 October 2013 at 23:43, Simon Zehnder wrote:<br>
| I have a very short question in regard to plugins in packages. I have written my own plugin using Rcpp.plugin.maker (very well documented in FAQ btw).<br>
|<br>
| I know, that on the command line calling registerPlugin() registers the plugin. From RcppArmadillo I can see, that the registerPlugin function is never called inside the package - but I see also, that the file is called inline.R. How does the inline package register/identify a plugin? Is a plugin registered automatically when called inside cxxfunction? Does it have to be put into a file called 'inline.R'?<br>
<br>
</div>What is your actual intent? To support inline? To support Rcpp Attributes?<br>
<br>
I have not looked at this in a while, but I think we may not actually<br>
required registration (ie there is no run-time state vector accumulating<br>
plugin callbacks...) but when a plugin is invoked, it points to a package and<br>
hence the package namespace is searched and a corresponding function is<br>
called.<br>
<br>
This is from memory. Actual details may differ. Void where prohibited :)<br>
<span class="HOEnZb"><font color="#888888"><br>
Dirk<br>
<br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">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" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
</div></div></blockquote></div><br></div>