Providing access to user interface elements of legacy application programs |
| An architecture is provided that enables an accessibility aid to directly access and manipulate ... |
|
Translation of object queries involving inheritence |
| Join expressions, expressed in terms of objects, are translated into a relational database join ... |
|
Development system with application browser user interface |
| The present invention is embodied in a component-based, rapid application development (RAD) Java ... |
|
Multi-processor JAVA subsystem |
| OF THE INVENTION Reference will now be made in detail to the preferred embodiments of the ... |
|
Context programming in object-oriented environments |
| The present invention is directed to control of time structured or other context related data by ... |
|
Method and apparatus for centralized management of a storage virtualization engine and data services |
| In accordance with the principles of the invention, an SVE control system uses management software ... |
|
Prime implicates and query optimization in relational databases |
| The improved normalization methodology of the present invention is based on Socher's minimization ... |
|
Method for transmitting and displaying an interchannel interval image in a cable system |
| A system and method is provided for displaying an image in a cable system including a cable headend ... |
|
|
Replaceable classes and virtual constructors for object-oriented programming languages
| Details |
Inventors: Chkodrov, Gueorgui B.; Green, Jared M.; Kaur, Narinder;
Assignee: Microsoft Corporation (Redmond, WA)
Primary Examiner: Dam; Tuan
Assistant Examiner: Kendall; Chuck
Attorney, Agent or Firm: Leydig, Voit & Mayer, Ltd.
An extension of object-oriented programming languages enables the use of replaceable classes and virtual constructors, thereby allowing existing code that creates objects of a base class to be reusable for creating instances of a new class derived from the base class. A base class intended to be replaceable later is declared to be replaceable. In the case of a compiled language, the programming code defining and using the base class is compiled into a reusable module. Later, a new class derived from the base class is identified as a replacement for the base class and is used in new programming code that uses the existing reusable module. The replacement relationship between the old base class and the new class is registered. During execution of the program, when the old code of the reusable module indicates the creation of an object of the base class, the registered replacement information is referenced. If the old class is to be replaced with the new class, the creation information for the new class is passed instead so that an object of the new class is created. The class replacement may be implemented with compiled and interpreted programming languages. When a compiled language is used, the class replacement may be implemented with new compiler-supported features that emit data for class replacement into the .obj files, but may also be implemented without requiring changes to existing compilers. |
|
DETAILED DESCRIPTION In view of the foregoing, the present invention provides a new approach and language extension to object-oriented programming that uses replaceable classes and virtual constructors to enable the reuse of existing code written for creating objects of a base class to dynamically create objects of a new class inheriting from the base class. The class replacement can be implemented in both compiled and interpreted languages, but its advantages are especially significant when the source code containing the definitions of the replaceable classes is compiled to form a reusable module. In accordance with the invention, a class that is intended to be replaceable later is declared in the source code as being a replaceable class. In subsequent software development, a replacement class derived from the replaceable class may be defined in new source code, and an instruction to replace the base class with the new derived class during program execution is included in the new source code. In the case where the programming language is a compiled language, such as the C++ language, the existing source code that defines the old base class may be compiled into a reusable module. The new source code with the replacement class is compiled into a new module, and the old and the new modules are then combined into an executable program. During program execution, the replacement relationship between the base class and the new derived class is registered. When the instruction in the old code to create an object of the base code is executed, the registered replacement information is referenced. If registered replacement information indicates that the base class is to be replaced with the new class, an object of the new class is created instead of an object of the old class. The class replacement allows an existing module to be reused to create objects of the new class without the need to modify and recompile the source code for the existing module. This ability to reuse existing code to create objects of new classes greatly facilitates incremental development of a software application by introducing new derived classes to provide refined functionality and features
|
|