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