Patent · US Expired

Method and system for accessing virtual base classes

US5854931A · kind A · utility

6Cited by
2References
15Claims
0Family size

Assignee

Inventors

Key dates

Filing dateJan 22, 1997
Grant dateDec 29, 1998
Priority date
Expiry dateJan 22, 2017

Classification

  • Technology area (CPC G)Physics
  • CPC primaryG06F9/449
  • WIPO fieldComputer technology
  • WIPO sectorElectrical engineering

Abstract

A method for a computer compiler for an object-oriented programming language for implementing virtual functions and virtual base classes is provided. In preferred embodiments of the present invention, the data structure layout of an object includes a virtual function table pointer, a virtual base table pointer, occurrences of each non-virtual base class, the data members of the class, and occurrences of each virtual base class. If a class introduces a virtual function member and the class has a non-virtual base class with a virtual function table pointer, then the class shares the virtual function table pointer of the non-virtual base class that is first visited in a depth-first, left-to-right traversal of the inheritance tree. In preferred embodiments of the present invention, each instance of a given class shares a set of virtual function tables and virtual base tables for that class. In preferred embodiments, adjusters are used when a function member in a derived class overrides a function member that is defined in more than one base class, and when a derived class has a base class that overrides a function member in a virtual base class of that class and the derived class itsel…

Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.