Okay, so at the risk of asking another stupid question...
I'm a bit unclear about how to write the R constructor for a class being
exported via the module facility.
class Foo{
public:
int i;
Foo();
Foo(SEXP);
}
int test(Foo f){
return f.i;
}
RCPP_MODULE(amodule){
using namespace Rcpp ;
function("test",&test);
class<Foo>("Foo");
}
I assume that I need to write Foo(SEXP) in such a way that the external pointer
is extracted, and then 'i' is copied over. How does one do this?
Thanks for the help,
Ian
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel