Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method Allowing a SOM Class to Inherit from a C++ Class

IP.com Disclosure Number: IPCOM000115371D
Original Publication Date: 1995-Apr-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 74K

Publishing Venue

IBM

Related People

Perks, M: AUTHOR [+3]

Abstract

Disclosed is a method allowing a class written in SOM to inherit from a class written in C++. This method may be used, for example, when a class library or product written in C++ needs to be extended with extensions written using SOM to facilitate the use of distributed objects (DSOM). This method can also be used to allow inheritance between classes written for different C++ compilers or different object-oriented languages. A class written in SOM having a C++ implementation, hereafter called a "SOM C++ class," can subclass a class written in C++. A proxy class written in C++ calls methods in the SOM C++ class to perform work and to create a SOM proxy hierarchy to "callback" to the C++ classes.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Method Allowing a SOM Class to Inherit from a C++ Class

      Disclosed is a method allowing a class written in SOM to
inherit from a class written in C++.  This method may be used, for
example, when a class library or product written in C++ needs to be
extended with extensions written using SOM to facilitate the use of
distributed objects (DSOM).  This method can also be used to allow
inheritance between classes written for different C++ compilers or
different object-oriented languages.  A class written in SOM having a
C++ implementation, hereafter called a "SOM C++ class," can subclass
a class written in C++.  A proxy class written in C++ calls methods
in the SOM C++ class to perform work and to create a SOM proxy
hierarchy to "callback" to the C++ classes.

      Fig. 1 is a block diagram of an example requirement used to
illustrate this method.  In this example, there are two C++ classes,
A and B, where class B is a subclass of class A.  Class A has one
method, A1.  Class B has two methods, B1 and B2, and inherits method
A1 from class A.  A requirement is given to write a new SOM C++ class
C that is a subclass of class B.  This class C has methods C1 and B1,
where B1 is an override of the method B1 in class B.

      Fig. 2 is a block diagram showing a solution for the example
requirement of Fig. 1.  The following classes and methods are
created:
  1.  A C++ subclass called CPROXY that overrides all methods in B
and
       A, that is A1, B1 and B2.
  2.  A SOM C++ class called ASOM that has the same methods as A,
that
       is A1.
  3.  A SOM C++ class called BSOM that is a subclass of ASOM, with
the
       sam...