[Rcpp-devel] Rcpp modules: Derived class - exposing method from base class?

Jonas Rauch jonas.rauch at googlemail.com
Tue Jun 14 19:06:13 CEST 2011

Hello everyone.

I am trying to write an R interface to a library that uses derived classes
in the following manner:

class Foo {
    virtual void Action() = 0;
    void doSomething() {
        [do complicated stuff]

class Bar : public Foo {
    void Action() {
        [some code here]

class Baz : public Foo {
    void Action() {
        [some other code here]


Where the abstract class Foo defines an interface and at the same time
provides base functionality that can then be applied to different
implementations of "Action".

Is it possible to expose Bar::doSomething() to R using Rcpp modules? I have
tried different things and did not get it to work.

I would appreciate any help.

Best regards,
Jonas Rauch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110614/551a394e/attachment.htm>

More information about the Rcpp-devel mailing list