home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11817 comp.std.c++:999
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!sybus.sybus.com!myrddin!tct!chip
- From: chip@tct.com (Chip Salzenberg)
- Subject: Re: Downcasting and mortal sin (was run-time type checking)
- Message-ID: <2A784613.34A4@tct.com>
- Date: Thu, 30 Jul 1992 19:42:11 GMT
- References: <2A75806A.826A@tct.com> <1992Jul29.164343.21959@cadsun.corp.mot.com>
- Organization: TC Telemanagement, Clearwater, FL
- Lines: 23
-
- According to shang@corp.mot.com:
- >In article <2A75806A.826A@tct.com> chip@tct.com (Chip Salzenberg) writes:
- >> virtual boolean Animal::can_mate_with(const Animal&);
- >
- >I'm interested in the implementation of your "can_mate_with" in a derived
- >class. Whould you show me how it is done without RTTI?
-
- Of course.
-
- >(1) Do not supply your own RTTI through virtual functions.
- >(2) Do not flood virtual functions in the base for each possible derived
- > classes.
-
- Ah, so you already know how it can be done.
-
- >Okay?
-
- No, not okay. I do not program with one hand tied behind my back.
- The complete language is always at my disposal.
- --
- Chip Salzenberg at Teltronics/TCT <chip@tct.com>, <73717.366@compuserve.com>
- "Do Rush place weird subliminal backmasked messages in their songs to
- compel unwilling geeks to commit evil .sig atrocities?" -- Dean Engelhardt
-