Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TQConnection.cxx
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Valeriy Onuchin & Fons Rademakers 15/10/2000
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TQConnection
13\ingroup Base
14
15TQConnection class is an internal class, used in the object
16communication mechanism.
17
18TQConnection:
19 - is a list of signal_lists containing pointers
20 to this connection
21 - receiver is the object to which slot-method is applied
22*/
23
24#include "TQConnection.h"
25#include "TROOT.h"
26#include "TRefCnt.h"
27#include "TClass.h"
28#include "TMethod.h"
29#include "TMethodArg.h"
30#include "TDataType.h"
31#include "TInterpreter.h"
32#include <iostream>
33#include "TVirtualMutex.h"
34#include "THashTable.h"
35
37
38char *gTQSlotParams; // used to pass string parameter
39
40/** \class TQSlot
41Slightly modified TMethodCall class used in the object communication mechanism.
42*/
43
44class TQSlot : public TObject, public TRefCnt {
45
46protected:
47 CallFunc_t *fFunc; // CINT method invocation environment
48 ClassInfo_t *fClass; // CINT class for fFunc
49 TFunction *fMethod; // slot method or global function
50 Long_t fOffset; // offset added to object pointer
51 TString fName; // full name of method
52 Int_t fExecuting; // true if one of this slot's ExecuteMethod methods is being called
53public:
54 TQSlot(TClass *cl, const char *method, const char *funcname);
55 TQSlot(const char *class_name, const char *funcname);
56 virtual ~TQSlot();
57
58 Bool_t CheckSlot(Int_t nargs) const;
59 Long_t GetOffset() const { return fOffset; }
60 CallFunc_t *StartExecuting();
61 CallFunc_t *GetFunc() const { return fFunc; }
62 void EndExecuting();
63
64 const char *GetName() const {
65 return fName.Data();
66 }
67
68 Int_t GetMethodNargs() { return fMethod->GetNargs(); }
69
70 void ExecuteMethod(void *object, Int_t nargs, va_list ap) = delete;
71 void ExecuteMethod(void *object);
72 void ExecuteMethod(void *object, Long_t param);
73 void ExecuteMethod(void *object, Long64_t param);
74 void ExecuteMethod(void *object, Double_t param);
75 void ExecuteMethod(void *object, const char *params);
76 void ExecuteMethod(void *object, Long_t *paramArr, Int_t nparam = -1);
77 void Print(Option_t *opt = "") const;
78 void ls(Option_t *opt = "") const {
79 Print(opt);
80 }
81
82 Bool_t IsExecuting() const {
83 return fExecuting > 0;
84 }
85};
86
87
88////////////////////////////////////////////////////////////////////////////////
89/// Create the method invocation environment. Necessary input
90/// information: the class, full method name with prototype
91/// string of the form: method(char*,int,float).
92/// To initialize class method with default arguments, method
93/// string with default parameters should be of the form:
94///
95/// method(=\"ABC\",1234,3.14) (!! parameter string should
96/// consists of '=').
97///
98/// To execute the method call TQSlot::ExecuteMethod(object,...).
99
100TQSlot::TQSlot(TClass *cl, const char *method_name,
101 const char *funcname) : TObject(), TRefCnt()
102{
103 fFunc = 0;
104 fClass = 0;
105 fOffset = 0;
106 fMethod = 0;
107 fName = "";
108 fExecuting = 0;
109
110 // cl==0, is the case of interpreted function.
111
112 fName = method_name;
113
114 char *method = new char[strlen(method_name) + 1];
115 if (method) strcpy(method, method_name);
116
117 char *proto;
118 char *tmp;
119 char *params = 0;
120
121 // separate method and prototype strings
122
123 if ((proto = strchr(method, '('))) {
124
125 // substitute first '(' symbol with '\0'
126 *proto++ = '\0';
127
128 // last ')' symbol with '\0'
129 if ((tmp = strrchr(proto, ')'))) * tmp = '\0';
130 if ((params = strchr(proto, '='))) * params = ' ';
131 }
132
134 fFunc = gCling->CallFunc_Factory();
135
136 // initiate class method (function) with proto
137 // or with default params
138
139 if (cl) {
140 if (params) {
141 gCling->CallFunc_SetFunc(fFunc, cl->GetClassInfo(), method, params, &fOffset);
142 fMethod = cl->GetMethod(method, params);
143 } else {
144 gCling->CallFunc_SetFuncProto(fFunc, cl->GetClassInfo(), method, proto, &fOffset);
145 fMethod = cl->GetMethodWithPrototype(method, proto);
146 }
147 } else {
149 if (params) {
150 gCling->CallFunc_SetFunc(fFunc, fClass, (char *)funcname, params, &fOffset);
151 fMethod = gROOT->GetGlobalFunction(funcname, params, kFALSE);
152 } else {
153 gCling->CallFunc_SetFuncProto(fFunc, fClass, (char *)funcname, proto, &fOffset);
154 fMethod = gROOT->GetGlobalFunctionWithPrototype(funcname, proto, kFALSE);
155 }
156 }
157
158 // cleaning
159 delete [] method;
160}
161
162////////////////////////////////////////////////////////////////////////////////
163/// Create the method invocation environment. Necessary input
164/// information: the name of class (could be interpreted class),
165/// full method name with prototype or parameter string
166/// of the form: method(char*,int,float).
167/// To initialize class method with default arguments, method
168/// string with default parameters should be of the form:
169///
170/// method(=\"ABC\",1234,3.14) (!! parameter string should
171/// consists of '=').
172///
173/// To execute the method call TQSlot::ExecuteMethod(object,...).
174
175TQSlot::TQSlot(const char *class_name, const char *funcname) :
176 TObject(), TRefCnt()
177{
178 fFunc = 0;
179 fClass = 0;
180 fOffset = 0;
181 fMethod = 0;
182 fName = funcname;
183 fExecuting = 0;
184
185 char *method = new char[strlen(funcname) + 1];
186 if (method) strcpy(method, funcname);
187
188 char *proto;
189 char *tmp;
190 char *params = 0;
191
192 // separate method and prototype strings
193
194 if ((proto = strchr(method, '('))) {
195 *proto++ = '\0';
196 if ((tmp = strrchr(proto, ')'))) * tmp = '\0';
197 if ((params = strchr(proto, '='))) * params = ' ';
198 }
199
201 fFunc = gCling->CallFunc_Factory();
202 gCling->CallFunc_IgnoreExtraArgs(fFunc, true);
203
205 TClass *cl = 0;
206
207 if (!class_name)
208 ; // function
209 else {
210 gCling->ClassInfo_Init(fClass, class_name); // class
211 cl = TClass::GetClass(class_name);
212 }
213
214 if (params) {
215 gCling->CallFunc_SetFunc(fFunc, fClass, method, params, &fOffset);
216 if (cl)
217 fMethod = cl->GetMethod(method, params);
218 else
219 fMethod = gROOT->GetGlobalFunction(method, params, kTRUE);
220 } else {
221 gCling->CallFunc_SetFuncProto(fFunc, fClass, method, proto , &fOffset);
222 if (cl)
223 fMethod = cl->GetMethodWithPrototype(method, proto);
224 else
225 fMethod = gROOT->GetGlobalFunctionWithPrototype(method, proto, kTRUE);
226 }
227
228 delete [] method;
229}
230
231////////////////////////////////////////////////////////////////////////////////
232/// TQSlot dtor.
233
234TQSlot::~TQSlot()
235{
236 // don't delete executing environment of a slot that is being executed
237 if (!fExecuting) {
238 gCling->CallFunc_Delete(fFunc);
240 }
241}
242
243////////////////////////////////////////////////////////////////////////////////
244/// ExecuteMethod the method (with preset arguments) for
245/// the specified object.
246
247inline void TQSlot::ExecuteMethod(void *object)
248{
249 ExecuteMethod(object, (Long_t*)nullptr, 0);
250
251}
252
253////////////////////////////////////////////////////////////////////////////////
254/// Return true if the method is valid and the number of arguments is
255/// acceptable.
256
257inline Bool_t TQSlot::CheckSlot(Int_t nargs) const
258{
259 if (!fMethod) {
260 Error("ExecuteMethod", "method %s not found,"
261 "\n(note: interpreted methods are not supported with varargs)",
262 fName.Data());
263 return kFALSE;
264 }
265
266 if (nargs < fMethod->GetNargs() - fMethod->GetNargsOpt() ||
267 nargs > fMethod->GetNargs()) {
268 Error("ExecuteMethod", "nargs (%d) not consistent with expected number of arguments ([%d-%d])",
269 nargs, fMethod->GetNargs() - fMethod->GetNargsOpt(),
270 fMethod->GetNargs());
271 return kFALSE;
272 }
273
274 return kTRUE;
275}
276
277////////////////////////////////////////////////////////////////////////////////
278/// Mark the slot as executing.
279
280CallFunc_t *TQSlot::StartExecuting() {
281 fExecuting++;
282 return fFunc;
283}
284
285////////////////////////////////////////////////////////////////////////////////
286/// Mark the slot as no longer executing and cleanup if need be.
287
288void TQSlot::EndExecuting() {
289 fExecuting--;
290 if (!TestBit(kNotDeleted) && !fExecuting)
291 gCling->CallFunc_Delete(fFunc);
292}
293
294////////////////////////////////////////////////////////////////////////////////
295/// ExecuteMethod the method for the specified object and
296/// with single argument value.
297
298inline void TQSlot::ExecuteMethod(void *object, Long_t param)
299{
300 ExecuteMethod(object, &param, 1);
301
302}
303
304////////////////////////////////////////////////////////////////////////////////
305/// ExecuteMethod the method for the specified object and
306/// with single argument value.
307
308inline void TQSlot::ExecuteMethod(void *object, Long64_t param)
309{
310 Long_t *arg = reinterpret_cast<Long_t *>(&param);
311 ExecuteMethod(object, arg, 1);
312
313}
314
315////////////////////////////////////////////////////////////////////////////////
316/// ExecuteMethod the method for the specified object and
317/// with single argument value.
318
319inline void TQSlot::ExecuteMethod(void *object, Double_t param)
320{
321 Long_t *arg = reinterpret_cast<Long_t *>(&param);
322 ExecuteMethod(object, arg, 1);
323
324}
325
326////////////////////////////////////////////////////////////////////////////////
327/// ExecuteMethod the method for the specified object and text param.
328
329inline void TQSlot::ExecuteMethod(void *object, const char *param)
330{
331 Long_t arg = reinterpret_cast<Long_t>(param);
332 ExecuteMethod(object, &arg, 1);
333
334}
335
336////////////////////////////////////////////////////////////////////////////////
337/// ExecuteMethod the method for the specified object and with
338/// several argument values.
339/// ParamArr is an array containing the function argument values.
340/// If nparam = -1 then paramArr must contain values for all function
341/// arguments, otherwise Nargs-NargsOpt <= nparam <= Nargs, where
342/// Nargs is the number of all arguments and NargsOpt is the number
343/// of default arguments.
344
345inline void TQSlot::ExecuteMethod(void *object, Long_t *paramArr, Int_t nparam)
346{
347 void *address = 0;
349 if (paramArr) gCling->CallFunc_SetArgArray(fFunc, paramArr, nparam);
350 if (object) address = (void *)((Long_t)object + fOffset);
351 fExecuting++;
352 gCling->CallFunc_Exec(fFunc, address);
353 fExecuting--;
354 if (!TestBit(kNotDeleted) && !fExecuting)
355 gCling->CallFunc_Delete(fFunc);
356}
357
358////////////////////////////////////////////////////////////////////////////////
359/// Print info about slot.
360
361void TQSlot::Print(Option_t *) const
362{
363 std::cout << IsA()->GetName() << "\t" << GetName() << "\t"
364 << "Number of Connections = " << References() << std::endl;
365}
366
367////////////////////////////////////////////////////////////////////////////////
368
369class TQSlotPool {
370private:
371 THashTable *fTable;
372public:
373 TQSlotPool() {
374 fTable = new THashTable(50);
375 }
376 virtual ~TQSlotPool() {
377 fTable->Clear("nodelete");
378 }
379
380 TQSlot *New(const char *class_name, const char *funcname);
381 TQSlot *New(TClass *cl, const char *method, const char *func);
382 void Free(TQSlot *slot);
383};
384
385////////////////////////////////////////////////////////////////////////////////
386/// Create new slot or return already existing one.
387
388TQSlot *TQSlotPool::New(const char *class_name, const char *funcname)
389{
390 TString name = class_name;
391 name += "::";
392 name += funcname;
393
394 TQSlot *slot = (TQSlot *)fTable->FindObject(name.Data());
395
396 if (!slot) {
397 slot = new TQSlot(class_name, funcname);
398 fTable->Add(slot);
399 }
400 slot->AddReference();
401 return slot;
402}
403
404////////////////////////////////////////////////////////////////////////////////
405/// Create new slot or return already existing one.
406
407TQSlot *TQSlotPool::New(TClass *cl, const char *method, const char *func)
408{
410
411 if (cl) {
412 name = cl->GetName();
413 name += "::";
414 name += method;
415 } else {
416 name = "::";
417 name += func;
418 }
419
420 TQSlot *slot = (TQSlot *)fTable->FindObject(name.Data());
421
422 if (!slot) {
423 slot = new TQSlot(cl, method, func);
424 fTable->Add(slot);
425 }
426 slot->AddReference();
427 return slot;
428}
429
430////////////////////////////////////////////////////////////////////////////////
431/// Delete slot if there is no reference to it.
432
433void TQSlotPool::Free(TQSlot *slot)
434{
435 slot->RemoveReference(); // decrease references to slot
436
437 if (slot->References() <= 0) {
438 fTable->Remove(slot);
439 if (!slot->IsExecuting()) SafeDelete(slot);
440 }
441}
442
443static TQSlotPool gSlotPool; // global pool of slots
444
445void TQConnection::SetArg(const Long_t *params, Int_t nparam/* = -1*/) {
446 if (nparam == -1)
447 nparam = fSlot->GetMethodNargs();
448
449 // FIXME: Why TInterpreter needs non-const SetArgArray. TClingCallFunc
450 // doesn't modify the value.
451 gInterpreter->CallFunc_SetArgArray(fSlot->GetFunc(), const_cast<Long_t*>(params), nparam);
452}
453
454
455////////////////////////////////////////////////////////////////////////////////
456/// TQConnection ctor.
457/// cl != 0 - connection to object == receiver of class == cl
458/// and method == method_name
459/// cl == 0 - connection to function with name == method_name
460
461TQConnection::TQConnection(TClass *cl, void *receiver, const char *method_name)
462 : TQObject()
463{
464 const char *funcname = 0;
465 fReceiver = receiver; // fReceiver is pointer to receiver
466
467 if (!cl) {
468 Error("SetFCN", "Not used anymore.");
469 /*
470 funcname = gCling->Getp2f2funcname(fReceiver);
471 if (!funcname)
472 Warning("TQConnection", "%s cannot be compiled", method_name);
473 */
474 }
475
476 if (cl) fClassName = cl->GetName();
477 fSlot = gSlotPool.New(cl, method_name, funcname);
478}
479
480////////////////////////////////////////////////////////////////////////////////
481/// TQConnection ctor.
482/// Creates connection to method of class specified by name,
483/// it could be interpreted class and with method == funcname.
484
485TQConnection::TQConnection(const char *class_name, void *receiver,
486 const char *funcname) : TQObject()
487{
488 fClassName = class_name;
489 fSlot = gSlotPool.New(class_name, funcname); // new slot-method
490 fReceiver = receiver; // fReceiver is pointer to receiver
491}
492
493////////////////////////////////////////////////////////////////////////////////
494/// Copy constructor. Ignore connections to this TQConnections
495
497{
499 fSlot = con.fSlot;
500 fSlot->AddReference();
501 fReceiver = con.fReceiver;
502}
503
504////////////////////////////////////////////////////////////////////////////////
505/// TQConnection dtor.
506/// - remove this connection from all signal lists
507/// - we do not delete fSlot if it has other connections,
508/// TQSlot::fCounter > 0 .
509
511{
512 TIter next(this);
513 TList *list;
514
515 while ((list = (TList *)next())) {
516 list->Remove(this);
517 if (list->IsEmpty()) delete list; // delete empty list
518 }
519 Clear("nodelete");
520
521 if (!fSlot) return;
522 gSlotPool.Free(fSlot);
523}
524
525////////////////////////////////////////////////////////////////////////////////
526/// Returns name of connection (aka name of slot)
527
528const char *TQConnection::GetName() const
529{
530 return fSlot->GetName();
531}
532
533////////////////////////////////////////////////////////////////////////////////
534/// Signal Destroyed tells that connection is destroyed.
535
537{
538 MakeZombie();
539 Emit("Destroyed()");
540}
541
542////////////////////////////////////////////////////////////////////////////////
543/// List TQConnection full method name and list all signals
544/// connected to this connection.
545
546void TQConnection::ls(Option_t *option) const
547{
548 std::cout << "\t" << IsA()->GetName() << "\t" << GetName() << std::endl;
549 ((TQConnection *)this)->R__FOR_EACH(TList, ls)(option);
550}
551
552////////////////////////////////////////////////////////////////////////////////
553/// Print TQConnection full method name and print all
554/// signals connected to this connection.
555
557{
559 std::cout << IsA()->GetName() << "\t" << fReceiver << "\t" << GetName() << std::endl;
560}
561
562////////////////////////////////////////////////////////////////////////////////
563/// Apply slot-method to the fReceiver object without arguments.
564
566{
567 // This connection might be deleted in result of the method execution
568 // (for example in case of a Disconnect). Hence we do not assume
569 // the object is still valid on return.
570 TQSlot *s = fSlot;
571 fSlot->ExecuteMethod(fReceiver);
572 if (s->References() <= 0) delete s;
573}
574
575////////////////////////////////////////////////////////////////////////////////
576/// Apply slot-method to the fReceiver object with
577/// single argument value.
578
580{
581 // This connection might be deleted in result of the method execution
582 // (for example in case of a Disconnect). Hence we do not assume
583 // the object is still valid on return.
584 TQSlot *s = fSlot;
585 fSlot->ExecuteMethod(fReceiver, param);
586 if (s->References() <= 0) delete s;
587}
588
589////////////////////////////////////////////////////////////////////////////////
590/// Apply slot-method to the fReceiver object with
591/// single argument value.
592
594{
595 // This connection might be deleted in result of the method execution
596 // (for example in case of a Disconnect). Hence we do not assume
597 // the object is still valid on return.
598 TQSlot *s = fSlot;
599 fSlot->ExecuteMethod(fReceiver, param);
600 if (s->References() <= 0) delete s;
601}
602
603////////////////////////////////////////////////////////////////////////////////
604/// Apply slot-method to the fReceiver object with
605/// single argument value.
606
608{
609 // This connection might be deleted in result of the method execution
610 // (for example in case of a Disconnect). Hence we do not assume
611 // the object is still valid on return.
612 TQSlot *s = fSlot;
613 fSlot->ExecuteMethod(fReceiver, param);
614 if (s->References() <= 0) delete s;
615}
616
617////////////////////////////////////////////////////////////////////////////////
618/// Apply slot-method to the fReceiver object with variable
619/// number of argument values.
620
622{
623 // This connection might be deleted in result of the method execution
624 // (for example in case of a Disconnect). Hence we do not assume
625 // the object is still valid on return.
626 TQSlot *s = fSlot;
627 fSlot->ExecuteMethod(fReceiver, params, nparam);
628 if (s->References() <= 0) delete s;
629}
630
631////////////////////////////////////////////////////////////////////////////////
632/// Apply slot-method to the fReceiver object and
633/// with string parameter.
634
635void TQConnection::ExecuteMethod(const char *param)
636{
637 // This connection might be deleted in result of the method execution
638 // (for example in case of a Disconnect). Hence we do not assume
639 // the object is still valid on return.
640 TQSlot *s = fSlot;
641 fSlot->ExecuteMethod(fReceiver, param);
642 if (s->References() <= 0) delete s;
643}
644
645////////////////////////////////////////////////////////////////////////////////
646/// Return true if the underlying method is value and the number of argument
647/// is compatible.
648
650 return fSlot->CheckSlot(nargs);
651}
652
653////////////////////////////////////////////////////////////////////////////////
654/// Return the object address to be passed to the function.
655
657 if (fReceiver) return (void *)((Long_t)fReceiver + fSlot->GetOffset());
658 else return nullptr;
659}
660
661////////////////////////////////////////////////////////////////////////////////
662/// Lock the interpreter and mark the slot as executing.
663
664CallFunc_t *TQConnection::LockSlot() const {
666 return fSlot->StartExecuting();
667}
668
669////////////////////////////////////////////////////////////////////////////////
670/// Unlock the interpreter and mark the slot as no longer executing.
671
672void TQConnection::UnLockSlot(TQSlot *s) const {
673 s->EndExecuting();
674 if (s->References() <= 0) delete s;
676}
677
678CallFunc_t* TQConnection::GetSlotCallFunc() const {
679 return fSlot->GetFunc();
680}
Cppyy::TCppType_t fClass
#define SafeDelete(p)
Definition RConfig.hxx:547
int Int_t
Definition RtypesCore.h:45
const Bool_t kFALSE
Definition RtypesCore.h:92
long Long_t
Definition RtypesCore.h:54
bool Bool_t
Definition RtypesCore.h:63
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:73
const Bool_t kTRUE
Definition RtypesCore.h:91
const char Option_t
Definition RtypesCore.h:66
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:187
char name[80]
Definition TGX11.cxx:110
R__EXTERN TVirtualMutex * gInterpreterMutex
R__EXTERN TInterpreter * gCling
#define gInterpreter
char * gTQSlotParams
static TQSlotPool gSlotPool
#define ClassImpQ(name)
Definition TQObject.h:282
#define gROOT
Definition TROOT.h:406
#define R__LOCKGUARD(mutex)
const char * proto
Definition civetweb.c:16604
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:80
TMethod * GetMethod(const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Find the best method (if there is one) matching the parameters.
Definition TClass.cxx:4388
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
Definition TClass.cxx:4433
ClassInfo_t * GetClassInfo() const
Definition TClass.h:430
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition TClass.cxx:2957
virtual Bool_t IsEmpty() const
Global functions class (global functions are obtained from CINT).
Definition TFunction.h:30
Int_t GetNargs() const
Number of function arguments.
THashTable implements a hash table to store TObject's.
Definition THashTable.h:35
TObject * Remove(TObject *obj)
Remove object from the hashtable.
void Add(TObject *obj)
Add object to the hash table.
TObject * FindObject(const char *name) const
Find object using its name.
void Clear(Option_t *option="")
Remove all objects from the table.
virtual void CallFunc_SetFunc(CallFunc_t *, ClassInfo_t *, const char *, const char *, bool, Long_t *) const
virtual void CallFunc_IgnoreExtraArgs(CallFunc_t *, bool) const
virtual void CallFunc_SetFuncProto(CallFunc_t *, ClassInfo_t *, const char *, const char *, Long_t *, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
virtual void ClassInfo_Delete(ClassInfo_t *) const
virtual void CallFunc_Exec(CallFunc_t *, void *) const
virtual CallFunc_t * CallFunc_Factory() const
virtual ClassInfo_t * ClassInfo_Factory(Bool_t=kTRUE) const =0
virtual void CallFunc_SetArgArray(CallFunc_t *, Long_t *, Int_t) const
virtual void ClassInfo_Init(ClassInfo_t *, const char *) const
virtual void CallFunc_Delete(CallFunc_t *) const
A doubly linked list.
Definition TList.h:44
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition TList.cxx:822
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition TList.cxx:402
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:37
void MakeZombie()
Definition TObject.h:49
TQConnection class is an internal class, used in the object communication mechanism.
void * GetSlotAddress() const
Return the object address to be passed to the function.
virtual CallFunc_t * GetSlotCallFunc() const override
void ExecuteMethod()
Apply slot-method to the fReceiver object without arguments.
void UnLockSlot(TQSlot *) const
Unlock the interpreter and mark the slot as no longer executing.
void * fReceiver
virtual void PrintCollectionHeader(Option_t *option) const override
Print TQConnection full method name and print all signals connected to this connection.
CallFunc_t * LockSlot() const
Lock the interpreter and mark the slot as executing.
void Destroyed() override
Signal Destroyed tells that connection is destroyed.
virtual void SetArg(Long_t param) override
TString fClassName
Bool_t CheckSlot(Int_t nargs) const
Return true if the underlying method is value and the number of argument is compatible.
TQSlot * fSlot
const char * GetName() const override
Returns name of connection (aka name of slot)
virtual ~TQConnection()
TQConnection dtor.
void ls(Option_t *option="") const override
List TQConnection full method name and list all signals connected to this connection.
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition TQObject.h:48
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition TROOT.cxx:2811
Definitions for TRefCnt, base class for reference counted objects.
Definition TRefCnt.h:27
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
virtual Int_t UnLock()=0
virtual Int_t Lock()=0