Displaying 1 result from an estimated 1 matches for "foo_factory".
2011 Jun 09
1
Rcpp and Object Factories
...,
I'm not exactly sure how to ask this question, but let me give it a shot...
Is it possible (easy) to use Rcpp Modules in conjunction with object
factories? For example
what I am trying to do is something like this:
// c++ classes
class Foo {
public:
void do_something() {};
};
class Foo_Factory {
public:
Foo * create_foo() {
return new Foo();
}
};
## R Code
library(Rcpp)
ff <- Module("Foo_Factory")
foo <- ff$create_foo()
foo$do_something()
It appears after scouring some message boards that it is doable via boost
python, but i'm not literate enough yet...