RE: [ROOT] GetClass and non existing classes

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Nov 19 2003 - 20:24:38 MET


Hi,

> if I request a non existing class by gROOT->GetClass("Unknown") I get a
>TClass object 

This is not the expected behavior!

> What is the apropriate method to check
> whether I can savely create a new instance of this class by TClass::New()
> or not? 

Use TClass::HasDefaultConstructor()

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Thomas Bretz
Sent: Wednesday, November 19, 2003 10:22 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] GetClass and non existing classes


Hi all,

if I request a non existing class by gROOT->GetClass("Unknown") I get a
TClass object (I expected NULL).What is the apropriate method to check
whether I can savely create a new instance of this class by TClass::New()
or not? 

Best regards,
Thomas.



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