use of vtbl

"Michael BANTLE" <Michael.Bantle@t-systems.de>
6 Aug 2001 03:59:46 -0400

          From comp.compilers

Related articles
use of vtbl Michael.Bantle@t-systems.de (Michael BANTLE) (2001-08-06)
Re: use of vtbl fjh@cs.mu.OZ.AU (2001-08-08)
Re: use of vtbl zoicasc@hotmail.com (Cristian Zoicas) (2002-08-04)
Re: use of vtbl gdr@soliton.integrable-solutions.net (Gabriel Dos Reis) (2002-08-10)
Re: use of vtbl mal@wyrd.be (Lieven Marchand) (2002-08-10)
Re: use of vtbl bill@gibbons.org (Bill Gibbons) (2002-08-10)
Re: use of vtbl haberg@matematik.su.se (Hans Aberg) (2002-08-14)
[1 later articles]
| List of all articles for this month |

From: "Michael BANTLE" <Michael.Bantle@t-systems.de>
Newsgroups: comp.compilers
Date: 6 Aug 2001 03:59:46 -0400
Organization: Compilers Central
Keywords: C++, question
Posted-Date: 06 Aug 2001 03:59:46 EDT

Hi to all,


Is there any simple explanation out there on how to use the vtbl of a class
directly. The only compiler I found with easy to use information on this
topic is Microsoft's VC++:


        get it:
            VTBLENTRY** pVtbl = (VTBLENTRY**)pClassPointer;


        then use it:
            ((<cast it appropriate>)(*pVtbl)[<index to method>])(pClassPointer,
<additional method parameters>);


Please help me on bare bones like the one shown for Sun and/or GNU.


Thanks to everyone who reads this.


-- Michael
[The structure of vtbl's isn't standardized, although in practice they're
all pretty much the same. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.