55 TQSlot(
TClass *cl,
const char *method,
const char *funcname);
56 TQSlot(
const char *class_name,
const char *funcname);
61 CallFunc_t *StartExecuting();
109 auto len = strlen(method_name) + 1;
110 char *method =
new char[
len];
112 strlcpy(method, method_name,
len);
116 char *params =
nullptr;
120 if ((
proto = strchr(method,
'('))) {
126 if ((tmp = strrchr(
proto,
')'))) * tmp =
'\0';
127 if ((params = strchr(
proto,
'='))) * params =
' ';
182 auto len = strlen(funcname) + 1;
183 char *method =
new char[
len];
185 strlcpy(method, funcname,
len);
189 char *params =
nullptr;
193 if ((
proto = strchr(method,
'('))) {
195 if ((tmp = strrchr(
proto,
')'))) * tmp =
'\0';
196 if ((params = strchr(
proto,
'='))) * params =
' ';
257 Error(
"ExecuteMethod",
"method %s not found,"
258 "\n(note: interpreted methods are not supported with varargs)",
263 if (nargs < fMethod->GetNargs() -
fMethod->GetNargsOpt() ||
265 Error(
"ExecuteMethod",
"nargs (%d) not consistent with expected number of arguments ([%d-%d])",
340 void *address =
nullptr;
342 if (paramArr)
gCling->CallFunc_SetArgArray(
fFunc, paramArr, nparam);
357 <<
"Number of Connections = " <<
References() << std::endl;
370 fTable->Clear(
"nodelete");
373 TQSlot *
New(
const char *class_name,
const char *funcname);
390 slot =
new TQSlot(class_name, funcname);
416 slot =
new TQSlot(cl, method, func);
440 nparam =
fSlot->GetMethodNargs();
457 const char *funcname =
nullptr;
461 Error(
"SetFCN",
"Not used anymore.");
493 fSlot->AddReference();
508 while ((list = (
TList *)next())) {
510 if (list->IsEmpty())
delete list;
523 return fSlot->GetName();
643 return fSlot->CheckSlot(nargs);
659 return fSlot->StartExecuting();
672 return fSlot->GetFunc();
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
R__EXTERN TVirtualMutex * gInterpreterMutex
R__EXTERN TInterpreter * gCling
void Print(GNN_Data &d, std::string txt="")
static TQSlotPool gSlotPool
R__EXTERN char * gTQSlotParams
#define R__LOCKGUARD(mutex)
TClass instances represent classes, structs and namespaces in the ROOT type system.
TMethod * GetMethod(const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Find the best method (if there is one) matching the parameters.
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
ClassInfo_t * GetClassInfo() const
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.
Global functions class (global functions are obtained from CINT).
THashTable implements a hash table to store TObject's.
void Clear(Option_t *option="") override
Remove all objects from the list.
TList(const TList &)=delete
const char * GetName() const override
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TClass * IsA() const
TObject()
TObject constructor.
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.
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.
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.
Bool_t CheckSlot(Int_t nargs) const
Return true if the underlying method is value and the number of argument is compatible.
const char * GetName() const override
Returns name of connection (aka name of slot)
virtual ~TQConnection()
TQConnection dtor.
void SetArg(Long_t param) override
TClass * IsA() const override
void ls(Option_t *option="") const override
List TQConnection full method name and list all signals connected to this connection.
TQObject(const TQObject &)=delete
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
TQSlot * New(const char *class_name, const char *funcname)
Create new slot or return already existing one.
void Free(TQSlot *slot)
Delete slot if there is no reference to it.
Slightly modified TMethodCall class used in the object communication mechanism.
TQSlot(TClass *cl, const char *method, const char *funcname)
Create the method invocation environment.
Longptr_t GetOffset() const
void EndExecuting()
Mark the slot as no longer executing and cleanup if need be.
Bool_t IsExecuting() const
const char * GetName() const override
Returns name of object.
CallFunc_t * StartExecuting()
Mark the slot as executing.
void ls(Option_t *opt="") const override
The ls function lists the contents of a class on stdout.
virtual ~TQSlot()
TQSlot dtor.
void Print(Option_t *opt="") const override
Print info about slot.
CallFunc_t * GetFunc() const
void ExecuteMethod(void *object, Int_t nargs, va_list ap)=delete
Bool_t CheckSlot(Int_t nargs) const
Return true if the method is valid and the number of arguments is acceptable.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
UInt_t References() const
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.