From: Alan W. I. <ir...@be...> - 2002-12-28 23:08:21
|
As a result of the recent commits, all examples work now except for the three examples with the full 3-D PLplot API, (x09, x15, x16). In particular x08 works now without problems. The final things on my Java agenda before release are character string arrays (which will allow command-line processing and the x01 version string output), and making a simplified version of the full 3-D API work. Those two changes should allow all implemented java examples to work completely, and should also give our users access to the complete common PLplot API from Java. There are some additional limitations to this interface which I don't believe are release critical and which, in any case, somebody else with more than my nominal java expertise will have to deal with. I list those limitation here so that those of you with further interest may have a chance to tackle these issues before the release if you care to do so. (1) A user-friendly wrapper to the interface should be made in java to give us a variety of different simplified argument lists similarly to the way plplot.py wraps the plplotc extension module. If someone will show me the way by writing such a java wrapper with just one argument list simplification I can fill out the rest following the user-friendly simplified argument list variations that have been implemented in plplot.py. (2) Each example has a rather ugly combination of two commands: PLStreamc plsdummy = new PLStreamc(); plplotjavac pls = new plplotjavac(); The first one dynamically loads the wrapper library (with the stream stuff commented out because the plplot API is not available to that class at the moment), and the second one loads the plplotjavac wrapper made by swig which then pulls in everything else that is required. Obviously, this should all be done with one command where we refer to PLStream, the user-friendly wrapper which in turn wraps PLStreamc, which in turn (after loading the library) wraps plplotjavac and then finishes with the stream stuff that Geoffrey put in for the old interface. But it is going to require somebody (that word again....;-)) more expert in Java than me to implement this. As I said above, I can fill out all the required argument list variations once somebody shows me how to make just one of them. (3) Only the default java double-precision can be used from Java. That is what the examples use (by default) so that is what works. I believe the way to do this properly with swig is simply to make both single and double precision versions of the PLplot API description, and the two possible function calls will be overloaded. N.B. This java precision issue should not be confused with the double or single precision PLplot library issue. I have been doing all my testing with the single-precision form of the PLplot library, and all double-precision java entities are transformed to single-precision without problems. I assume the double-precision form of the PLplot library will work fine as well since no transformation is required in that case, but I have not tested it. (4) The callback functions should be done properly so that java methods can be used for transformations for the full 3-D PLplot API. This approach would be similar to the way the python interface fully implements the callback functions (see the mypltr definition and use in xw09.py). For now, though, the "simplified version of the full 3-D API" referred to above means we will be taking the simplified tcl approach to the 3-d API for now rather than the preferred complete callback approach used for the python interface. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |