comp.lang.ada
 help / color / mirror / Atom feed
From: ncohen@watson.ibm.com (Norman H. Cohen)
Subject: Re: Borland Ada
Date: 27 Feb 1995 16:55:51 GMT
Date: 1995-02-27T16:55:51+00:00	[thread overview]
Message-ID: <3it06n$1hof@watnews1.watson.ibm.com> (raw)
In-Reply-To: 3ioh3j$mn@lang8.cs.nyu.edu

In article <3ioh3j$mn@lang8.cs.nyu.edu>, comar@cs.nyu.edu (Cyrille Comar)
writes: 

|> ncohen@watson.ibm.com (Norman H. Cohen) writes: 
|>
|> : Multiple inheritance and single inheritance are different ways of
|> : DEFINING a class.  Once the class is defined, an object of that class is
|> : like an object of any other class: It has a unique tag; zero or more data
|>                                         ^^^^^^^^^^^^^^^^^
...
|> This is unfortunately not true, an objects coming from a class that
|> multiple-inherits, contains more than one virtual table pointer (the
|> equivalent of a tag), this is what makes the interfacing not
|> completely trivial...

In the C++ implementations with which I'm familiar, there is one vtable
pointer corresponding to the object itself.  The other vtable pointers
correspond to the parent-class subobjects that are embedded in the
derived-class object.  These only come into play when converting a
pointer to the derived class into a pointer to one of its base classes.

In my note, I presumed that C++ classes imported into Ada would be
treated, in effect, as root tagged types.  That is, they have the
operations they have, and the Ada programmer is oblivious to whether
these operations were introduced in C++ with the imported class itself or
inherited from some ancestor; the Ada programmer would have no way to get
at the ancestor types.

If this presumption is correct, objects of the imported class have only
one tag that really matters, even if the imported class was defined by
multiple inheritance.  Was my presumption incorrect?

--
Norman H. Cohen    ncohen@watson.ibm.com



  reply	other threads:[~1995-02-27 16:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3icuq6$1j3c@watnews1.watson.ibm.com>
1995-02-26  0:13 ` Borland Ada Cyrille Comar
1995-02-27 16:55   ` Norman H. Cohen [this message]
1995-02-28  3:26 RE: BORLAND ADA Jean D. Ichbiah
1995-03-01 14:34 ` Mitch Gart
  -- strict thread matches above, loose matches on Subject: below --
1995-02-27  7:55 tmoran
1995-02-27  4:38 Michael Hagerty
1995-02-27  4:18 Michael Hagerty
     [not found] <8A410D0.0811002677.uuout@nitelog.com>
1995-02-27  3:38 ` MICHAEL HAGERTY
     [not found] <8A41305.0811002674.uuout@nitelog.com>
1995-02-27  3:18 ` MICHAEL HAGERTY
     [not found] <60.18011.4393.0N1D0B41@canrem.com>
     [not found] ` <3ianqv$ghb@Starbase.NeoSoft.COM>
1995-02-23  3:28   ` Borland Ada Jean D. Ichbiah
1995-02-23 16:08 ` Michael M. Bishop
1995-02-23 17:53   ` David M. Tannen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox