US20010016881A1 - Method for emulating native object oriented foundation classes on a target object oriented programming system using a template library - Google Patents

Method for emulating native object oriented foundation classes on a target object oriented programming system using a template library Download PDF

Info

Publication number
US20010016881A1
US20010016881A1 US08/833,085 US83308597A US2001016881A1 US 20010016881 A1 US20010016881 A1 US 20010016881A1 US 83308597 A US83308597 A US 83308597A US 2001016881 A1 US2001016881 A1 US 2001016881A1
Authority
US
United States
Prior art keywords
native
object oriented
oriented programming
application
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US08/833,085
Other versions
US6356957B2 (en
Inventor
Humberto A. Sanchez
Lance D. Kind
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hewlett Packard Development Co LP
Original Assignee
Hewlett Packard Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hewlett Packard Co filed Critical Hewlett Packard Co
Priority to US08/833,085 priority Critical patent/US6356957B2/en
Assigned to HEWLETT-PACKARD COMPANY reassignment HEWLETT-PACKARD COMPANY ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: SANCHEZ, HUMBERTO A., II., KIND, LANCE D.
Assigned to HEWLETT-PACKARD COMPANY reassignment HEWLETT-PACKARD COMPANY MERGER (SEE DOCUMENT FOR DETAILS). Assignors: HEWLETT-PACKARD COMPANY
Publication of US20010016881A1 publication Critical patent/US20010016881A1/en
Application granted granted Critical
Publication of US6356957B2 publication Critical patent/US6356957B2/en
Assigned to HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P. reassignment HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: HEWLETT-PACKARD COMPANY
Adjusted expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Definitions

  • the present invention relates generally to software reusability, and more particularly, to a system and method for porting code written to operate on a native object oriented computer programming system to alternative target object oriented computer programming systems by emulating the native object oriented foundation classes using a porting layer and a template library.
  • Object Oriented Programming Systems have been developed and are in use in the computer industry to provide a sophisticated and efficient method for modeling real-world objects and for providing the ability to expand and reuse other objects.
  • Objects are complex data structures which model real-world entities, and are associated in classes and identified with their informational features (“attributes”) and functional features (“behaviors” or “methods”). Objects are effected using object oriented programming languages such as C++.
  • Objects are more readily classifiable into types, which are easily related to one another in subtype/supertype hierarchies.
  • Object oriented programming languages permit the programmer to flexibly define data types so as not to be constrained by limited predefined types.
  • Object oriented programming language types can be associated in classes which can “inherit” attributes and/or methods from other classes.
  • an application framework is developed for use by application programmers as the basis upon which software applications are built.
  • the application framework is a set of classes which provide services necessary to run on a specific operating system.
  • An example of an application framework is the Microsoft® Foundation Classes developed for the Microsoft® Windows operating system.
  • the application framework assists the application programmer by removing the application requirements from the operating system requirements by providing an object oriented Application Programming Interface (API).
  • An API can be implemented as an object with attributes and methods which performs services at lower levels in the programming layer hierarchy.
  • An API's defined attributes are derived from defined data types specific to the operating system.
  • An API's methods allow an application to access the API's attributes and also provide services while separating the application from the details unique to the specific operating system.
  • a particular OOPS manufacturer will provide an application framework and a set of defined APIs to a user or application programmer but will not release the source code which implements the framework and API calls.
  • This practice results in the requirement that all applications written using the application framework and defined APIs of the manufacturer's computer system be run only on the manufacturer's or a compatible computer system.
  • applications cannot be easily ported from one object oriented computer programming system based on one operating system to another object oriented computer programming system based on another operating system. It would be desirable to provide the ability for software applications written for one such object oriented computer programming system to be able to be run on alternative object oriented computer programming systems.
  • Another method for porting a software application from one system to another involves purchasing a source code license from the software application manufacturer to use and alter the source code of the application to interface properly with the target framework.
  • This method also incurs expense in obtaining the application source code license and requires valuable engineering time to modify the application source code to interface correctly with the application framework of the new environment.
  • this process must be repeated for each new version of the application software that is released and for every application that is to be ported to the other system.
  • the present invention provides an improved method of porting object oriented software applications from one object orient computer programming system to another.
  • the present invention also provides a system and method for porting applications from one object oriented programming system to another object oriented programming system that requires minimal overhead in cost and engineering time.
  • the present invention further provides a system and method for allowing any number of object oriented applications written for the same object oriented programming system (OOPS) to be ported to a different OOPS for the price of porting a single object oriented application from one system to the other.
  • OOPS object oriented programming system
  • a system and method for porting a software application from a native OOPS to a target OOPS where the native OOPS includes an application framework layer built on a set of defined native foundation classes and an operating system layer running a native operating system and the target OOPS includes an operating system layer running a target operating system different than the native operating system.
  • the software application ported by the present invention is implemented to interface with the native object oriented programming system via application programming interface (API) objects which are instances of the defined native foundation classes.
  • API application programming interface
  • the method of the present invention includes steps for defining a set of target object oriented programming system data types in terms of native object oriented programming system data types, and emulating the native foundation classes using calls to a template library such that the API method calls interface with the target operating system in a functionally equivalent manner as if the application were being run on the native OOPS.
  • the native foundation classes may be emulated by implementing a porting layer in an object oriented programming language.
  • the porting layer may include the set of target object oriented programming system data types, the template library, and a functional procedure implemented for each API method invoked by the native application. Each functional procedure maps a functionality of an API method to calls to routines in the template library.
  • the software application is then recompiled with the porting layer to generate a target executable software application which may be run on the target object oriented programming system.
  • the porting layer is implemented in the C++ programming language and the template library is the ANSI/ISO C++ Standard Template Libraries.
  • FIG. 1 is a block diagram of the structure of a native object oriented programming system.
  • FIG. 2 is a block diagram of the portion of the native object oriented programming system of FIG. 1 which is of interest to an application programmer.
  • FIG. 3 is a block diagram of the structure of a target object oriented programming system.
  • FIG. 4 is a block diagram of the portion of the target object oriented programming system of FIG. 3 which embodies the heart of the present invention.
  • FIG. 5 is a block diagram of the structure of the target object oriented programming system of FIG. 3 which incorporates the present invention.
  • FIG. 6 is a diagram illustrating an implementation of a preferred embodiment of the present invention.
  • FIG. 7 is a flowchart illustrating the method of the present invention.
  • FIG. 8 is an example native foundation class used to illustrate an example implementation of the present invention.
  • FIG. 9 is an example functionality description of the native foundation class of FIG. 8.
  • FIG. 10 is an example header file used in the implementation of the preferred embodiment of the present invention.
  • FIG. 11 is an example code illustration of a porting layer implementation of an example FRAMEWORK I API method.
  • FIG. 1 depicts the operating structure of an Object Oriented Programming System (OOPS).
  • the OOPS 10 may run a user application 20 which is facilitated by a plurality of programming layers 12 - 18 .
  • the user application 20 is an object oriented program written to direct and control activities of the OOPS 10 from an application programming layer 18 using application programming interface (API) calls.
  • API application programming interface
  • the APIs are functional objects defined for the OOPS 10 at an application framework programming layer 16 .
  • a framework FRAMEWORK I 22 also known as the foundation classes of the OOPS 10 , is defined and implemented, including the definitions and implementations of the APIs.
  • the implementation details of the framework FRAMEWORK I are generally not visible to the application 20 or application programmer from the application programming layer 18 .
  • the application framework programming layer 16 defines FRAMEWORK I foundation class attributes in terms of or derived from data types defined at an operating system programming layer 14 .
  • the application framework programming layer 16 also defines the FRAMEWORK I foundation class methods and implements the methods via attribute accesses and method calls to objects defined at the operating system programming layer 14 level by an operating system OPERATING SYSTEM I 24 .
  • the implementation details of the OPERATING SYSTEM I 24 are generally not visible from the FRAMEWORK I 22 or from the application framework programming layer 16 .
  • FRAMEWORK I 22 and OPERATING SYSTEM I 24 which are widely used in the industry is the Microsoft® Foundation Classes (MFCs) developed for use with the Microsoft® Windows-type operating systems (including Microsoft® Windows, Microsoft® Windows NT, Microsoft® Windows95 and Microsoft® Windows97).
  • MFCs Microsoft® Foundation Classes
  • the OPERATING SYSTEM I 24 comprises operating system objects which access and direct activity of the hardware programming layer 12 .
  • OPERATING SYSTEM I 24 is thus hardware specific.
  • the hardware programming layer 12 processes instructions as directed by the OPERATING SYSTEM I 24 , responds to interrupts, and manages data and instruction input and output (I/O) specific to the hardware configuration HARDWARE I 26 of the OOPS 10 .
  • the activity on the hardware programming layer 12 is ideally not visible from the operating system programming layer 14 .
  • the hierarchical nature of the OOPS 10 removes details of the specific operating system OPERATING SYSTEM I 24 and hardware configuration HARDWARE I 26 from the user or application programmer.
  • FIG. 2 is a block diagram of the portion of the OOPS 10 of FIG. 1 which is of interest to an application programmer.
  • the application 20 is implemented to operate on the OOPS 10 in a desired manner by making API method calls to objects defined by the foundation classes FRAMEWORK I 22 at the application framework programming level 16 .
  • the full operational functionality of the OOPS 10 is facilitated by the defined foundation classes of FRAMEWORK I 22 and the implementation details of FRAMEWORK I 22 are hidden from the application 20 .
  • the application 20 or its programmer need only know the foundation class definitions and functionality of FRAMEWORK I 22 in order to make appropriate API method calls to operate the OOPS 10 in a desired manner.
  • the actual implementation details of the defined foundation classes of FRAMEWORK I 22 are often proprietary and therefore not available to the application programmer.
  • FIG. 3 depicts an OOPS 30 based on a different hardware configuration HARDWARE II 46 .
  • the hardware configuration HARDWARE II 46 of the OOPS 30 resides at a base hardware programming layer 32 and is accessed and directed by an operating system OPERATING SYSTEM II 44 at an operating system programming layer 34 .
  • the operating system OPERATING SYSTEM II 44 is in turn accessed and directed by a set of objects defined by foundation classes FRAMEWORK II 42 at an application framework programming layer 36 .
  • Objects on the application framework programming layer 42 are accessed and directed by an application 40 at an application programming layer 38 . It is to be assumed for the purposes of describing the present invention that the set of foundation classes, FRAMEWORK II 42 , in the application framework programming layer 36 of FIG. 3 are different than the set of foundation classes, FRAMEWORK I 22 , of the OOPS 10 of FIG. 1.
  • FRAMEWORK I 22 might be different than FRAMEWORK II 42 is that the operating system OPERATING SYSTEM II 44 in the operating system programming layer 34 and the hardware configuration HARDWARE II 46 of the hardware programming layer 32 of the OOPS 30 are different than the respective operating system OPERATING SYSTEM I 24 in the operating system programming layer 14 and the hardware configuration HARDWARE I 26 of the hardware programming layer 12 of the OOPS 10 .
  • applications 40 at the application programming layer 38 of OOPS 30 may be run only if they make API method calls to objects which are defined in the foundation classes of FRAMEWORK II 42 on the application framework programming layer 36 .
  • FIG. 4 shows a portion of the target OOPS 30 which embodies the heart of the present invention.
  • the source code of the target application 20 of FIG. 2 which is designed to run on the native OOPS 10 of FIG. 1 remains unchanged. It still makes native FRAMEWORK I 22 API method calls.
  • the applications framework programming layer 36 of the target OOPS 30 in the present invention is designed to include a porting layer 48 which makes calls to a template library 49 .
  • the porting layer 48 defines native FRAMEWORK I 22 data types in terms of target OPERATING SYSTEM II 44 data types and maps native FRAMEWORK I API method calls to calls to the template library 49 .
  • the template library 49 is a general-purpose library comprising generic algorithms and container classes. Importantly, the template library 49 allows a variety of container lasses to be passed to each generic algorithm.
  • the name “template” is derived from the template mechanism provided by the generic algorithms and container classes taken together. This template mechanism allows programmers to simply select a generic algorithm and a container class or class derived from a container class, and then let the compiler perform the type-checking and generate the type-specific cod for the chosen algorithm.
  • the beauty of the template library is that it eliminates the prior art need for the programmer to write the same algorithm for each data type used (when overloading procedures).
  • An example of such a template library is the ANSI/ISO C++ Standard Template Library.
  • the native OOPS 10 is a Pentium-based machine having an Intel® Pentium or compatible processor as part of its native hardware configuration HARDWARE I 26 .
  • Native FRAMEWORK I 22 in the preferred embodiment defines Microsoft® Foundation Classes (MFCs) and implements the MFCs to successfully interface with the native OPERATING SYSTEM I 24 overlying the Pentium processor (HARDWARE I 26 ).
  • MFCs Microsoft® Foundation Classes
  • HARDWARE I 26 OPERATING SYSTEM I 24
  • a detailed discussion of Microsoft® Foundation Classes may be found in Sheperd, George, and Wingo, Scot, “MFC Internals: Inside the Microsoft® Foundation Class Architecture”, Addison-Wesley Publishing Company (1996), ISBN 0-201-40721-3, and is incorporated herein by reference.
  • the native OPERATING SYSTEM I 24 is a Microsoft® Windows-type operating system (i.e., Microsoft® Windows, Microsoft® Windows NT, Microsoft® Windows95, Microsoft® Windows97).
  • the target OOPS 30 is a Hewlett-Packard® HPUX machine (HARDWARE II 46 ) running HP-UNIX as the target OPERATING SYSTEM II 44 at its operating system programming layer 34 .
  • the template library 49 in the target applications framework programming layer 36 is implemented using the Standard Template Library (STL) incorporated into the Standard C++ Library with Tools.h++, which conforms to the ANSI/ISO standard and is manufactured by Rogue Wave Software.
  • the source code of the application 20 is recompiled with the porting layer 48 and template library 49 in the preferred embodiment using the Hewlett-Packard® ANSI/ISO C++ compiler.
  • FIG. 5 shows the structure of the target OOPS 30 of FIG. 3 which incorporates the present invention to enable it to run the native application 20 which was written to run on the native OOPS 10 .
  • the operation of the target OOPS 30 of FIG. 5 will be described in detail in terms of the preferred embodiment.
  • the present invention runs an MFC-based application 20 at the applications programming layer 38 of the target OOPS 30 .
  • MFC method calls i.e., FRAMEWORK I API method calls
  • the application framework programming layer 36 of target OOPS 30 includes a porting layer 48 which emulates the MFC method utilizing the C++ Standard Template Library (STL) 49 .
  • STL C++ Standard Template Library
  • the C++ STL routines when compiled using the HP-UX target system's HPUX ANSI/ISO C++ compiler, interface properly with HPUX® (i.e., target OPERATING SYSTEM II 44 ) at the target operating system programming layer 34 .
  • Target OPERATING SYSTEM II 44 or HP-UX® in the preferred embodiment, then directs the operation of the target hardware programming layer 32 .
  • the application programming layer 38 may run any MFC-based program as long as all of the MFC methods invoked by the MFC-based program are emulated in the porting layer 48 .
  • FIG. 6 is a diagram showing hypothetical source code of a native application 20 with FRAMEWORK I API method calls.
  • FIG. 6 also shows a comparison of a corresponding FRAMEWORK I implementation file 60 for a native OOPS 10 versus the corresponding porting layer 62 , 64 and STL 66 files.
  • the application 20 makes hypothetical API method calls, API_CALL — 1 through API_CALL_N.
  • the implementation details of the API method calls in the implementation file 60 of FRAMEWORK I 22 are unknown to a programmer not affiliated with the native OOPS manufacturer (either through employment or licensing agreements).
  • the target application framework programming layer 36 includes a porting layer 48 and a template library 49 .
  • the porting layer 48 may emulate the native FRAMEWORK I API functionality by including a header file DATA_TYPES.H 62 and a porting layer implementation file PORTING_LAYER.CPP 64 .
  • DATA_TYPES.H 62 native OOPS 10 data types are mapped to equivalent target OOPS 30 data types so that the data types used by the native application 20 will translate properly to data types recognized by the target OOPS 30 .
  • the porting layer implementation file PORTING_LAYER.CPP 64 contains a functional procedure for each of the native FRAMEWORK I API methods invoked by the native application 20 . As shown in the porting layer implementation file PORTING_LAYER.CPP 64 , the implementation details of each of the corresponding functional procedures provide their functionality by making calls to STL routines whose templates are implemented in the STL file 66 .
  • the header file DATA_TYPES.H 62 , porting layer implementation file PORTING_LAYER.CPP 64 , and the STL file 66 are compiled with the source code of the native application 20 .
  • the type-specific STL code is generated at compile time.
  • the compiler produces a target executable file which is a target executable version of the native application 20 and which may be run on the target OOPS 30 .
  • FIG. 7 is a flowchart illustrating the method of the present invention.
  • the method of the present invention shown generally at 70 , includes a first step 72 of defining a set of target OOPS 30 data types in terms of the native OOPS 10 data types. This step ensures that the data types used by objects in the native application program 70 of OOPS 10 will be compatible with the data types used by objects in the application framework programming layer 36 , operating system programming layer 34 and hardware programming layer 32 of the target OOPS 30 .
  • the data types defined by and used in the Microsoft® Foundation Classes (MFCs) are mapped to a new set of data types used by the C++ Standard Template Library.
  • the new definitions are created and located in a C++ header file such as DATA_TYPES.H 62 of FIG. 6.
  • the method 70 of the present invention includes a second step 74 of implementing a porting layer 48 which emulates each of the native API methods invoked by the native application 20 .
  • the native API methods are defined by MFCs.
  • the porting layer 48 is implemented by mapping MFC method calls and attribute accesses to object method calls and attribute accesses of objects defined and implemented using the C++ Standard Template Library.
  • the implementation details of the porting layer in the preferred embodiment reside in a porting layer implementation file such as PORTING_LAYER.CPP 64 in FIG. 6.
  • the C++ STL generally comprises a set of service routines whose source code conforms to the industry-wide ANSI/ISO standard such that C++ source code compilers for various computer systems throughout the industry will generate executable code to operate on their respective computer systems in a similar manner for each STL routine.
  • the implementation of the porting layer 48 using calls to the C++ STL 49 allows the source code of the native application 20 to remain unchanged and the emulated MFC APIs to retain their object oriented nature at the application framework programming layer 36 of the target OOPS 30 .
  • the porting layer 48 is implemented in one or more files, which include the type definition header file created in step 72 and porting layer routines which emulate each of the MFC API method calls using the C++ Standard Template Library 49 .
  • the method 70 includes a third step 76 of recompiling the native application 20 with the porting layer 48 and its included header file from step 72 and the C++ Standard Template Library 49 to generate executable code which may be run on the target OOPS 30 .
  • This step 76 generally involves creating a makefile which adds the porting layer 48 , header file and STL 49 to the include path.
  • a binary executable target application is created.
  • the executable target application may then be run on the target OOPS 30 .
  • the source code of the native application 20 is not modified.
  • the header file which defines the MFC data types in terms of the target Object Oriented data types has been created in step 72 and the porting layer has been implemented in step 74 , these two steps need not be repeated when porting other native applications to the target OOPS 30 . This is true as long as each native application being ported to the target OOPS 30 only invokes native API methods which have already been implemented in the porting layer 48 . In other words, the porting layer may be reused for as many native applications 20 as desired as long as the porting layer 48 has implemented the required native APIs for each native application 20 being ported.
  • the present invention provides an efficient and inexpensive method for porting native Object Oriented applications to a target OOPS by requiring a one-time overhead expense of developing the porting layer 48 . Once the porting layer 48 has been developed, no extra cost is incurred in porting additional native applications or in re-engineering due to application or target operating system version updates.
  • FIG. 8 illustrates an example FRAMEWORK I foundation class API object called FW_I_Array.
  • FW_I_Array Generally only the class definition of FW_I_Array, as shown in FIG. 8, is visible to the application programmer.
  • the implementation details of the FW_I_Array object are implemented in the framework programming layer 16 of the native OOPS 10 which may be inaccessible to the programmer for proprietary reasons. As shown in FIG.
  • the FW_I_Array API object includes a set of attributes (ARRAY, ARRAY_SIZE, ARRAY_INDEX) surrounded by a set of methods (SET_ARRAY SIZE, GET_ARRAY_SIZE, ADD_ELEMENT, DELETE_ELEMENT, GET_ELEMENT, SET_ELEMENT, GET_INDEX, SET_INDEX) which provide operations to access the attributes.
  • the data structure of the FW_I_Array object is encapsulated within the FW_I_Array methods.
  • the implementation details of the FW_I_Array methods are unknown. However, their functional descriptions are known.
  • FIG. 9 is a functional description of the methods of the FW_I_ARRAY API object of FIG. 8.
  • the FW_I_Array API object includes methods to establish or determine the size of an array, set or access the value of an element in the array, add or delete an element in the array, and set or retrieve the value of the array index.
  • FIG. 10 is an example portion, shown here for illustration purposes, of a C++ header file DATA_TYPES.H used in the preferred embodiment of the present invention.
  • the header file of FIG. 10 includes a set of object oriented type definitions compatible with the C++ Standard Template Library defined in terms of the MFC data types.
  • the first set of type definitions indicated by the corresponding number (1), define the MFC data types (BYTE, WORD, . . . , BOOL) in terms of standard C++ data types (unsigned char, unsigned short, . . . , int).
  • the second set of type definitions, indicated by the corresponding number (2) are necessary to create the MFC CString class.
  • the type definition indicated by the corresponding number (3) is an opaque abstract data type used by the various “list” MFCs to return the concept of a position within a linked list.
  • FIG. 11 is example code, shown here for illustration purposes, of a porting layer implementation of the FRAMEWORK I object FW_I_Array method SET_ARRAY_SIZE.
  • the method implementation of SET_ARRAY_SIZE includes calls to the C++ Standard Template Library.
  • rw_array is an instance of the STL vector class. “Reserve” and “resize” are methods of the defined STL vector class.
  • the above described invention provides an improved method for porting object oriented software applications from one object orient computer programming system to another with minimal overhead in cost and engineering time. It will also be appreciated that the invention provides the capability of allowing multiple object oriented applications written for the same object oriented programming system to be ported to a different object oriented programming system for the price of porting a single object oriented application from one system to the other.

Abstract

A system and method for porting a software application from a native object oriented programming system to a target object oriented programming system is presented. The native object oriented programming system includes an application framework layer built on a set of defined native foundation classes and an operating system layer running a native operating system. The target object oriented programming system also includes an application framework layer and an operating system layer. However, the application framework layer is built on a different set of foundation classes and the target operating system is different than the native operating system. A software application that has been implemented to interface with the native object oriented programming system via an application programming interface (API) built on the defined native foundation classes may be ported to run on the target operating system in a functionally equivalent manner as if running on the native object oriented programming system using the method of the invention. The method includes defining a set of target object oriented programming system data types in terms of the native object oriented programming system data types, and then emulating the defined native foundation classes by mapping the native API method invocations to template library calls.

Description

    FIELD OF THE INVENTION
  • The present invention relates generally to software reusability, and more particularly, to a system and method for porting code written to operate on a native object oriented computer programming system to alternative target object oriented computer programming systems by emulating the native object oriented foundation classes using a porting layer and a template library. [0001]
  • BACKGROUND OF THE INVENTION
  • Object Oriented Programming Systems (OOPS) have been developed and are in use in the computer industry to provide a sophisticated and efficient method for modeling real-world objects and for providing the ability to expand and reuse other objects. Objects are complex data structures which model real-world entities, and are associated in classes and identified with their informational features (“attributes”) and functional features (“behaviors” or “methods”). Objects are effected using object oriented programming languages such as C++. By defining complex, specialized data structures or objects that model real-world entities, software application development is made easier and more natural as the level of abstraction of data is raised to a point where applications can be implemented effectively in the same terms in which they are described by the users of the application. Objects are more readily classifiable into types, which are easily related to one another in subtype/supertype hierarchies. Object oriented programming languages permit the programmer to flexibly define data types so as not to be constrained by limited predefined types. Object oriented programming language types can be associated in classes which can “inherit” attributes and/or methods from other classes. [0002]
  • In a sophisticated OOPS, an application framework is developed for use by application programmers as the basis upon which software applications are built. The application framework is a set of classes which provide services necessary to run on a specific operating system. An example of an application framework is the Microsoft® Foundation Classes developed for the Microsoft® Windows operating system. The application framework assists the application programmer by removing the application requirements from the operating system requirements by providing an object oriented Application Programming Interface (API). An API can be implemented as an object with attributes and methods which performs services at lower levels in the programming layer hierarchy. An API's defined attributes are derived from defined data types specific to the operating system. An API's methods allow an application to access the API's attributes and also provide services while separating the application from the details unique to the specific operating system. Generally speaking, a particular OOPS manufacturer will provide an application framework and a set of defined APIs to a user or application programmer but will not release the source code which implements the framework and API calls. This practice results in the requirement that all applications written using the application framework and defined APIs of the manufacturer's computer system be run only on the manufacturer's or a compatible computer system. As a result, applications cannot be easily ported from one object oriented computer programming system based on one operating system to another object oriented computer programming system based on another operating system. It would be desirable to provide the ability for software applications written for one such object oriented computer programming system to be able to be run on alternative object oriented computer programming systems. [0003]
  • In the prior art, applications designed to run on computers based on one operating system and hardware configuration could be ported to run on another computer running a different operating system and having a different hardware configuration only with expense and difficulty. One method for porting a software application from one system to another involves purchasing an application framework source code license from the OOPS manufacturer to use and alter the source code of the framework to interface properly with the target operating system. This method, however, incurs expense in obtaining the source code license and also requires considerable engineering time for modifying the framework source code to allow for historical differences of data types and complying with the target operating system interface. [0004]
  • Another method for porting a software application from one system to another involves purchasing a source code license from the software application manufacturer to use and alter the source code of the application to interface properly with the target framework. This method, however, also incurs expense in obtaining the application source code license and requires valuable engineering time to modify the application source code to interface correctly with the application framework of the new environment. In addition, this process must be repeated for each new version of the application software that is released and for every application that is to be ported to the other system. [0005]
  • It would be therefore be desirable to provide a system and method for porting applications from one object oriented programming system to another object oriented programming system that requires minimal overhead in cost and engineering time. It would also be desirable to provide a system and method for porting any number of applications from one object oriented programming system to another object oriented programming system for the cost of porting a single application from one system to the other. [0006]
  • SUMMARY OF THE INVENTION
  • Accordingly, the present invention provides an improved method of porting object oriented software applications from one object orient computer programming system to another. The present invention also provides a system and method for porting applications from one object oriented programming system to another object oriented programming system that requires minimal overhead in cost and engineering time. The present invention further provides a system and method for allowing any number of object oriented applications written for the same object oriented programming system (OOPS) to be ported to a different OOPS for the price of porting a single object oriented application from one system to the other. [0007]
  • These and other objects are accomplished in accordance with the present invention by providing a system and method for porting a software application from a native OOPS to a target OOPS, where the native OOPS includes an application framework layer built on a set of defined native foundation classes and an operating system layer running a native operating system and the target OOPS includes an operating system layer running a target operating system different than the native operating system. The software application ported by the present invention is implemented to interface with the native object oriented programming system via application programming interface (API) objects which are instances of the defined native foundation classes. The method of the present invention includes steps for defining a set of target object oriented programming system data types in terms of native object oriented programming system data types, and emulating the native foundation classes using calls to a template library such that the API method calls interface with the target operating system in a functionally equivalent manner as if the application were being run on the native OOPS. The native foundation classes may be emulated by implementing a porting layer in an object oriented programming language. The porting layer may include the set of target object oriented programming system data types, the template library, and a functional procedure implemented for each API method invoked by the native application. Each functional procedure maps a functionality of an API method to calls to routines in the template library. The software application is then recompiled with the porting layer to generate a target executable software application which may be run on the target object oriented programming system. In the preferred embodiment, the porting layer is implemented in the C++ programming language and the template library is the ANSI/ISO C++ Standard Template Libraries. [0008]
  • BRIEF DESCRIPTIONS OF THE DRAWINGS
  • The objects and advantages of the invention will become more apparent and more readily appreciated from the following detailed description of the presently preferred exemplary embodiment of the invention taken in conjunction with the accompanying drawings, of which: [0009]
  • FIG. 1 is a block diagram of the structure of a native object oriented programming system. [0010]
  • FIG. 2 is a block diagram of the portion of the native object oriented programming system of FIG. 1 which is of interest to an application programmer. [0011]
  • FIG. 3 is a block diagram of the structure of a target object oriented programming system. FIG. 4 is a block diagram of the portion of the target object oriented programming system of FIG. 3 which embodies the heart of the present invention. [0012]
  • FIG. 5 is a block diagram of the structure of the target object oriented programming system of FIG. 3 which incorporates the present invention. [0013]
  • FIG. 6 is a diagram illustrating an implementation of a preferred embodiment of the present invention. [0014]
  • FIG. 7 is a flowchart illustrating the method of the present invention. [0015]
  • FIG. 8 is an example native foundation class used to illustrate an example implementation of the present invention. [0016]
  • FIG. 9 is an example functionality description of the native foundation class of FIG. 8. [0017]
  • FIG. 10 is an example header file used in the implementation of the preferred embodiment of the present invention. [0018]
  • FIG. 11 is an example code illustration of a porting layer implementation of an example FRAMEWORK I API method. [0019]
  • DETAILED DESCRIPTION OF THE PRESENT INVENTION
  • The present invention will now be described more fully hereinafter with reference to the accompanying figures, in which a preferred embodiment of the invention is shown. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiment set forth herein; rather, this embodiment is provided so that this disclosure will be thorough and complete and will fully convey the scope of the invention to those skilled in the art. [0020]
  • FIG. 1 depicts the operating structure of an Object Oriented Programming System (OOPS). The OOPS [0021] 10 may run a user application 20 which is facilitated by a plurality of programming layers 12-18. The user application 20 is an object oriented program written to direct and control activities of the OOPS 10 from an application programming layer 18 using application programming interface (API) calls. The APIs are functional objects defined for the OOPS 10 at an application framework programming layer 16. In the application framework programming layer 16, a framework FRAMEWORK I 22, also known as the foundation classes of the OOPS 10, is defined and implemented, including the definitions and implementations of the APIs. The implementation details of the framework FRAMEWORK I are generally not visible to the application 20 or application programmer from the application programming layer 18. The application framework programming layer 16 defines FRAMEWORK I foundation class attributes in terms of or derived from data types defined at an operating system programming layer 14. The application framework programming layer 16 also defines the FRAMEWORK I foundation class methods and implements the methods via attribute accesses and method calls to objects defined at the operating system programming layer 14 level by an operating system OPERATING SYSTEM I 24. The implementation details of the OPERATING SYSTEM I 24 are generally not visible from the FRAMEWORK I 22 or from the application framework programming layer 16. An example of a FRAMEWORK I 22 and OPERATING SYSTEM I 24 which are widely used in the industry is the Microsoft® Foundation Classes (MFCs) developed for use with the Microsoft® Windows-type operating systems (including Microsoft® Windows, Microsoft® Windows NT, Microsoft® Windows95 and Microsoft® Windows97). The OPERATING SYSTEM I 24 comprises operating system objects which access and direct activity of the hardware programming layer 12. OPERATING SYSTEM I 24 is thus hardware specific. The hardware programming layer 12 processes instructions as directed by the OPERATING SYSTEM I 24, responds to interrupts, and manages data and instruction input and output (I/O) specific to the hardware configuration HARDWARE I 26 of the OOPS 10. The activity on the hardware programming layer 12 is ideally not visible from the operating system programming layer 14. The hierarchical nature of the OOPS 10 removes details of the specific operating system OPERATING SYSTEM I 24 and hardware configuration HARDWARE I 26 from the user or application programmer.
  • FIG. 2 is a block diagram of the portion of the [0022] OOPS 10 of FIG. 1 which is of interest to an application programmer. As shown in FIG. 2, the application 20 is implemented to operate on the OOPS 10 in a desired manner by making API method calls to objects defined by the foundation classes FRAMEWORK I 22 at the application framework programming level 16. Ideally, the full operational functionality of the OOPS 10 is facilitated by the defined foundation classes of FRAMEWORK I 22 and the implementation details of FRAMEWORK I 22 are hidden from the application 20. Thus, the application 20 or its programmer need only know the foundation class definitions and functionality of FRAMEWORK I 22 in order to make appropriate API method calls to operate the OOPS 10 in a desired manner. Indeed, the actual implementation details of the defined foundation classes of FRAMEWORK I 22 are often proprietary and therefore not available to the application programmer.
  • As will be appreciated from the previous discussion, however, without modification of the source code, the [0023] application 20 may only run on an OOPS of the type having the same foundation class definitions as FRAMEWORK I 22 at its application framework programming layer 16 of the OOPS 10. FIG. 3 depicts an OOPS 30 based on a different hardware configuration HARDWARE II 46. The hardware configuration HARDWARE II 46 of the OOPS 30 resides at a base hardware programming layer 32 and is accessed and directed by an operating system OPERATING SYSTEM II 44 at an operating system programming layer 34. The operating system OPERATING SYSTEM II 44 is in turn accessed and directed by a set of objects defined by foundation classes FRAMEWORK II 42 at an application framework programming layer 36. Objects on the application framework programming layer 42 are accessed and directed by an application 40 at an application programming layer 38. It is to be assumed for the purposes of describing the present invention that the set of foundation classes, FRAMEWORK II 42, in the application framework programming layer 36 of FIG. 3 are different than the set of foundation classes, FRAMEWORK I 22, of the OOPS 10 of FIG. 1. One reason that FRAMEWORK I 22 might be different than FRAMEWORK II 42 is that the operating system OPERATING SYSTEM II 44 in the operating system programming layer 34 and the hardware configuration HARDWARE II 46 of the hardware programming layer 32 of the OOPS 30 are different than the respective operating system OPERATING SYSTEM I 24 in the operating system programming layer 14 and the hardware configuration HARDWARE I 26 of the hardware programming layer 12 of the OOPS 10. As a result, applications 40 at the application programming layer 38 of OOPS 30 may be run only if they make API method calls to objects which are defined in the foundation classes of FRAMEWORK II 42 on the application framework programming layer 36. It will be appreciated by one skilled in the art that if the framework FRAMEWORK II 42 defined on the application framework programming layer 36 of OOPS 30 [hereinafter “target OOPS 30”] is different than the framework FRAMEWORK I 22 defined on the application framework programming layer 16 of OOPS 10 [hereinafter “native OOPS 10”], then applications which run at the application programming layer 18 on native OOPS 10 do not run properly on the target OOPS 30 of FIG. 3. More specifically, native application 20 of FIGS. 1 and 2 will not run on the target OOPS 30 in FIG. 3.
  • FIG. 4 shows a portion of the target OOPS [0024] 30 which embodies the heart of the present invention. As shown in FIG. 4, the source code of the target application 20 of FIG. 2 which is designed to run on the native OOPS 10 of FIG. 1 remains unchanged. It still makes native FRAMEWORK I 22 API method calls. However, the applications framework programming layer 36 of the target OOPS 30 in the present invention is designed to include a porting layer 48 which makes calls to a template library 49. The porting layer 48, as discussed in more detail hereinafter, defines native FRAMEWORK I 22 data types in terms of target OPERATING SYSTEM II 44 data types and maps native FRAMEWORK I API method calls to calls to the template library 49.
  • The [0025] template library 49 is a general-purpose library comprising generic algorithms and container classes. Importantly, the template library 49 allows a variety of container lasses to be passed to each generic algorithm. The name “template” is derived from the template mechanism provided by the generic algorithms and container classes taken together. This template mechanism allows programmers to simply select a generic algorithm and a container class or class derived from a container class, and then let the compiler perform the type-checking and generate the type-specific cod for the chosen algorithm. The beauty of the template library is that it eliminates the prior art need for the programmer to write the same algorithm for each data type used (when overloading procedures). An example of such a template library is the ANSI/ISO C++ Standard Template Library. For a detailed discussion of template libraries and the C++ Standard Template Library, see Musser, David R. and Saini, Atul, “C++ Programming with the Standard Template Library”, Addison-Wesley, Reading, Mass., October 1996, ISBN 0-201-63398-1, incorporated herein by reference. Although at the time of filing of this application, U.S. Ser. No. UNKNOWN, the only commercially available template library is the Standard Template Library (STL) which is part of the larger software library, the C++ (Draft) Standard Library approved by the ANSI/ISO C++ committee in its X3J16 report, and which is incorporated herein by reference, it is to be understood that any future template library which provides generic algorithms and container classes may also be used to implement the present invention.
  • In the preferred embodiment of the present invention, the native OOPS [0026] 10 is a Pentium-based machine having an Intel® Pentium or compatible processor as part of its native hardware configuration HARDWARE I 26. Native FRAMEWORK I 22 in the preferred embodiment defines Microsoft® Foundation Classes (MFCs) and implements the MFCs to successfully interface with the native OPERATING SYSTEM I 24 overlying the Pentium processor (HARDWARE I 26). A detailed discussion of Microsoft® Foundation Classes may be found in Sheperd, George, and Wingo, Scot, “MFC Internals: Inside the Microsoft® Foundation Class Architecture”, Addison-Wesley Publishing Company (1996), ISBN 0-201-40721-3, and is incorporated herein by reference. In the preferred embodiment, the native OPERATING SYSTEM I 24 is a Microsoft® Windows-type operating system (i.e., Microsoft® Windows, Microsoft® Windows NT, Microsoft® Windows95, Microsoft® Windows97). Also in the preferred embodiment of the present invention, the target OOPS 30 is a Hewlett-Packard® HPUX machine (HARDWARE II 46) running HP-UNIX as the target OPERATING SYSTEM II 44 at its operating system programming layer 34. The template library 49 in the target applications framework programming layer 36 is implemented using the Standard Template Library (STL) incorporated into the Standard C++ Library with Tools.h++, which conforms to the ANSI/ISO standard and is manufactured by Rogue Wave Software. The source code of the application 20 is recompiled with the porting layer 48 and template library 49 in the preferred embodiment using the Hewlett-Packard® ANSI/ISO C++ compiler.
  • FIG. 5 shows the structure of the target OOPS [0027] 30 of FIG. 3 which incorporates the present invention to enable it to run the native application 20 which was written to run on the native OOPS 10. The operation of the target OOPS 30 of FIG. 5 will be described in detail in terms of the preferred embodiment. In the preferred embodiment, the present invention runs an MFC-based application 20 at the applications programming layer 38 of the target OOPS 30. When MFC method calls (i.e., FRAMEWORK I API method calls) are executed, the application framework programming layer 36 of target OOPS 30 includes a porting layer 48 which emulates the MFC method utilizing the C++ Standard Template Library (STL) 49. The C++ STL routines, when compiled using the HP-UX target system's HPUX ANSI/ISO C++ compiler, interface properly with HPUX® (i.e., target OPERATING SYSTEM II 44) at the target operating system programming layer 34. Target OPERATING SYSTEM II 44, or HP-UX® in the preferred embodiment, then directs the operation of the target hardware programming layer 32. It will be appreciated by one skilled in the art that once the porting layer 48 is designed and compiled, the application programming layer 38 may run any MFC-based program as long as all of the MFC methods invoked by the MFC-based program are emulated in the porting layer 48.
  • FIG. 6 is a diagram showing hypothetical source code of a [0028] native application 20 with FRAMEWORK I API method calls. FIG. 6 also shows a comparison of a corresponding FRAMEWORK I implementation file 60 for a native OOPS 10 versus the corresponding porting layer 62, 64 and STL 66 files. As shown in FIG. 6, the application 20 makes hypothetical API method calls, API_CALL 1 through API_CALL_N. As also shown in FIG. 6, the implementation details of the API method calls in the implementation file 60 of FRAMEWORK I 22 are unknown to a programmer not affiliated with the native OOPS manufacturer (either through employment or licensing agreements). In order to emulate the functionality of the native FRAMEWORK I APIs, the target application framework programming layer 36 includes a porting layer 48 and a template library 49. As shown in FIG. 6, the porting layer 48 may emulate the native FRAMEWORK I API functionality by including a header file DATA_TYPES.H 62 and a porting layer implementation file PORTING_LAYER.CPP 64. As shown in the header file DATA_TYPES.H 62, native OOPS 10 data types are mapped to equivalent target OOPS 30 data types so that the data types used by the native application 20 will translate properly to data types recognized by the target OOPS 30. The porting layer implementation file PORTING_LAYER.CPP 64 contains a functional procedure for each of the native FRAMEWORK I API methods invoked by the native application 20. As shown in the porting layer implementation file PORTING_LAYER.CPP 64, the implementation details of each of the corresponding functional procedures provide their functionality by making calls to STL routines whose templates are implemented in the STL file 66. The header file DATA_TYPES.H 62, porting layer implementation file PORTING_LAYER.CPP 64, and the STL file 66 are compiled with the source code of the native application 20. The type-specific STL code is generated at compile time. The compiler produces a target executable file which is a target executable version of the native application 20 and which may be run on the target OOPS 30.
  • FIG. 7 is a flowchart illustrating the method of the present invention. As shown in FIG. 7, the method of the present invention, shown generally at [0029] 70, includes a first step 72 of defining a set of target OOPS 30 data types in terms of the native OOPS 10 data types. This step ensures that the data types used by objects in the native application program 70 of OOPS 10 will be compatible with the data types used by objects in the application framework programming layer 36, operating system programming layer 34 and hardware programming layer 32 of the target OOPS 30. In the preferred embodiment, the data types defined by and used in the Microsoft® Foundation Classes (MFCs) are mapped to a new set of data types used by the C++ Standard Template Library. The new definitions are created and located in a C++ header file such as DATA_TYPES.H 62 of FIG. 6.
  • The [0030] method 70 of the present invention includes a second step 74 of implementing a porting layer 48 which emulates each of the native API methods invoked by the native application 20. In the preferred embodiment, the native API methods are defined by MFCs. The porting layer 48 is implemented by mapping MFC method calls and attribute accesses to object method calls and attribute accesses of objects defined and implemented using the C++ Standard Template Library. The implementation details of the porting layer in the preferred embodiment reside in a porting layer implementation file such as PORTING_LAYER.CPP 64 in FIG. 6. As known by those skilled in the art, the C++ STL generally comprises a set of service routines whose source code conforms to the industry-wide ANSI/ISO standard such that C++ source code compilers for various computer systems throughout the industry will generate executable code to operate on their respective computer systems in a similar manner for each STL routine. It will also be appreciated by one skilled in the art that the implementation of the porting layer 48 using calls to the C++ STL 49 allows the source code of the native application 20 to remain unchanged and the emulated MFC APIs to retain their object oriented nature at the application framework programming layer 36 of the target OOPS 30. In the preferred embodiment the porting layer 48 is implemented in one or more files, which include the type definition header file created in step 72 and porting layer routines which emulate each of the MFC API method calls using the C++ Standard Template Library 49.
  • Once the [0031] porting layer 48 is implemented, the method 70 includes a third step 76 of recompiling the native application 20 with the porting layer 48 and its included header file from step 72 and the C++ Standard Template Library 49 to generate executable code which may be run on the target OOPS 30. This step 76 generally involves creating a makefile which adds the porting layer 48, header file and STL 49 to the include path. When the makefile is run, a binary executable target application is created. In step 78, the executable target application may then be run on the target OOPS 30.
  • It is of significance that the source code of the [0032] native application 20 is not modified. One skilled in the art will also appreciate that once the header file which defines the MFC data types in terms of the target Object Oriented data types has been created in step 72 and the porting layer has been implemented in step 74, these two steps need not be repeated when porting other native applications to the target OOPS 30. This is true as long as each native application being ported to the target OOPS 30 only invokes native API methods which have already been implemented in the porting layer 48. In other words, the porting layer may be reused for as many native applications 20 as desired as long as the porting layer 48 has implemented the required native APIs for each native application 20 being ported. It is clear that the present invention provides an efficient and inexpensive method for porting native Object Oriented applications to a target OOPS by requiring a one-time overhead expense of developing the porting layer 48. Once the porting layer 48 has been developed, no extra cost is incurred in porting additional native applications or in re-engineering due to application or target operating system version updates.
  • FIG. 8 illustrates an example FRAMEWORK I foundation class API object called FW_I_Array. Generally only the class definition of FW_I_Array, as shown in FIG. 8, is visible to the application programmer. The implementation details of the FW_I_Array object are implemented in the [0033] framework programming layer 16 of the native OOPS 10 which may be inaccessible to the programmer for proprietary reasons. As shown in FIG. 8, the FW_I_Array API object includes a set of attributes (ARRAY, ARRAY_SIZE, ARRAY_INDEX) surrounded by a set of methods (SET_ARRAY SIZE, GET_ARRAY_SIZE, ADD_ELEMENT, DELETE_ELEMENT, GET_ELEMENT, SET_ELEMENT, GET_INDEX, SET_INDEX) which provide operations to access the attributes. Thus the data structure of the FW_I_Array object is encapsulated within the FW_I_Array methods. The implementation details of the FW_I_Array methods are unknown. However, their functional descriptions are known.
  • FIG. 9 is a functional description of the methods of the FW_I_ARRAY API object of FIG. 8. As shown in FIG. 9, the FW_I_Array API object includes methods to establish or determine the size of an array, set or access the value of an element in the array, add or delete an element in the array, and set or retrieve the value of the array index. [0034]
  • FIG. 10 is an example portion, shown here for illustration purposes, of a C++ header file DATA_TYPES.H used in the preferred embodiment of the present invention. The header file of FIG. 10 includes a set of object oriented type definitions compatible with the C++ Standard Template Library defined in terms of the MFC data types. As shown in FIG. 10, the first set of type definitions, indicated by the corresponding number (1), define the MFC data types (BYTE, WORD, . . . , BOOL) in terms of standard C++ data types (unsigned char, unsigned short, . . . , int). The second set of type definitions, indicated by the corresponding number (2), are necessary to create the MFC CString class. The type definition indicated by the corresponding number (3) is an opaque abstract data type used by the various “list” MFCs to return the concept of a position within a linked list. [0035]
  • FIG. 11 is example code, shown here for illustration purposes, of a porting layer implementation of the FRAMEWORK I object FW_I_Array method SET_ARRAY_SIZE. As shown in FIG. 11, the method implementation of SET_ARRAY_SIZE includes calls to the C++ Standard Template Library. For example, rw_array is an instance of the STL vector class. “Reserve” and “resize” are methods of the defined STL vector class. [0036]
  • It will be appreciated by one skilled in the art that the above described invention provides an improved method for porting object oriented software applications from one object orient computer programming system to another with minimal overhead in cost and engineering time. It will also be appreciated that the invention provides the capability of allowing multiple object oriented applications written for the same object oriented programming system to be ported to a different object oriented programming system for the price of porting a single object oriented application from one system to the other. [0037]
  • While illustrative and presently preferred embodiments of the invention have been described in detail herein, it is to be understood that the inventive concepts may be otherwise variously embodied and employed and that the appended claims are intended to be construed to include such variations except insofar as limited by the prior art. [0038]

Claims (9)

What is claimed is:
1. A method for porting a software application from a native object oriented programming system having an application framework layer built on a set of defined native foundation classes and an operating system layer running a native operating system to a target object oriented programming system running a target operating system different than said native operating system, said software application implemented to interface with the native object oriented programming system by invoking native application programming interface (API) methods built on said set of defined native foundation classes, the method comprising the steps of:
(a) defining a set of target object oriented programming system data types in terms of said set of native object oriented programming system data types; and
(b) emulating said set of defined native foundation classes by mapping each native API method invoked by said software application to template library calls to allow the software application to execute on the target operating system in a functionally equivalent manner as if running on the native object oriented programming system.
2. The method of
claim 1
, wherein said emulating step (b) further comprises the steps of:
(b) (i) implementing a porting layer in an object oriented programming language which includes the set of target object oriented programming system data types, the template library, and a functional procedure for each native API method invoked by the software application; and
(b) (ii) recompiling the software application with the porting layer to generate a target executable software application which runs on the target object oriented programming system.
3. The method of
claim 2
, further comprising the step of:
(d) running the target executable software application on the target object oriented programming system.
4. The method of
claim 2
, wherein the object oriented programming language comprises a C++ programming language.
5. The method of
claim 2
, wherein the template library comprises the ANSI/ISO C++ Standard Template Library.
6. A system for porting a software application from a native object oriented programming system having an application framework layer built on a set of defined native foundation classes and an operating system layer running a native operating system to a target object oriented programming system running a target operating system different than said native operating system, said software application implemented to interface with the native object oriented programming system by invoking native application programming interface (API) methods built on said set of defined native foundation classes, the system comprising:
a template library which may be compiled to run on the target object oriented programming system; and
a porting layer which defines a set of target object oriented programming system data types in terms of native object oriented programming system data types and emulates said set of defined native foundation classes by mapping each native API method invoked by said software application to template library calls to allow the software application to execute on the target operating system in a functionally equivalent manner as if running on the native object oriented programming system
7. The system of
claim 6
, wherein the porting layer comprises a header file which defines the target object oriented programming system data types in terms of the native object oriented programming system data types; and one or more implementation files which together implement a functional procedure using template library calls for each native API method invoked by the native application.
8. The system of
claim 7
, wherein the porting layer is implemented in a C++ programming language.
9. The system of
claim 7
, wherein the template library comprises the ANSI/ISO C++ Standard Template Library.
US08/833,085 1997-04-03 1997-04-03 Method for emulating native object oriented foundation classes on a target object oriented programming system using a template library Expired - Fee Related US6356957B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US08/833,085 US6356957B2 (en) 1997-04-03 1997-04-03 Method for emulating native object oriented foundation classes on a target object oriented programming system using a template library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US08/833,085 US6356957B2 (en) 1997-04-03 1997-04-03 Method for emulating native object oriented foundation classes on a target object oriented programming system using a template library

Publications (2)

Publication Number Publication Date
US20010016881A1 true US20010016881A1 (en) 2001-08-23
US6356957B2 US6356957B2 (en) 2002-03-12

Family

ID=25263382

Family Applications (1)

Application Number Title Priority Date Filing Date
US08/833,085 Expired - Fee Related US6356957B2 (en) 1997-04-03 1997-04-03 Method for emulating native object oriented foundation classes on a target object oriented programming system using a template library

Country Status (1)

Country Link
US (1) US6356957B2 (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040054640A1 (en) * 2002-09-12 2004-03-18 Uwe Reichel Interaction between a client process and software applications
US20040051740A1 (en) * 2002-09-12 2004-03-18 Uwe Reichel Data container for interaction between a client process and software applications
US20050172299A1 (en) * 2004-02-02 2005-08-04 Hai Zhao Methods and apparatus to provide a modular native method invocation system
US20060143622A1 (en) * 2004-12-29 2006-06-29 Motorola, Inc. Method and apparatus for running different types of applications on a wireless mobile device
US20060179440A1 (en) * 2004-11-18 2006-08-10 Besbris David G Native objects accessible by platform neutral API
US20070011669A1 (en) * 2005-07-06 2007-01-11 International Business Machines Corporation Software migration
US20090225040A1 (en) * 2008-03-04 2009-09-10 Microsoft Corporation Central resource for variable orientation user interface
US20090276730A1 (en) * 2008-03-04 2009-11-05 Alexandre Aybes Techniques for navigation of hierarchically-presented data
US7765539B1 (en) * 2004-05-19 2010-07-27 Nintendo Co., Ltd. System and method for trans-compiling video games
US20140373098A1 (en) * 2013-06-14 2014-12-18 Andrew T. Fausak Runtime api framework for client-server communication
US9407725B2 (en) 2013-06-14 2016-08-02 Dell Products L.P. Generic transcoding service for client-server communication
US9705729B2 (en) 2012-06-01 2017-07-11 Dell Products L.P. General client engine with load balancing for client-server communication
US9716740B2 (en) 2013-06-14 2017-07-25 Dell Products L.P. Web-based transcoding to clients for client-server communication
US10977016B2 (en) * 2017-10-31 2021-04-13 EMC IP Holding Company LLC Management of data using templates
US11086901B2 (en) 2018-01-31 2021-08-10 EMC IP Holding Company LLC Method and system for efficient data replication in big data environment

Families Citing this family (56)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6826760B1 (en) 1999-06-16 2004-11-30 Microsoft Corporation Methods of factoring operating system functions, methods of converting operating systems, and related apparatus
US7334235B2 (en) 1999-06-16 2008-02-19 Microsoft Corporation Operating system application programming interfaces and methods of using operating systems
US6813770B1 (en) * 2000-04-21 2004-11-02 Sun Microsystems, Inc. Abstract syntax notation to interface definition language converter framework for network management
US6769115B1 (en) * 2000-05-01 2004-07-27 Emc Corporation Adaptive interface for a software development environment
US6801224B1 (en) * 2000-09-14 2004-10-05 International Business Machines Corporation Method, system, and program for generating a graphical user interface window for an application program
US7080159B2 (en) * 2000-12-15 2006-07-18 Ntt Docomo, Inc. Method and system for effecting migration of application among heterogeneous devices
US20020138821A1 (en) * 2001-01-23 2002-09-26 Vadim Furman Method and apparatus for seamless porting of object code between operating system environments
US6996832B2 (en) 2001-05-30 2006-02-07 Bea Systems, Inc. System and method for software component plug-in framework
US7051333B1 (en) * 2001-07-24 2006-05-23 The Mathworks, Inc. System and method for extending a programming language to include multiple dissimilar object systems
US7013468B2 (en) * 2002-02-26 2006-03-14 Parametric Technology Corporation Method and apparatus for design and manufacturing application associative interoperability
US20040163091A1 (en) * 2003-02-19 2004-08-19 Brill Gregory M. Attributes bridging solution and method of using the same
US7185344B2 (en) * 2003-03-14 2007-02-27 Hewlett-Packard Development Company, L.P. Method of porting software
US8539063B1 (en) 2003-08-29 2013-09-17 Mcafee, Inc. Method and system for containment of networked application client software by explicit human input
US7464408B1 (en) 2003-08-29 2008-12-09 Solidcore Systems, Inc. Damage containment by translation
US7840968B1 (en) * 2003-12-17 2010-11-23 Mcafee, Inc. Method and system for containment of usage of language interfaces
US7783735B1 (en) 2004-03-22 2010-08-24 Mcafee, Inc. Containment of network communication
US7873955B1 (en) * 2004-09-07 2011-01-18 Mcafee, Inc. Solidifying the executable software set of a computer
US7603552B1 (en) * 2005-05-04 2009-10-13 Mcafee, Inc. Piracy prevention using unique module translation
US20070005721A1 (en) * 2005-06-30 2007-01-04 Microsoft Corporation Remotable porting layer
US7856661B1 (en) 2005-07-14 2010-12-21 Mcafee, Inc. Classification of software on networked systems
US7757269B1 (en) * 2006-02-02 2010-07-13 Mcafee, Inc. Enforcing alignment of approved changes and deployed changes in the software change life-cycle
US7904417B2 (en) * 2006-02-27 2011-03-08 Microsoft Corporation Recursive metadata templating
US7895573B1 (en) 2006-03-27 2011-02-22 Mcafee, Inc. Execution environment file inventory
US7870387B1 (en) 2006-04-07 2011-01-11 Mcafee, Inc. Program-based authorization
US8352930B1 (en) 2006-04-24 2013-01-08 Mcafee, Inc. Software modification by group to minimize breakage
US8555404B1 (en) 2006-05-18 2013-10-08 Mcafee, Inc. Connectivity-based authorization
US20090007081A1 (en) * 2006-05-26 2009-01-01 Lau Allen N L System and Method of Generating Applications for Mobile Devices
US9424154B2 (en) 2007-01-10 2016-08-23 Mcafee, Inc. Method of and system for computer system state checks
US8332929B1 (en) 2007-01-10 2012-12-11 Mcafee, Inc. Method and apparatus for process enforced configuration management
US7671567B2 (en) * 2007-06-15 2010-03-02 Tesla Motors, Inc. Multi-mode charging system for an electric vehicle
US8195931B1 (en) 2007-10-31 2012-06-05 Mcafee, Inc. Application change control
US8515075B1 (en) 2008-01-31 2013-08-20 Mcafee, Inc. Method of and system for malicious software detection using critical address space protection
US20090204953A1 (en) * 2008-02-11 2009-08-13 Apple Inc. Transforming data structures between different programming languages
US8615502B2 (en) 2008-04-18 2013-12-24 Mcafee, Inc. Method of and system for reverse mapping vnode pointers
US8544003B1 (en) 2008-12-11 2013-09-24 Mcafee, Inc. System and method for managing virtual machine configurations
US8341627B2 (en) * 2009-08-21 2012-12-25 Mcafee, Inc. Method and system for providing user space address protection from writable memory area in a virtual environment
US8381284B2 (en) 2009-08-21 2013-02-19 Mcafee, Inc. System and method for enforcing security policies in a virtual environment
US9552497B2 (en) * 2009-11-10 2017-01-24 Mcafee, Inc. System and method for preventing data loss using virtual machine wrapped applications
US8925101B2 (en) 2010-07-28 2014-12-30 Mcafee, Inc. System and method for local protection against malicious software
US8938800B2 (en) 2010-07-28 2015-01-20 Mcafee, Inc. System and method for network level protection against malicious software
US8549003B1 (en) 2010-09-12 2013-10-01 Mcafee, Inc. System and method for clustering host inventories
US9075993B2 (en) 2011-01-24 2015-07-07 Mcafee, Inc. System and method for selectively grouping and managing program files
US9112830B2 (en) 2011-02-23 2015-08-18 Mcafee, Inc. System and method for interlocking a host and a gateway
US9348568B2 (en) 2011-08-24 2016-05-24 Accenture Global Services Limited Software application porting system
US9594881B2 (en) 2011-09-09 2017-03-14 Mcafee, Inc. System and method for passive threat detection using virtual memory inspection
US8694738B2 (en) 2011-10-11 2014-04-08 Mcafee, Inc. System and method for critical address space protection in a hypervisor environment
US9069586B2 (en) 2011-10-13 2015-06-30 Mcafee, Inc. System and method for kernel rootkit protection in a hypervisor environment
US8973144B2 (en) 2011-10-13 2015-03-03 Mcafee, Inc. System and method for kernel rootkit protection in a hypervisor environment
US8713668B2 (en) 2011-10-17 2014-04-29 Mcafee, Inc. System and method for redirected firewall discovery in a network environment
US8800024B2 (en) 2011-10-17 2014-08-05 Mcafee, Inc. System and method for host-initiated firewall discovery in a network environment
US8739272B1 (en) 2012-04-02 2014-05-27 Mcafee, Inc. System and method for interlocking a host and a gateway
US20140156252A1 (en) 2012-11-30 2014-06-05 International Business Machines Corporation Hybrid platform-dependent simulation interface
US8973146B2 (en) 2012-12-27 2015-03-03 Mcafee, Inc. Herd based scan avoidance system in a network environment
EP3061030A4 (en) 2013-10-24 2017-04-19 McAfee, Inc. Agent assisted malicious application blocking in a network environment
US9977673B1 (en) * 2014-11-13 2018-05-22 Marvell International Ltd. Systems and methods for providing a platform-specific porting layer for multi-level software stacks
CN104657191B (en) * 2015-03-06 2019-02-22 搜游网络科技(北京)有限公司 A kind of method and apparatus that Flash project is converted to Html5 project

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5327559A (en) 1990-10-23 1994-07-05 International Business Machines Corporation Remote and batch processing in an object oriented programming system
US5329619A (en) * 1992-10-30 1994-07-12 Software Ag Cooperative processing interface and communication broker for heterogeneous computing environments
US5386564A (en) * 1993-02-24 1995-01-31 Hewlett-Packard Company Conversion of data and objects across classes in an object management system
US5379432A (en) * 1993-07-19 1995-01-03 Taligent, Inc. Object-oriented interface for a procedural operating system
US5732270A (en) * 1994-09-15 1998-03-24 Visual Edge Software Limited System and method for providing interoperability among heterogeneous object systems
US5542078A (en) 1994-09-29 1996-07-30 Ontos, Inc. Object oriented data store integration environment for integration of object oriented databases and non-object oriented data facilities
US5583983A (en) * 1994-11-17 1996-12-10 Objectware, Inc. Multi-platform object-oriented software development and deployment system
US5822587A (en) * 1995-10-20 1998-10-13 Design Intelligence, Inc. Method and system for implementing software objects

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040051740A1 (en) * 2002-09-12 2004-03-18 Uwe Reichel Data container for interaction between a client process and software applications
US20040054640A1 (en) * 2002-09-12 2004-03-18 Uwe Reichel Interaction between a client process and software applications
US7213208B2 (en) 2002-09-12 2007-05-01 Sap Ag Data container for interaction between a client process and software applications
US20050172299A1 (en) * 2004-02-02 2005-08-04 Hai Zhao Methods and apparatus to provide a modular native method invocation system
US7917898B2 (en) * 2004-02-02 2011-03-29 Intel Corporation Methods and apparatus to provide a modular native method invocation system
US7765539B1 (en) * 2004-05-19 2010-07-27 Nintendo Co., Ltd. System and method for trans-compiling video games
US20060179440A1 (en) * 2004-11-18 2006-08-10 Besbris David G Native objects accessible by platform neutral API
US8060856B2 (en) * 2004-11-18 2011-11-15 Aol Inc. Native objects accessible by platform neutral API
US7810105B2 (en) * 2004-12-29 2010-10-05 Motorola, Inc. Method and apparatus for running different types of applications on a wireless mobile device
US20060143622A1 (en) * 2004-12-29 2006-06-29 Motorola, Inc. Method and apparatus for running different types of applications on a wireless mobile device
US20070011669A1 (en) * 2005-07-06 2007-01-11 International Business Machines Corporation Software migration
US20090276730A1 (en) * 2008-03-04 2009-11-05 Alexandre Aybes Techniques for navigation of hierarchically-presented data
US20090225040A1 (en) * 2008-03-04 2009-09-10 Microsoft Corporation Central resource for variable orientation user interface
US9705729B2 (en) 2012-06-01 2017-07-11 Dell Products L.P. General client engine with load balancing for client-server communication
US20140373098A1 (en) * 2013-06-14 2014-12-18 Andrew T. Fausak Runtime api framework for client-server communication
US9300669B2 (en) * 2013-06-14 2016-03-29 Dell Products L.P. Runtime API framework for client-server communication
US9407725B2 (en) 2013-06-14 2016-08-02 Dell Products L.P. Generic transcoding service for client-server communication
US9467446B2 (en) 2013-06-14 2016-10-11 Dell Products L.P. Runtime API framework for client-server communication
US9716740B2 (en) 2013-06-14 2017-07-25 Dell Products L.P. Web-based transcoding to clients for client-server communication
US10044825B2 (en) 2013-06-14 2018-08-07 Dell Products L.P. Generic transcoding service for client-server communication
US10977016B2 (en) * 2017-10-31 2021-04-13 EMC IP Holding Company LLC Management of data using templates
US11086901B2 (en) 2018-01-31 2021-08-10 EMC IP Holding Company LLC Method and system for efficient data replication in big data environment

Also Published As

Publication number Publication date
US6356957B2 (en) 2002-03-12

Similar Documents

Publication Publication Date Title
US6356957B2 (en) Method for emulating native object oriented foundation classes on a target object oriented programming system using a template library
KR970008530B1 (en) Language neutral objects
Tatsubori et al. OpenJava: A class-based macro system for Java
US5418964A (en) System and method for parent class shadowing in a statically linked object hierarchy
CN106462412B (en) Structure identification of dynamically generated pattern-based classes
US5815415A (en) Computer system for portable persistent modeling
US5692195A (en) Parent class shadowing
KR950007883B1 (en) Method and system for managing a set of class
US5339438A (en) Version independence for object oriented programs
US6063128A (en) Object-oriented computerized modeling system
US5421016A (en) System and method for dynamically invoking object methods from an application designed for static method invocation
US5493680A (en) Method for creating an object subclass with selective inheritance
EP1086419B1 (en) A method of and system for implementing parameterized types to be compatible with existing unparameterized libraries
US5867709A (en) Method and system for reusing customizations to a software product
Micallef Encapsulation, reusability and extensibility in object-oriented programming languages
US5872977A (en) Object-oriented method and apparatus for creating a makefile
US6139198A (en) System and method for enabling tracing of program execution in an object-oriented system
US6330711B1 (en) Method and apparatus for dynamic application and maintenance of programs
US20050172302A1 (en) Method, system, program and data structure for controlling access to sensitive functions
US6378003B1 (en) Method and system for deriving metaclasses in an object oriented system
Bravetti et al. Behavioural types for memory and method safety in a core object-oriented language
Oliveira Object-Oriented Techniques
Kumar et al. Programming with Java
Mohnen Interfaces with Skeletal Implementations in Java
Tatsubori A Class-Object Model for Program Transformations

Legal Events

Date Code Title Description
AS Assignment

Owner name: HEWLETT-PACKARD COMPANY, CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:SANCHEZ, HUMBERTO A., II.;KIND, LANCE D.;REEL/FRAME:009163/0599;SIGNING DATES FROM 19970204 TO 19970402

AS Assignment

Owner name: HEWLETT-PACKARD COMPANY, COLORADO

Free format text: MERGER;ASSIGNOR:HEWLETT-PACKARD COMPANY;REEL/FRAME:011523/0469

Effective date: 19980520

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

FPAY Fee payment

Year of fee payment: 8

AS Assignment

Owner name: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P., TEXAS

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:HEWLETT-PACKARD COMPANY;REEL/FRAME:026945/0699

Effective date: 20030131

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees
STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20140312