From: Doug H. <dh...@uc...> - 2002-01-24 21:45:31
|
Raphael: > > However, I still think that the PP definition should be automaticaly > generated from api.xml (it should be easy to modify my parsing scripts to do > that), such that there will be a low level layer that will mimic the PLplot > C API in Perl/PDL. Then, as a second step, a OO layer can be written atop > of that low level layer bindings. Keeping things modular like that has the > advantage that it will be easy to comply in the future to any generic plot > API for PDL. I'm already doing this (creating a low level interface that maps directly to the plplot calls, and then putting a higher level interface on top of it) but I'm working from a (slightly edited) version of plplot.h instead of api.xml. Is there a benefit to working from api.xml instead of the plplot.h? All things being equal, I'd rather work from the source instead of the doc... If there is a good reason to use api.xml, I would not mind adding the XML parser as a dependency. One thing more: PP is a great tool for interfacing to PDL, but it has one small limitation which makes the low level interface less useful to call directly: It handles non-PDL arguments (that is char, char * or function pointers) in the so-called 'OtherPars' section. This means that when calling the perl version, the arguments get out of order, so void c_plmtex(const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text); becomes in perl: plmtex($disp, $pos, $just, $side, $text); (All the char * inputs are put last). It is for this reason that I generally don't advertise the low level routines and present users with only the high level versions. Regards, Doug Hunt -- > > -- > Rafael -- dh...@uc... Software Engineer III, Sometimes Sysadmin UCAR - COSMIC, Tel. (303) 497-2611 |