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

Home » Public Forums » archive » Re: What about real polymorphism ??
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: What about real polymorphism ?? [message #41977 is a reply to message #41976] Thu, 09 December 2004 09:45 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Antonio Santiago writes:

> I want to view C2 as a C1 class object but when i invoque "datos" it
> will be execuete the method defined in C2.
> The problem is the point of view. I want to view like in java or other
> OO language but IDL cant accept this point of view :(

It is possible that no one who works with IDL
understands this point of view, I guess, but
I still don't get it. :-(

I think the problem I'm having is over the word "view".
What does that mean? How does one "view" an object?
If you want to know if c2 "is a" c1 object, it is easy
enough to tell:

PRINT, Obj_Isa(c2, Obj_Class(c1))

If you want to treat it "as if it were" a c1 object:

c2 -> c1::Datos

How else would one "view" it?

> With PERSON, MAN and WOMAN is more clear. I want to view a MAN or a
> WOMAN only as a PERSON, something like a cast.

What do you think is preventing you from doing this?

> Later when i execute
> methods over this PERSON it will execute the "datos" method of WOMEN or
> MAN depending of its subtype (that's polymorphism).

Yes, and... I miss the point. This is *exactly* what IDL does.

> But i supossed this point of view is not possible in IDL.

Donno. I can't really tell what this point of view is yet. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stretching an image
Next Topic: ENVI and ROIs

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

Current Time: Sat Oct 11 12:33:01 PDT 2025

Total time taken to generate the page: 0.88720 seconds