From 3423799421523684790
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,c9300cc6a0b28243
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-08-08 16:29:52 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: deutronium@web.de ("cody")
Newsgroups: comp.std.c++
Subject: Re: no_base_call
Date: Fri, 8 Aug 2003 23:29:52 +0000 (UTC)
Lines: 44
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <GtNYa.6$0q2.5739@news.ecrc.de>
References: <_azXa.385380$jp.11007710@twister.southeast.rr.com>
X-Trace: mail2news.demon.co.uk 1060385392 25161 10.0.0.1 (8 Aug 2003 23:29:52 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 8 Aug 2003 23:29:52 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 19lGgB-0006Xg-00
	for mail2news@news.news.demon.net; Fri, 08 Aug 2003 23:29:51 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id JAA09408; Sat, 9 Aug 2003 09:29:48 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Reply-To: "cody" <deutronium@web.de>
X-Newsgroups: comp.std.c++
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-NNTP-Posting-Date: Fri, 08 Aug 2003 15:21:42 MET DST
X-Spamscanner: mailbox1.ucsd.edu  (v1.2 May 26 2003 01:55:38, 0.0/5.0 2.55)
X-MailScanner: PASSED (v1.2.7 42390 h78DLnk4055907 mailbox1.ucsd.edu)
X-Spam-Status: No, hits=-4.3 required=5.0
	tests=BAYES_10,PRIORITY_NO_NAME,REFERENCES
	version=2.55
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Xref: archiver1.google.com comp.std.c++:20534

you can't create a virtual function and say what somebody has to do with is.
this is the decision of the programmer.

there are 3 things which you can do with a vitual function when overriding
it:

replace it:
virtual void Func()
{
// your code goes here
}

extend it:
virtual void Func()
{
Base::Func(); // call the base
// your code goes here after the base call
}

intercept it:
virtual void Func()
{
// your code before the basefunc is called
Base::Func(); // call the base
}

when you design a class you can never know what a programmer will do with
your virtual functions in its derrived classes. if you would know you
wouldn't need them.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu
[noncommercial and no fucking ads]


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



