Re: TClass::GetClassInfo now returns void*

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Mon, 2 Jun 2008 12:16:50 +0200


Hi Nick,

The idea of the recent change is to reduce the exposition of the CINT interface in the ROOT code
in view of the transition to the new version of CINT based on Reflex to be introduced later this year.
At the time of the PRO release end of June, the direct calls to CINT will only be in the TCint class.
The ROOT classes that were previously calling CINT directly are now calling a TInterpreter virtual interface. Today the only concrete implementation of TInterpreter is TCint. Soon we will have TCint7 (the new version with Reflex) and will be possible to select at startup time which version you want to use.
We want to keep the old and new versions for some time (checking results and performance).

If you want to be able to run with a future version, I recommend you to call the TInterpreter interface.
see examples in the TClass code. TInterpreter and TCint classes have been extended to support all calls
to CINT.

Rene Brun

Nick West wrote:
> Dear Roottalk,
>
> With the update made a few days ago:-
>
> r24077 | brun | 2008-05-31 20:39:09 +0100 (Sat, 31 May 2008) | 65
> lines
>
> Extend the TInterpreter class to support the CINT API used so far by
> ROOT.
>
> my code:-
>
> TClass objClass(objName.c_str());
> Int_t objSizefromRoot = objClass.GetClassInfo()->Size();
>
> now fails to compile:-
>
> error: `ClassInfo_t*' is not a pointer-to-object type
>
> Looking at the changes to TClass.h:-
>
> ===================================================================
> --- TClass.h (revision 22973)
> +++ TClass.h (working copy)
> @@ -42,10 +42,6 @@
> ...
> - G__ClassInfo *fClassInfo; //pointer to CINT class info
> class
> + ClassInfo_t *fClassInfo; //pointer to CINT class info
> class
>
> - G__ClassInfo *GetClassInfo() const { return fClassInfo; }
> + ClassInfo_t *GetClassInfo() const { return fClassInfo; }
>
> GetClassInfo() now returns a ClassInfo_t* and changes to TDictionary.h:-
>
>
> ===================================================================
> --- TDictionary.h (revision 22961)
> +++ TDictionary.h (working copy)
>
> TDictionary.h:
>
> @@ -47,6 +47,16 @@
> ...
> +typedef void ClassInfo_t;
>
>
> ClassInfo_t* is just void*. How should I change my code to access class
> info in future?
>
> Thanks,
>
> Nick West
>
>
Received on Mon Jun 02 2008 - 12:17:11 CEST

This archive was generated by hypermail 2.2.0 : Mon Jun 02 2008 - 17:50:01 CEST