53 TQSlot(
TClass *cl,
const char *method,
const char *funcname);
54 TQSlot(
const char *class_name,
const char *funcname);
107 auto len = strlen(method_name) + 1;
108 char *method =
new char[len];
110 strlcpy(method, method_name, len);
114 char *params =
nullptr;
118 if ((
proto = strchr(method,
'('))) {
124 if ((tmp = strrchr(
proto,
')'))) * tmp =
'\0';
125 if ((params = strchr(
proto,
'='))) * params =
' ';
180 auto len = strlen(funcname) + 1;
181 char *method =
new char[len];
183 strlcpy(method, funcname, len);
187 char *params =
nullptr;
191 if ((
proto = strchr(method,
'('))) {
193 if ((tmp = strrchr(
proto,
')'))) * tmp =
'\0';
194 if ((params = strchr(
proto,
'='))) * params =
' ';
255 Error(
"ExecuteMethod",
"method %s not found,"
256 "\n(note: interpreted methods are not supported with varargs)",
261 if (nargs < fMethod->GetNargs() -
fMethod->GetNargsOpt() ||
263 Error(
"ExecuteMethod",
"nargs (%d) not consistent with expected number of arguments ([%d-%d])",
338 void *address =
nullptr;
340 if (paramArr)
gCling->CallFunc_SetArgArray(
fFunc, paramArr, nparam);
355 <<
"Number of Connections = " <<
References() << std::endl;
368 fTable->Clear(
"nodelete");
371 TQSlot *
New(
const char *class_name,
const char *funcname);
388 slot =
new TQSlot(class_name, funcname);
414 slot =
new TQSlot(cl, method, func);
438 nparam =
fSlot->GetMethodNargs();
455 const char *funcname =
nullptr;
459 Error(
"SetFCN",
"Not used anymore.");
491 fSlot->AddReference();
506 while ((list = (
TList *)next())) {
508 if (list->IsEmpty())
delete list;
521 return fSlot->GetName();
641 return fSlot->CheckSlot(nargs);
657 return fSlot->StartExecuting();
670 return fSlot->GetFunc();
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
externTInterpreter * gCling
externTVirtualMutex * gInterpreterMutex
static TQSlotPool gSlotPool
externchar * 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.
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.
~TQSlot() override
TQSlot dtor.
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.
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
bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.