Plugin system for cxxfunction
cxxfunction uses a plugin system to assembly the
code that it compiles. These functions allow to register and get
plugins by their name.
name of the plugin.
Further argments to pass to the plugin.
plugins are functions that return a list with :
mandatory. it is included at the top of the compiled file by
optional. a function that takes one argument (the body of the c++ function) and returned a modified version of the body. The "Rcpp" plugin uses this to surround the code with the
optional. character vector containing the list of packages that the code needs to link to. This adds the include path of the given packages. The "Rcpp" and "RcppArmadillo" plugins use this.
optional. named list of environment variables. For example, the "Rcpp" plugin uses this to add Rcpp user library to the
plugins can be manually registered using the
function. Alternatively, a package may supply an inline plugin
implicitely by defining a function called
does not necessarily need to be exported from the namespace of the package.
Known packages implementing this scheme include
getPlugin retrieves the plugin and invokes it with the
registerPlugin does not return anything.
1 2 3 4
## Not run: getPlugin( "Rcpp" ) ## End(Not run)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.