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