Re: [ROOT] abstract class object???

From: John Zweizig (jzweizig@ligo.caltech.edu)
Date: Thu Aug 10 2000 - 01:30:42 MEST


Hi All,

For what it's worth there is a similar even more annoying case when using
compiled classes. If a compiled class doesn't supply all the abstract
methods of its base class(es), rootcint will arbitrarily and without
warning discard all the constructors for that class! In fact I had a class
where the method prototype differed from the the base class prototype by a
throw() clause. This wasn't sufficient for the compiler to consider them
different methods, but it was sufficient for rootcint to discard all
constructors for all methods that inherit from the class.

It would be nice if rootcint could be convinced to list the abstract
methods for what it considers to be abstract classes.
Best regards,

John


On Wed, 9 Aug 2000, Sean Walston wrote:

> I figured it out. For the sake of others who may find the following error
> message confusing:
> 
> 	Error: abstract class object 'Foo Bar' declared FILE:foo.C LINE:x
> 
> This error occurs when you try to create an object called Bar which is of
> type Foo, where Foo is a derived class which inherits from a base class
> somewhere.
> 
> If there is a function in the base class that calls a function in the
> derived class, and if that function is not present in the derived class
> for any reason, Cint chokes when you try to create an object of type
> <derived class>, rather than when you actually call the function in the
> base class that calls the missing function in the derived class. (Does
> this make any sense?)
> 
> 	-- Sean 
> 
> 
> Rene Brun wrote:
> > 
> > Hi Sean,
> > 
> > Could you send your file Rb_zbs_DataClass.hxx/cxx ?
> > Is this class an abstract class ? Are you defining all the pure functions
> > from this class in the derived class?
> > 
> > Rene Brun
> > 
> > Sean Walston wrote:
> > >
> > > I get the following error message:
> > >
> > >         root [0] .x foo.C
> > >         Error: abstract class object 'Foo Bar' declared FILE:foo.C LINE:9
> > >         *** Interpreter error recovered ***
> > >
> __________________________________________________________________________
> 
>                                Sean Walston
> --------------------------------------------------------------------------
> Willamette Hall, Office 317      SLD, Central Lab Annex, Office B-153
> Department of Physics            Stanford Linear Accelerator Center, MS-94
> University of Oregon             P.O. Box 4349
> Eugene, OR 97403                 Stanford, CA 94309
> walston@ampere.uoregon.edu       walston@SLAC.stanford.edu
> Office:  541-346-4847            Office:  650-926-8768
> Home:    541-686-9969            Mobile:  541-912-5456
> __________________________________________________________________________
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:31 MET