Re: [Rcpp-devel] Module with out default constructor.

2010-10-28 Thread Andrew Redd
Thanks, I'm taking the approach of the default constructor with an initializer function. That seems to be a reasonable workaround. Oh and BTW I was not using Notepad++ for some reason I was not able to copy and paste from vim into chrome. Notepad++ does great indenting although not quite as good

Re: [Rcpp-devel] Module with out default constructor.

2010-10-27 Thread Romain Francois
Le 27/10/10 12:32, Andrew Redd a écrit : Is it possible with Rcpp Modules to have a class that does not have a default constructor? Consider this example - #include #include class c1{ private: int n; int * x; c1(); public: c1(int n):n(n){} int getn(){return n;} }; RCPP_MODULE(c1){ using na

Re: [Rcpp-devel] Module with out default constructor.

2010-10-27 Thread Dirk Eddelbuettel
On 27 October 2010 at 13:32, Andrew Redd wrote: | Is it possible with Rcpp Modules to have a class that does not have a | default constructor? Consider this example | - | #include | #include | class c1{ | private: | int n; | int * x; | c1(); | public: | c1(int n):n(n){} | int getn(){return

[Rcpp-devel] Module with out default constructor.

2010-10-27 Thread Andrew Redd
Is it possible with Rcpp Modules to have a class that does not have a default constructor? Consider this example - #include #include class c1{ private: int n; int * x; c1(); public: c1(int n):n(n){} int getn(){return n;} }; RCPP_MODULE(c1){ using namespace Rcpp; class_("c1") .property("n",&c