[Rcpp-devel] c++ graphics device
Dirk Eddelbuettel
edd at debian.org
Fri Mar 26 13:18:13 CET 2010
(resending, this time to list as well, sorry --Dirk)
On 26 March 2010 at 07:44, Romain Francois wrote:
| Hello,
|
| R's graphics device drivers are currently written using poor man's c++:
| you are supposed to create a pDevDesc struct (defined in
| R_ext/GraphicsDevice.h) and then fill it with function pointers, e.g
| (from the NULL device) :
|
| /*
| * Device functions
| */
| dev->close = NULL_Close;
| dev->activate = NULL_Activate;
| dev->deactivate = NULL_Deactivate;
| dev->size = NULL_Size;
|
| I'd like (not now, but sometime) to encapsulate this into C++ so that
| writing a device would more naturally be done by deriving some class
| rather than the pseudo c++ done in C implementation.
|
| I believe this could help people implement other graphics devices using
| c++ idioms.
Are there such people? ;-)
| Should this go into Rcpp (I think I prefer this option) or should it be
| some other package (RcppGD, or something).
Not sure. If we add it, we add a burden of more unit tests etc for something
few users may use. If we do not add it, we scatter packages further. Can be
argued either way.
Dirk
--
Registration is open for the 2nd International conference R / Finance 2010
See http://www.RinFinance.com for details, and see you in Chicago in April!
More information about the Rcpp-devel
mailing list