发明名称 Replaceable classes and virtual constructors for object-oriented programming languages
摘要 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.
申请公布号 US6895581(B1) 申请公布日期 2005.05.17
申请号 US20000539090 申请日期 2000.03.30
申请人 MICROSOFT CORPORATION 发明人 CHKODROV GUEORGUI B.;GREEN JARED M.;KAUR NARINDER
分类号 G06F9/44;G06F9/45;(IPC1-7):G06F9/45 主分类号 G06F9/44
代理机构 代理人
主权项
地址