Re: [Rcpp-devel] Pass an Rcpp module object to a method belonging to another module from R?

2014-09-10 Thread Romain Francois
This is once again something with which the RCPP_EXPOSED_CLASS macro can help with. Try adding RCPP_EXPOSED_CLASS(A) before you declare class A and simply use this signature for the method. void DoSomethingWithInstanceOfA(const A& ) Also, you can have both of these classes in the same modul

Re: [Rcpp-devel] Pass an Rcpp module object to a method belonging to another module from R?

2014-09-10 Thread Gregory Jefferis
Gregory Jefferis On 10 Sep 2014, at 10:39, Romain Francois wrote: > RCPP_EXPOSED_CLASS(A) > > before you declare class A and simply use this signature for the method. > > void DoSomethingWithInstanceOfA(const A& ) I used this approach happily in the nabor package (on github) but the only

Re: [Rcpp-devel] Pass an Rcpp module object to a method belonging to another module from R?

2014-09-10 Thread Romain Francois
Le 10 sept. 2014 à 14:22, Gregory Jefferis a écrit : > > > Gregory Jefferis > > On 10 Sep 2014, at 10:39, Romain Francois wrote: > >> RCPP_EXPOSED_CLASS(A) >> >> before you declare class A and simply use this signature for the method. >> >> void DoSomethingWithInstanceOfA(const A& ) >