Hi J.J.,

that makes it precise! As I see now also in RcppArmadillo the naming 
inlineCxxPlugin is used and this is the 'identifier' as you say. Great! I 
modify my code to make use of this pattern.

Thank you for your response!

Simon

On Oct 12, 2013, at 1:01 AM, JJ Allaire <[email protected]> wrote:

> Simon,
> 
> 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.
> 
> 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).
> 
> J.J.
> 
> 
> On Fri, Oct 11, 2013 at 5:54 PM, Dirk Eddelbuettel <[email protected]> wrote:
> 
> Simon,
> 
> On 11 October 2013 at 23:43, Simon Zehnder wrote:
> | 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).
> |
> | 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'?
> 
> What is your actual intent?  To support inline? To support Rcpp Attributes?
> 
> I have not looked at this in a while, but I think we may not actually
> required registration (ie there is no run-time state vector accumulating
> plugin callbacks...) but when a plugin is invoked, it points to a package and
> hence the package namespace is searched and a corresponding function is
> called.
> 
> This is from memory. Actual details may differ. Void where prohibited :)
> 
> Dirk
> 
> --
> Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com
> _______________________________________________
> Rcpp-devel mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> 

_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to