[Rcpp-devel] RCPP_MODULE for inheritance class

Dirk Eddelbuettel edd at debian.org
Fri Jun 20 01:59:07 CEST 2014

On 19 June 2014 at 16:13, Jianyang Zhao wrote:
| Hello All,
| I got a problem when I try module with inheritance class. Basiclly, I can't
| compile this part.
| using namespace Rcpp;
| class_<FPCAreg>("FPCAreg")
| .constructor<List, List, double, double, int, bool, bool>()
| .field("n", &FPCAreg::n)
|                 ;
| }
| Here FPCAreg is a inheritance class based on FPCA class, and "n" is defined in
| FPCA. 

I am not sure that can work.  Modules may only do one level and expose what
is in the class itself.

| No matter I use ".field("n", &FPCAreg::n)" or ".field("n", &FPCA::n)".
| When I use ".field("n", &FPCAreg::n)", the error message is "no matching
| function for call to blablabla", and for ".field("n", &FPCA::n)", that's same
| but different class name. Is there any suggestion?

Difficult without a reproducible example ...


http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the Rcpp-devel mailing list