[Rcpp-devel] Modules docs

Dominick Samperi djsamperi at gmail.com
Wed Dec 8 21:21:23 CET 2010


To be more concrete, I define a module in foo.cpp and do something like
this:

foo = Module("MyClass", PACKAGE="MyPack")
foo$myfunc()

Where myfunc() is defined using function() in the RCPP_MODULE macro. I
can also extract the underlying reference and work with that as well.

This works without the importClassFrom() directive.

On Wed, Dec 8, 2010 at 1:55 PM, Dominick Samperi <djsamperi at gmail.com>wrote:

> I have a question about the modules vignette.
>
> At the end it says client packages must importClassesFrom(...),
> and there are comments about using .onLoad() as well.
>
> But before reading this I already implemented the use of
> modules in another (client) package without using these
> constructions. They do not seem to be required?
>
> Can you elaborate on exactly when these constructions
> are needed?
>
> Thanks,
> Dominick
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20101208/281b3901/attachment.htm>


More information about the Rcpp-devel mailing list