Method and system for implementing virtual functions of an interface
First Claim
1. A method of operating a computer system, comprising:
- providing a class object corresponding to a class of an object oriented programming language comprising a virtual function;
defining an implementation of the virtual function; and
automatically inserting an implementation of the virtual function in an second class object wherein the second class object has an inheritance relationship with the class object.
0 Assignments
0 Petitions
Accused Products
Abstract
A method and system for implementing functions in a class that inherits an interface and that inherits an implementing class which implements the interface. A forwarding system adds to the class for each virtual function a forwarding implementation of that virtual function. The forwarding implementation forwards its invocation to the implementation of that the virtual function in the implementing class. The forwarding system implements a special forwarding instruction that specifies the interface and implementing class. A developer of a class that inherits the interface and the implementing class inserts the forwarding instruction into the class definition. When the forwarding system encounters such an instruction during compilation of the class definition, the forwarding system provides an implementation of each virtual function of the interface that forwards its invocation to a corresponding virtual function in the implementing class. The forwarding system also forwards virtual functions of any direct or indirect base interface of the interface to the implementing class.
-
Citations
8 Claims
-
1. A method of operating a computer system, comprising:
-
providing a class object corresponding to a class of an object oriented programming language comprising a virtual function;
defining an implementation of the virtual function; and
automatically inserting an implementation of the virtual function in an second class object wherein the second class object has an inheritance relationship with the class object. - View Dependent Claims (2, 3, 4)
-
-
5. A computer-readable medium bearing computer executable instructions for carrying out the acts of:
-
providing a class object comprising a virtual function;
defining an implementation of the virtual function; and
automatically inserting an implementation of the virtual function in a second class object wherein the second class has an inheritance relationship with the class object. - View Dependent Claims (6, 7, 8)
-
Specification