octave-maintainers
[Top][All Lists]
Advanced

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

Re: How to implement IPT strel.m ?


From: John W. Eaton
Subject: Re: How to implement IPT strel.m ?
Date: Tue, 3 Aug 2004 13:35:54 -0400

[I'm moving this to the maintainers list.  --jwe]

On  3-Aug-2004, David Bateman <address@hidden> wrote:

| Octave doesn't have classes. The fact is in discussion with Paul
| Kienzle, I've thought about the problem a bit. Implementing all of the
| infrastructure for classes in octave is pretty easy with the code that
| already exists.  What seems to me to be the hard bit is modifiying
| Octave itself so that the directory "@class" is interpret as a private
| directory that contains all of the functions specific to the class.
| 
| I'm not sure I understand all that would have to change within Octave
| to support private directories and so don't won't to tackle this
| problem, until I either completely understand how to implement private
| directories or someone has already done it.

The @class directory hack is similar to the private function
subdirectory hack.  It will require some changes to the file lookup
code (in liboctave/pathsearch.cc).  Some time ago, I pared down the
kpathsearch code and converted it C++ (use C++ strings, new/delete,
etc.) in anticipation of having to modify it to handle these new
features that are specific to Octave.  Also, I never liked the fact
that there was no clean separation between the basic file lookup code
and the TeX-specific features of the kpathsearch code.  Now the code
for file lookup that is actually used in Octave is much smaller than
before.  It is only about 3200 lines long in the file kpse.cc and the
file in CVS has about 600 lines that are not currently used, so it
could be even smaller.  We should be able to adapt this code and the
symbol lookup code in Octave's symbol table to do the right thing when
looking for functions once we define the proper search order.

I think the other tricks in supporting classes will be integrating the
dispatch code with the core of Octave and supporing the strange class
relationship hierarchy that Matlab has with "inferiorto" and
"superiorto" (this will affect the way function searches are performed
given the type of the first argument).

jwe



reply via email to

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