00001 // @(#)root/base:$Id: TQConnection.h 25128 2008-08-12 17:59:19Z pcanal $ 00002 // Author: Valeriy Onuchin & Fons Rademakers 15/10/2000 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TQConnection 00013 #define ROOT_TQConnection 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TQConnection class is an internal class, used in the object // 00018 // communication mechanism. // 00019 // // 00020 // TQConnection: // 00021 // - is a list of signal_lists containing pointers // 00022 // to this connection // 00023 // - receiver is the object to which slot-method is applied // 00024 // // 00025 // This implementation is provided by // 00026 // Valeriy Onuchin (onuchin@sirius.ihep.su). // 00027 // // 00028 ////////////////////////////////////////////////////////////////////////// 00029 00030 #ifndef ROOT_TList 00031 #include "TList.h" 00032 #endif 00033 #ifndef ROOT_TQObject 00034 #include "TQObject.h" 00035 #endif 00036 #ifndef ROOT_Varargs 00037 #include "Varargs.h" 00038 #endif 00039 00040 class TQSlot; 00041 00042 00043 class TQConnection : public TList, public TQObject { 00044 00045 protected: 00046 TQSlot *fSlot; // slot-method calling interface 00047 void *fReceiver; // ptr to object to which slot is applied 00048 TString fClassName; // class name of the receiver 00049 00050 virtual void PrintCollectionHeader(Option_t* option) const; 00051 00052 public: 00053 TQConnection(); 00054 TQConnection(TClass* cl, void *receiver, const char *method_name); 00055 TQConnection(const char *class_name, void *receiver, 00056 const char *method_name); 00057 TQConnection(const TQConnection &con); 00058 virtual ~TQConnection(); 00059 00060 const char *GetName() const; 00061 void *GetReceiver() const { return fReceiver; } 00062 const char *GetClassName() const { return fClassName; } 00063 void Destroyed(); // *SIGNAL* 00064 void ExecuteMethod(); 00065 void ExecuteMethod(Int_t nargs, va_list va); 00066 void ExecuteMethod(Long_t param); 00067 void ExecuteMethod(Long64_t param); 00068 void ExecuteMethod(Double_t param); 00069 void ExecuteMethod(Long_t *params, Int_t nparam = -1); 00070 void ExecuteMethod(const char *params); 00071 void ls(Option_t *option="") const; 00072 00073 ClassDef(TQConnection,0) // Internal class used in the object communication mechanism 00074 }; 00075 00076 R__EXTERN char *gTQSlotParams; // used to pass string parameters 00077 00078 #endif