use of vtbl

"Michael BANTLE" <>
6 Aug 2001 03:59:46 -0400

          From comp.compilers

Related articles
use of vtbl (Michael BANTLE) (2001-08-06)
Re: use of vtbl (2001-08-08)
Re: use of vtbl (Cristian Zoicas) (2002-08-04)
Re: use of vtbl (Gabriel Dos Reis) (2002-08-10)
Re: use of vtbl (Lieven Marchand) (2002-08-10)
Re: use of vtbl (Bill Gibbons) (2002-08-10)
Re: use of vtbl (Hans Aberg) (2002-08-14)
[1 later articles]
| List of all articles for this month |

From: "Michael BANTLE" <>
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.