[ROOT] new PlugginManager and Qt layer

From: Valeri Fine (fine@bnl.gov)
Date: Fri Aug 30 2002 - 01:55:17 MEST


Hello team,

I have been spending 2 weeks trying to incorporate the brand new
technique dealing with the various implementation of TVirtualX classes.
It sounded one could eliminate TApplication.cxx class corrections needed
to switch from the "native" to for example "qt" layer.
See:
http://root.cern.ch/root/htmldoc/src/TApplication.cxx.html#TApplication:
LoadGraphicsLibs 

I found the statement there:

gVirtualX = (TVirtualX *) h->ExecPlugin(2, name.Data(), title.Data());

returns the wrong value of gVirtualX in the case of the Qt-based
implementation http://www.usatlas.bnl.gov/~fine/QtRootDownload.html 

This is because of the wrong cast of the multiply inheritance of
TQtThread class made by ExecPlugin method.
The problem manifests just one tries to instantiate via PluginManager
the object of the class derived from several others, and when the first
base class is not a TObject.
In my case that can not be eliminated and the inheritance order can not
be changed due Qt-restriction either.

I wonder if it is possible to fix this. At least I myself have found no
way to fix things "honestly". This is because I had to hide the fact of
the multiply inheritance from Cint compiler to be able to generate
RootCint dictionary entry. That PluginManager approach requires.

I do:

class TQtThread :
#ifndef __CINT__
  public QObject, 
#endif
  public TQt {
#ifndef __CINT__
  Q_OBJECT
#endif

I'd like to call your attention that the problem is a general. One might
have gotten a wrong pointer just he tried to use PluginManager to
plug-in the class with the multiply inheirtance in certain order.

I am begging a pardon for delay with Qt-based ROOT 3.03/08 version due
the problem described above.

  My best regards, 
                              Valeri



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:06 MET