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

Home » Public Forums » archive » _ref_extra
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: _ref_extra [message #26335 is a reply to message #26237] Wed, 22 August 2001 23:58 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
JD Smith <jdsmith@astro.cornell.edu> writes:

>>
>> JD Smith wrote:
>>>
> ... and I for one have pined for a native method
> within IDL to allow this. This does not mean, however, that allowing
> such carte blanche access is always good idea. Typically, a *small*
> subset of a class' data fields are useful and stable for public
> consumption.
>
> JD

Wouldn't it be lovely, had the folks at RSI thought about a "public" and "private"
attribute for object fields? This is another occasion where the quick-and-dirty IDL
clashes with the programming language IDL.

BTW: Here's the 7 liner that I use in my Base object (and hence all objects) to do
what Pavel advertises. I haven't tried if Struct_Assign also works the other way
round ...

Cheers,

Martin

; ------------------------------------------------------------ -------------------------
; GetState:
; This method returns the object "data" as a structure. Pointers and
; object references are not copied, i.e. they are returned as
; unitialized variables (NullPointer)!

FUNCTION MGS_BaseObject::GetState

ok = Execute('retval = {'+Obj_Class(self)+'}') ;; Same trick as in Copy
IF ok THEN BEGIN
Struct_Assign, self, retval
ENDIF ELSE BEGIN
retval = { nothing: 0L }
ENDELSE

RETURN, retval

END


--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: processing widget events from multiple hierarchies
Next Topic: Re: polyfill errors?

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

Current Time: Wed Oct 08 16:52:22 PDT 2025

Total time taken to generate the page: 0.00344 seconds