TTimer - discussive

Valeriy Onuchin (onuchin@emcal06.rhic.bnl.gov)
Sun, 09 Aug 1998 23:48:14 -0400


Hello, Rooters.

To simplify event-driven programming
it whould be nice to make possible to have
classes similar the following

class LiveObject: public TObject, public TTimer
{
public:
LiveObject() {gSystem->AddTimer(this);}

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
{ some actions in responce to graphic events
(for example, if(event==kButton1Up) TTimer::Remove();)
}

Bool_t Notify() {SomeAction(); Reset(); return kFALSE;}
};

The only obstacle which prevents having this is that
TTimer is original from TObject (TObject->TSysEvtHandler->TTimer).

Is it possible to have inheritance like this:

TSysEvtHandler -> TVirtualTimer
TVirtualTimer + TObject -> TTimer

or it requires dramatic modifications of ROOT?

With best regards, Valery