[ROOT] Is classname::Class() unique?

From: Reiner.Rohlfs@obs.unige.ch
Date: Thu Aug 05 2004 - 15:35:05 MEST


Hi ROOT team

Assume I have a class called "Base" (derived from TNamed) and a derived template
class called "Child".
I create two dictionary informations in the LinkDef.h file for the Child class:

#pragma link C++ class Child<Short_t>+;
#pragma link C++ class Child<Int_t>+;

The code of these classes together with the dictionary code is linked in a
shared library.

Now I use these classes in a linked application program, linked with the shared
library of these classes Base and Child:

In the allplication code I call
        TClass * c_short = Child<Short_t>::Class();
and in the shared library code I call
        TClass * c_int = Child<Int_t>::Class();

and c_int is the same value as c_short.

If I call Child<Int_t>::Class() in the application code before I call
        TClass * c_int = Child<Int_t>::Class();
in the shared library code the values of c_int and c_short are different.

Is this what I have to expect or is this a bug?


I use ROOT version 4.00.08 and gcc version 2.95.3,  SuSE LINUX.


Thanks Reiner.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET