Is it possible to have a class wrapped in rcpp inherit directly from a superclass?
E.g., I have

    class_<tcfaIndices>( "tcfaIndices" )

        .constructor<long>()

        .method("SetTCFADefinition", &tcfaIndices::SetTCFADefinition)
        .method("getTCFALabels", &tcfaIndices::getTCFALabels)

        ;

and

    class_<morphologyIndices>( "morphologyIndices" )

    .constructor<long>()

        .method("getCentroidLumen", &morphologyIndices::getCentroidLumen)
.method("getCentroidAdventitia", &morphologyIndices::getCentroidAdventitia)

        ;

where the c++ class tcfaIndices inherits from c++ class morphologyIndices.
I get compiler errors that suggest this is impossible (they seem to show up surrounding the cascade of calls to constructors), but was curious as to if there's a way to do this (other than, say, introducing 1 more level of abstraction, and then inserting a member variable rather than a parent class...)
--rd
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to