You might want to send this message to the Rcpp mailing list at: Rcpp-devel mailing list rcpp-de...@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
It will improve your chances of getting a swift (if not helpful) reply. Nick Sabbe -- ping: nick.sa...@ugent.be link: http://biomath.ugent.be wink: A1.056, Coupure Links 653, 9000 Gent ring: 09/264.59.36 -- Do Not Disapprove > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Michael King > Sent: donderdag 9 juni 2011 21:03 > To: r-help@r-project.org > Subject: [R] Rcpp and Object Factories > > Hello, > 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 about how this works to know if > the > same logic holds for R. > > Thanks for the help. > > -Mike King > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.