Re: Virtual base class in CINT

From: Joanne Bogart (jrb@SLAC.stanford.edu)
Date: Thu Apr 01 1999 - 01:26:35 MEST


Pasha Murat wrote:
> 
> Rob Shanks writes:
>  >      I'm trying to generate a CINT file for some classes of mine and
>  > have run into some difficulty. I have a class called MCDiag which
>  > inherits from a pure virtual class, EventSource. The problem is that
>  > CINT seems to be refusing to generate Streamer() and ShowMembers()
>  > methods for my MCDiag class. I looked around the web site and saw that
>  > by adding certain characters into the LinkDef file one could stop these
>  > methods from being generated. I'm sure I don't have those flags set in
>  > the LinkDef file. I just can't figure out why CINT won't generate the
>  > Streamer() and ShowMembers() methods. Here is what happens when I call
>  > rootcint:
>  >
>  > V:\LCD\RootApps\Utils\prod\src>rootcint -f UtilsCint.cxx -c
>  > -I..\..\..\Event\pro
>  > d\src -Iv:\lcd\lcd-working\StdHep\src\inc EventSource.h readStdFile.h
>  > MCDiag.h UtilsLinkDef.h
>  > Note: operator new() masked 1c
>  > Note: operator delete() masked 1c
>  > Class MCDiag: Streamer() not declared
>  > Class MCDiag: ShowMembers() not declared
>  >
>  > V:\LCD\RootApps\Utils\prod\src>
>  >
>  >      The odd thing is that the class readStdFile also inherits from
>  > the virtual base class EventSource and seems to get all of it's methods
>  > generated just fine.
>  >
>  >      Suggestions?
>  >
>  > Rob Shanks
>  > rshanks@slac.stanford.edu
> 
> I'd guess that you're missing ClassDef/ClassImp macros in your MCDiag class.
> 
>                                                 -pasha

That's a pretty good guess.  I looked at it with Rob and we discovered he
had a semi-colon following ClassImp(..) which apparently interferes with
the operation of the macro.  Minus the semi-colon, everything is fine.

                                              Joanne



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