help-octave
[Top][All Lists]
Advanced

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

Re: structures, lvalues and handle graphics


From: Nimrod Mesika
Subject: Re: structures, lvalues and handle graphics
Date: Sun, 03 Sep 2000 19:03:54 +0200
User-agent: Mutt/1.2i

On Sun, Sep 03, 2000 at 01:10:10PM +0200, Kai Habel wrote:
> ocatve_figure : octave_base_value {
>   private:
>     int id
> ......
> };
> The set/get pair would access the public methods getProperty,setProperty.
> 
> I am not sure if it works this way, especially the derivation from
> octave_base_value. 

Deriving from octave_base_value is a good idea, I believe, but still
does not help with accessing the fields (aka properties).

You see, the problem is not with the get member function.
do_struct_elt_idx_op is called to read the contents of a field from
an octave_value. You can override this function and return the
status of the graphics object.

Setting a property is where the problem is. The function
struct_elt_ref is called to return an octave_lvalue. No member
function is called to set a new value.

Now, as I said, an octave_lvalue can run a specified function when
its value is altered (so you could update the original object), but
currently Octave does not supply any arguments to this function (see
oct-lvalue.h -- the chg_fcn member function). This need to be
changed


> The graphic classes are a importend piece of infrastructure. It is the
> part independend of the graphic library. If this part is is fixed, we
> can implement, the actual functions using the graphic library (VTK,...)

Everyone seems very fond of VTK. Does it have all the necessary
functionality? Multiple axes on the same canvas, good 2D support,
etc.? 

Oh and about the `graphic classes' as you put it -- this is the easy
part (unless you dream of multithreaded octave and similar
stuff...). The hard part is fixing all those tiny little details
with the graphics package you select (vtk, gtkplot, etc.). They are
all very different and, of course, Matlab has defined a complex
interface to adhere to.

-- 
Nimrod.
http://www.geocities.com/rodd_27



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

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