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

Home » Public Forums » archive » 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
What about real polymorphism ?? [message #41991] Thu, 09 December 2004 06:12 Go to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
Hi group,

my problem is with IDL's polymorphism, i think it's a half-polymorphims
instead real polymorphism.

Supose we have a class Person and two subclasses Man and Woman. Class
Person has a class called GetInfo() that is overriden in both Man and
Woman. The question is:

How can i create an array of Person's (that is Man or Woman objects) and
call the method GetInfo() in the way that depends on the subtype of
every object it invoques the Man GetInfo() or the Woman GetInfo()??

One possible solution is using OBJ_ISA funtion for every object in the
array but i want to know if it is possible only with polymorfism in IDL
like in Java or other OO languages.

Thanks.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: building loops at the command line
Next Topic: Reg VarRoi

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

Current Time: Fri Oct 10 08:33:35 PDT 2025

Total time taken to generate the page: 0.72346 seconds