Nicolas Gauvin (nicolas++at++cae.ca)
Wed, 2 Jul 1997 10:16:55 -0400
My understanding is that it is not possible to save a pointer to a true member
function partly because of the implicit 'this' parameter. I wouldn't be
surprised that it was forcefully prevented during the design of the
C++ language since it is not really "object oriented". Virtual funcs are the
way to go instead.
You can still save pointers to static member functions since they are just
like plain C functions and used them in systems that require you to provide
callbacks. Such a function can be used as an intermediate path to a true member
function provide that you have a way of retrieving a class pointer.
Section 18 of the C++ faq discusses this whole issue in greater details.
(rtfm.mit.edu in /pub/usenet/something)
--
Nicolas Gauvin CAE Electronics Ltd., 8585 Cote De Liesse
3D Graphics Software Saint-Laurent, Quebec, Canada, H4L-4X4
nicolas++at++cae.ca Tel: (514) 341-2000 x2275, Fax: (514) 340-5496
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:34 PDT