00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 #ifndef TGO4COMMANDINVOKER_H 00017 #define TGO4COMMANDINVOKER_H 00018 00024 #include "TObject.h" 00025 #include "TGo4CommandReceiver.h" 00026 00027 class TMutex; 00028 class TObjArray; 00029 class TGo4Command; 00030 class TGo4RemoteCommand; 00031 class TGo4CommandProtoList; 00032 00039 class TGo4CommandInvoker : public TObject, public TGo4CommandReceiver { 00040 00041 public: 00042 00043 static TGo4CommandInvoker * Instance(); 00044 00045 static void Register(const char* name, TGo4CommandReceiver *p); 00046 00047 static void UnRegister(TGo4CommandReceiver* p); 00048 00049 virtual void Invoke(TGo4Command * com); 00050 00051 virtual void Invoke(); 00052 00053 virtual ~TGo4CommandInvoker(); 00054 00057 static void SetCommandList(TGo4CommandProtoList* list); 00058 00061 Int_t ExecuteFromRemote(TGo4RemoteCommand* remcom); 00062 00063 protected: 00064 00065 TGo4CommandInvoker(); 00066 00067 static TGo4CommandReceiver * Lookup(const char* name); 00068 00069 private: 00070 00072 TGo4Command * fxCommand; 00073 00076 static TGo4CommandProtoList* fxCommandList; 00077 00078 static TGo4CommandInvoker *fxInstance; 00079 static TObjArray * fxArray; 00080 static TMutex * fxMutex; 00081 ClassDef(TGo4CommandInvoker, 2) 00082 }; 00083 00084 #endif //TGO4COMMANDINVOKER_H 00085 00086 //----------------------------END OF GO4 SOURCE FILE ---------------------