octave-maintainers
[Top][All Lists]
Advanced

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

Re: Question about octave_function


From: John W. Eaton
Subject: Re: Question about octave_function
Date: Wed, 15 Jan 2014 20:38:53 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 01/15/2014 05:13 PM, Michael Goffioul wrote:
Hi John,

I'm trying to solve a problem with classdef package functions. While
analyzing the issue, I'm wondering what's the relation/redundancy
between octave_function::dir_name and octave_user_function::file_name
and in which context one should prefer one over the other.

The problem I'm solving is related to checking out-of-date status of
package functions. The function out_of_date_check is missing the package
information and fails to compare a loaded package function with the
load_path information.

Somehow I have to provide the package information to out_of_date_check.
I believe the best way would be to get that information from the
octave_function object. As out_of_date_check is also used for function
handles, this would make such handles to work for package functions. I'm
thinking about 2 possible implementations:
1) attach package information as another member to octave_function object
2) extract package information from octave_function::dir_name (by
scanning the +-folders at the tail of the path and reconstructing the
package name); this is the reason for my initial question above

Alternatively, I could also add another argument to out_of_date_check
for passing the package name. But then the package information would be
lost in function handles (ov-fcn-handle.h).

I prefer the idea of parsing/storing the info once and caching it in
the octave_function object so that it is easy to retrieve when needed.

jwe




reply via email to

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