From: Alan W. I. <ir...@be...> - 2006-05-06 01:46:18
|
On 2006-05-05 17:30-0700 lan...@qw... wrote: > Are there Ada bindings for PLplot? No, but there is hope if you are willing to do some work. There are two approaches for providing a language binding to PLplot. (1) Do a hand-generated interface. That's how we used to do our Python and Java interfaces, but it was quite time consuming and error prone to do the same boiler-plate transformations again and again for different argument list orderings for each of our functions. (2) If you have the ability to hand-craft an interface, then you can formulate all those Ada <--> C argument transformation rules for each type of variable using the Simplified Wrapper and Interface Generator (SWIG). Fortunately, those interface rules had already been done in SWIG for Python and Java (and many other languages, see http://www.swig.org/compat.html#SupportedLanguages) so it took a relatively limited effort to produce complete Python and Java PLplot interfaces using the SWIG approach, and we would never go back to using a non-SWIG approach to generate those interfaces. We definitely encourage additional language interfaces to PLplot using the SWIG-based approach. Unfortunately, nobody has yet formulated the C <--> Ada transformation rules in SWIG. So you would have to do that first, then finish with the (relativly easy) specific SWIG configuration for the Ada interface to PLplot to apply those transformation rules for the large variety of argument list arrangements for the C functions in our API. Hope this overview of the problem of generating new language interfaces to PLplot helps. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |