Introduction to OOP: Chapter 21 : Implementation [next] [previous] [audio] [real] [text]

Virtual Method Tables

Each object maintains a pointer to a table, called the virtual method table.

Virtual methods are identified by a fixed address in this table.

A method call, such as, C)

is translated into

(* A.virTable[idx])(A, B, C)
Intro OOP, Chapter 21, Slide 5