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 #41979 is a reply to message #41977] Thu, 09 December 2004 09:32 Go to previous messageGo to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
> Do you want:
>
> c2->c1::datos
>
> ???
>
> This will invoke the datos method defined in c1.
>
> Karl
>

Not exactly.

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 :(

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. 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).
But i supossed this point of view is not possible in IDL.

My solution is to use an OBJ_ARR, put objects WOMAN and MAN in it and
consider that all are objects PERSON, then execute "datos" method on
every object of the array.

Thanks anyway for your time.
[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: Fri Oct 10 13:59:06 PDT 2025

Total time taken to generate the page: 1.20079 seconds