comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Application Development
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Application Development [message #92182 is a reply to message #92179] Tue, 27 October 2015 12:54 Go to previous messageGo to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Mon, 26 Oct 2015 11:25:15 -0700 (PDT), rryan.asu@gmail.com wrote:

> So is there a way to get a list of all the routines, including objects, for this project?


Hello Russel,

24 hours and no answer. So I will tell you my solution(s), which may
be a little bit exotic. [*]

The simple way is to write an extra line of code for each object
class. If FOO is the name of the object class, write
if 0b then foo__define
preferably in every routine creating objects of the class FOO. This
statement may look a little bit strange, because this line is never
executed. (0b of cause is always FALSE.) However the IDL routine
ROUTINE_INFO,/UNRESOLVED responds to this line, and therefore
RESOLVE_ALL compiles the file foo__define.pro. As you said, you have
all methods of an object class in this file.

The second way uses the same trick, but works with an extra file
foo.pro:

function foo,par1,par2,...,_ref_extra=extra
return,obj_new('foo',par1,par2,...,_strict_extra=extra)
foo__define
end

Again the line foo__define is never executed, however
ROUTINE_INFO,/UNRESOLVED finds this procedure, when you write
obj=foo(par1,par2,...,key1,key2,...)
instead of
obj=OBJ_NEW("foo",...)
at object creation. (This is important!) Note that this way does not
interfere with the "simplified object creation", introduced in IDL
8.0. Even better, it makes it possible for older IDL versions.

I think, the second way would be beneficially, if you had separated
files for your class methods, e.g. one file for every method. You
would need to write the list of all the files at one place only.

I hope, the above is clearly understandable.

Cheers, Heinz


[*] The best of cause would be, the IDL developers gave
ROUTINE_INFO,/UNRESOLVED a new keyword to include the methods in the
list of procedures/functions. However I don't know, if this is
possible. ;-)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: interpolation
Next Topic: layout_plot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 15:30:45 PDT 2025

Total time taken to generate the page: 0.39872 seconds