octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: color_radio_property implementation


From: Przemek Klosowski
Subject: Re: color_radio_property implementation
Date: Wed, 25 Apr 2007 16:30:32 -0400 (EDT)

   | I wanted to keep the java code quite autonomous and usable outside
   | octave. So using the property database within octave was not really
   | a solution. Moreover, as java and C++ does not share the same memory
   | space, it would have been rather complicated and inefficient to have the
   | properties in C++/octave and have the java part constantly 
getting/converting
   | values from C++/octave to java.

Don't know about java and c++ but we used to do that all the time in Tcl and C:
access the 'property database' (Tcl hash tables, which is the fundamental data
type in Tcl) via an API in C, and via the array syntax in Tcl. It helped that
C doesn't have hash arrays so you need to use API anyway, and Tcl-provided
API was actually pleasant to use.

In your case, could java use a get/set function approach that instantiates as
either simple java variable access (when you use it without Octave) or a native
method, calling the C++ API if used with Octave?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]