RE:[Fwd: CINT and virtual base classes]

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Wed Dec 16 1998 - 17:16:57 MET


Mathieu,

Cint deals with virtual base classes  within  interpreted or precompiled
classes. If virtual base resolution goes accross interpreted/precompiled
boundary, you'll get problem. This is even true for ordinary virtual
function resolution.

In your case, I guess TNamed , TObject are compiled and TOpticalObject and
TPhotomultiplier are interpreted. This does not work. If you want to do this,
you need to compile TOpticalObject and TPhotomultiplier classes too.

By the way,
Even within interpreted or precompiled classes, implementaion of virtual
base class resolution is complicated. I do not recommend very much.

Masaharu Goto


> Does CINT deal properly with virtual base classes?
>
>I defined a chain of classes (for Ray-Tracing)
>
>class TOpticalObject : public TNamed {
>....
>};
>
>class TPhotomultiplier: virtual public TOpticalObject {
>};
>
>The TBrowser says that TPhotomultiplier has 3 base classes:
>TOpticalObject, TNamed and TObject, wich is not true. 
>
>And if I try to call
>
>TPhotomultiplier MyPm;
>MyPm.Inspect();
>
>I get a segmentation fault.
>
>rootcint has also some difficulties to generate the >> operator for this
>class.
>
>Does anybody know if virtual bases classes are allowed in CINT?
>Any help would be appreciated



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:41 MET