Re: [Rcpp-devel] Designing Rcpp modules - allow access to fields or to field accessor methods?

2010-11-18 Thread Douglas Bates
Thanks again Romain. Now that you mention it I remember. On Thu, Nov 18, 2010 at 3:41 PM, Romain Francois wrote: > Le 18/11/10 22:31, Douglas Bates a écrit : >> >> My C++ coding style (such as it is) has been influenced by reading >> Frank Bokken's "C++ Annotations".  I keep most data members of

Re: [Rcpp-devel] Designing Rcpp modules - allow access to fields or to field accessor methods?

2010-11-18 Thread Romain Francois
Le 18/11/10 22:41, Romain Francois a écrit : Le 18/11/10 22:31, Douglas Bates a écrit : My C++ coding style (such as it is) has been influenced by reading Frank Bokken's "C++ Annotations". I keep most data members of classes private or protected and usually with names like d_x, d_y, d_weights, e

Re: [Rcpp-devel] Designing Rcpp modules - allow access to fields or to field accessor methods?

2010-11-18 Thread Romain Francois
Le 18/11/10 22:31, Douglas Bates a écrit : My C++ coding style (such as it is) has been influenced by reading Frank Bokken's "C++ Annotations". I keep most data members of classes private or protected and usually with names like d_x, d_y, d_weights, etc. then provide accessor functions named x,

Re: [Rcpp-devel] Designing Rcpp modules - allow access to fields or to field accessor methods?

2010-11-18 Thread Andrew Redd
Isn't this sort of thing what the .property is for in modules? Or are you looking for something else -Andrew On Thu, Nov 18, 2010 at 2:31 PM, Douglas Bates wrote: > My C++ coding style (such as it is) has been influenced by reading > Frank Bokken's "C++ Annotations".  I keep most data members of

[Rcpp-devel] Designing Rcpp modules - allow access to fields or to field accessor methods?

2010-11-18 Thread Douglas Bates
My C++ coding style (such as it is) has been influenced by reading Frank Bokken's "C++ Annotations". I keep most data members of classes private or protected and usually with names like d_x, d_y, d_weights, etc. then provide accessor functions named x, y, weights, etc. Generally the accessors retu

[Rcpp-devel] overloaded methods in modules

2010-11-18 Thread Romain Francois
Hello, Up to now, a class exposed by a module could only have one method of a given name. I've now lifted that restriction by applying the same sort of trickery as in this thread: http://article.gmane.org/gmane.comp.lang.r.rcpp/929 Consider this simple C++ class : class Randomizer { public:

Re: [Rcpp-devel] Question concerning use of Raster in C vi Rcpp plugin and inline

2010-11-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/17/2010 10:44 AM, Rainer M Krug wrote: > On 11/17/2010 10:26 AM, Romain Francois wrote: >> Le 17/11/10 10:17, Rainer M Krug a écrit : >>> On 11/16/2010 05:49 PM, Douglas Bates wrote: >>> Hi Douglas, >>> I enclose a rewrite which compiles and