home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11697 comp.std.c++:982
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!usc!sdd.hp.com!mips!mips!rtech!ingres!bobm
- From: bobm@Ingres.COM (Bob McQueer)
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <1992Jul28.233654.3466@pony.Ingres.COM>
- References: <BryFLI.Hz2@world.std.com>
- Date: 28 Jul 92 23:36:54 GMT
- Lines: 19
-
- In <l7b2krINN10u@exodus.Eng.Sun.COM>,
- dated 28 Jul 1992 17:57:47 GMT,
- chased@rbbb.Eng.Sun.COM (David Chase) writes:
- > >... when I want to know at run time if
- > >an object is of a particular class, what I really want to ask is "is it this
- > >class, or any class derived from it?", which implies somebody taking the
- > >vtable (enhanced into class descriptor) pointer in the ...
- >
- > Do be careful not to confuse the desired meaning of "X is a Foo" with
- > how it is actually implemented. For single inheritance, the best
- > implementation is probably not what you think it is . ...
-
- Point taken. You are correct. However, the question I want to ask still
- stands, and a simple comparison of my vtable pointer with the pointer for
- a given class isn't sufficient, which was the point I really wanted to make.
- There possibly are more efficient ways to do it than to ascend through the
- tree to the original base class given any underlying implementation. Again,
- this underscores the need to think through this within the language definition,
- rather than having everybody reimplement it in their favorite ad-hoc manner.
-