RE: [ROOT] surprising TClass::InheritsFrom

From: Philippe Canal (pcanal@fnal.gov)
Date: Fri Jul 25 2003 - 03:43:19 MEST


Hi Axel,

Yes this is the expected behavior, we have added more comments to the code.
The purpose of the method is to answer the question 'is a' rather than 'is
derived from'.

Cheers,
Philippe

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Axel Naumann
Sent: Tuesday, July 22, 2003 5:23 PM
To: roottalk
Subject: [ROOT] surprising TClass::InheritsFrom


Hi,

TObject::Class()->InheritsFrom(TObject::Class())

returns 1 (root 3.05/06, cvs 20 July 2003, linux, gcc 3.2). I don't recall
whether it used to be like that in earlier versions, but it's definitely
surprising (a class being its own base class?). Is this intended? If it
is, I'd appreciate a clarification in the doc.

Cheers, Axel.


#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET