Logo ROOT  
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 "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 
38 char *gTQSlotParams; // used to pass string parameter
39 
40 /** \class TQSlot
41 Slightly modified TMethodCall class used in the object communication mechanism.
42 */
43 
44 class TQSlot : public TObject, public TRefCnt {
45 
46 protected:
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
53 public:
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 
100 TQSlot::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 
175 TQSlot::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 
234 TQSlot::~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 
247 inline 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 
257 inline 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 
280 CallFunc_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 
288 void 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 
298 inline 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 
308 inline 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 
319 inline 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 
329 inline 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 
345 inline 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 
361 void 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 
369 class TQSlotPool {
370 private:
371  THashTable *fTable;
372 public:
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 
388 TQSlot *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 
407 TQSlot *TQSlotPool::New(TClass *cl, const char *method, const char *func)
408 {
409  TString name;
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 
433 void 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 
443 static TQSlotPool gSlotPool; // global pool of slots
444 
445 void 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 
461 TQConnection::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 
485 TQConnection::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 {
498  fClassName = con.fClassName;
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 
528 const 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 
546 void 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 
635 void 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 
664 CallFunc_t *TQConnection::LockSlot() const {
666  return fSlot->StartExecuting();
667 }
668 
669 ////////////////////////////////////////////////////////////////////////////////
670 /// Unlock the interpreter and mark the slot as no longer executing.
671 
672 void TQConnection::UnLockSlot(TQSlot *s) const {
673  s->EndExecuting();
674  if (s->References() <= 0) delete s;
676 }
677 
678 CallFunc_t* TQConnection::GetSlotCallFunc() const {
679  return fSlot->GetFunc();
680 }
ROOT::Math::IntegOptionsUtil::Print
void Print(std::ostream &os, const OptionType &opt)
Definition: IntegratorOptions.cxx:91
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
Option_t
const char Option_t
Definition: RtypesCore.h:66
TInterpreter::CallFunc_IgnoreExtraArgs
virtual void CallFunc_IgnoreExtraArgs(CallFunc_t *, bool) const
Definition: TInterpreter.h:325
THashTable::Add
void Add(TObject *obj)
Add object to the hash table.
Definition: THashTable.cxx:92
TQConnection::GetSlotCallFunc
virtual CallFunc_t * GetSlotCallFunc() const override
Definition: TQConnection.cxx:678
TString::Data
const char * Data() const
Definition: TString.h:369
TQConnection::TQConnection
TQConnection()
Definition: TQConnection.h:82
TMethod.h
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
THashTable::Clear
void Clear(Option_t *option="")
Remove all objects from the table.
Definition: THashTable.cxx:167
TRefCnt.h
gInterpreter
#define gInterpreter
Definition: TInterpreter.h:560
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
Int_t
int Int_t
Definition: RtypesCore.h:45
TInterpreter::CallFunc_Factory
virtual CallFunc_t * CallFunc_Factory() const
Definition: TInterpreter.h:322
TInterpreter::CallFunc_SetArgArray
virtual void CallFunc_SetArgArray(CallFunc_t *, Long_t *, Int_t) const
Definition: TInterpreter.h:330
TInterpreter::CallFunc_SetFunc
virtual void CallFunc_SetFunc(CallFunc_t *, ClassInfo_t *, const char *, const char *, bool, Long_t *) const
Definition: TInterpreter.h:388
SafeDelete
#define SafeDelete(p)
Definition: RConfig.hxx:543
TQConnection.h
TClass.h
TQConnection
TQConnection class is an internal class, used in the object communication mechanism.
Definition: TQConnection.h:37
TString
Basic string class.
Definition: TString.h:136
TInterpreter::ClassInfo_Delete
virtual void ClassInfo_Delete(ClassInfo_t *) const
Definition: TInterpreter.h:401
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TInterpreter::CallFunc_Exec
virtual void CallFunc_Exec(CallFunc_t *, void *) const
Definition: TInterpreter.h:315
TQConnection::fClassName
TString fClassName
Definition: TQConnection.h:41
TQConnection::~TQConnection
virtual ~TQConnection()
TQConnection dtor.
Definition: TQConnection.cxx:510
bool
TQConnection::PrintCollectionHeader
virtual void PrintCollectionHeader(Option_t *option) const override
Print TQConnection full method name and print all signals connected to this connection.
Definition: TQConnection.cxx:556
gTQSlotParams
char * gTQSlotParams
Definition: TQConnection.cxx:38
TROOT.h
TQConnection::CheckSlot
Bool_t CheckSlot(Int_t nargs) const
Return true if the underlying method is value and the number of argument is compatible.
Definition: TQConnection.cxx:649
TClass::GetMethodWithPrototype
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:4432
TQObject
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition: TQObject.h:48
TDataType.h
TQConnection::GetName
const char * GetName() const override
Returns name of connection (aka name of slot)
Definition: TQConnection.cxx:528
TQConnection::LockSlot
CallFunc_t * LockSlot() const
Lock the interpreter and mark the slot as executing.
Definition: TQConnection.cxx:664
THashTable
THashTable implements a hash table to store TObject's.
Definition: THashTable.h:35
gInterpreterMutex
R__EXTERN TVirtualMutex * gInterpreterMutex
Definition: TInterpreter.h:44
TInterpreter::CallFunc_SetFuncProto
virtual void CallFunc_SetFuncProto(CallFunc_t *, ClassInfo_t *, const char *, const char *, Long_t *, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TInterpreter.h:391
TQConnection::GetSlotAddress
void * GetSlotAddress() const
Return the object address to be passed to the function.
Definition: TQConnection.cxx:656
THashTable::FindObject
TObject * FindObject(const char *name) const
Find object using its name.
Definition: THashTable.cxx:238
TClass::GetMethod
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:4387
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TInterpreter::ClassInfo_Init
virtual void ClassInfo_Init(ClassInfo_t *, const char *) const
Definition: TInterpreter.h:414
Long_t
long Long_t
Definition: RtypesCore.h:54
ClassImpQ
#define ClassImpQ(name)
Definition: TQObject.h:282
Rgl::Mc::GetOffset
V GetOffset(E val1, E val2, V iso)
Definition: TGLMarchingCubes.h:316
TInterpreter::CallFunc_Delete
virtual void CallFunc_Delete(CallFunc_t *) const
Definition: TInterpreter.h:314
TQConnection::ls
void ls(Option_t *option="") const override
List TQConnection full method name and list all signals connected to this connection.
Definition: TQConnection.cxx:546
R__LOCKGUARD
#define R__LOCKGUARD(mutex)
Definition: TVirtualMutex.h:104
TVirtualMutex::Lock
virtual Int_t Lock()=0
TClass::GetClass
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:2938
TQConnection::Destroyed
void Destroyed() override
Signal Destroyed tells that connection is destroyed.
Definition: TQConnection.cxx:536
TClass::GetClassInfo
ClassInfo_t * GetClassInfo() const
Definition: TClass.h:403
TObject::MakeZombie
void MakeZombie()
Definition: TObject.h:49
TFunction::GetNargs
Int_t GetNargs() const
Number of function arguments.
Definition: TFunction.cxx:165
TCollection::IsEmpty
virtual Bool_t IsEmpty() const
Definition: TCollection.h:186
gSlotPool
static TQSlotPool gSlotPool
Definition: TQConnection.cxx:443
TVirtualMutex.h
fClass
Cppyy::TCppType_t fClass
Definition: DeclareConverters.h:259
TROOT::IndentLevel
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition: TROOT.cxx:2806
TQConnection::fSlot
TQSlot * fSlot
Definition: TQConnection.h:39
proto
const char * proto
Definition: civetweb.c:16604
THashTable::Remove
TObject * Remove(TObject *obj)
Remove object from the hashtable.
Definition: THashTable.cxx:417
Double_t
double Double_t
Definition: RtypesCore.h:59
TList::Remove
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:822
TVirtualMutex::UnLock
virtual Int_t UnLock()=0
TQConnection::fReceiver
void * fReceiver
Definition: TQConnection.h:40
TInterpreter.h
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
TQConnection::ExecuteMethod
void ExecuteMethod()
Apply slot-method to the fReceiver object without arguments.
Definition: TQConnection.cxx:565
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
gCling
R__EXTERN TInterpreter * gCling
Definition: TInterpreter.h:561
TQConnection::SetArg
virtual void SetArg(Long_t param) override
Definition: TQConnection.h:53
TList::Clear
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:402
name
char name[80]
Definition: TGX11.cxx:110
TRefCnt
Definitions for TRefCnt, base class for reference counted objects.
Definition: TRefCnt.h:27
TIter
Definition: TCollection.h:233
TInterpreter::ClassInfo_Factory
virtual ClassInfo_t * ClassInfo_Factory(Bool_t=kTRUE) const =0
TMethodArg.h
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TQConnection::UnLockSlot
void UnLockSlot(TQSlot *) const
Unlock the interpreter and mark the slot as no longer executing.
Definition: TQConnection.cxx:672
TFunction
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:30
TList
A doubly linked list.
Definition: TList.h:44
TQObject::Emit
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
gROOT
#define gROOT
Definition: TROOT.h:406
int
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition: TError.cxx:187
THashTable.h