Re: [ROOT] Purely virtual base classes and streamers(?)

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Nov 30 2001 - 15:25:47 MET


Hi Volker,

I have recently made changes in teh development version in CVS for situations
like you describe. If you could provide a small test case corresponding to your
exact situation, I could tell you if this new version fixes this problem.

There are sometimes class constructions non trivial to support when
an abstract class is found during the split mode. ROOT needs to build
the dictionary for these classes. To build teh dictionary, an instance
of the class has to be created. If the dictionary has not already been built
when the abstract class is found, there is no way to make an instance.
The difficulty is in detecting in the parent (real classes) this situation.

Rene Brun

Volker Hejny wrote:
> 
> Hi all,
> 
> we are using a baseclass (CTestBase) with a virtual function, e.g.
> virtual Set(Int_t n) = 0;
> and a second class derived from that base class (CTest). The situation is
> much like in TArray/TArrayI with a different array handling. Now we use
> the derived class as a data member in another class (CData) and this class
> finally as a branch in a tree.
> 
> The result is, that in TBrower, we see CTest as a data member of
> CData, but not the data members of CTest itself.
> 
> But: Giving the purely virtual function an implementation, thus
> virtual Set(Int_t n) {};
> the situation improves a lot: also the data members of CTest are displayed
> in TBrowser.
> 
> What is the reason for that behaviour? I also have other base classes
> with '=0' definitions, but I didn't observe that behaviour before.
> Is there any way to fix this?
> 
> Best regards,
> Volker
> 
> --
> Dr. Volker Hejny                Tel: 02461/616853                      **
> Institut f. Kernphysik          Fax: 02461/613930                     **
> ---------------------------------------------------------------- **  ** ---
> Forschungszentrum Juelich GmbH, D-52425 Juelich                    **



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:10 MET