[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
object theoretical question
- Subject: object theoretical question
- From: Brad Gom <b_gom(at)hotmail.com>
- Date: Fri, 18 Feb 2000 15:50:36 -1000
- Newsgroups: comp.lang.idl-pvwave
- Organization: University of Hawaii
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:18490
How computationally expensive is the 'GetByName' method function in the
IDL object graphics objects?
I am building a rather specific object, which contains plot views,
models, plots, etc. among other things. In my object's methods, I will
of course need to access the various members. Is it better to set up
explicit object references in my object definition for the members I
will need to access, or to use the 'GetByName' methods to search through
the various heirarchies to find the object I want? Or are these two
ways equivalent?
ie. what are the pros/cons of using this approach:
******************
PRO obj__define
struct = { obj, $
thisPlot: obj_new(),$
thingy: obj_new(), $
anotherThingy: obj_new(), $
...
thingyN:obj_new() $
}
END
(and using the self.[member] references directly in the methods)
*****************
vs. this approach:
*****************
PRO obj__define
struct = { obj, $
INHERITS IDL_Container, $ (or inherit IDLgrModel or
whatever is appropriate)
}
END
(and use a self->Add method to add objects during the initialization,
and then use a self->Get or self->GetbyName method to find things)
*****************
Thanks
Brad Gom