Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4TaskHandler/TGo4TaskOwner.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 /* Generated by Together */
00017 
00018 #ifndef TGO4TASKOWNER_H
00019 #define TGO4TASKOWNER_H
00020 #include "TGo4Task.h"
00021 #include <Rtypes.h>
00022 #include "Go4CommandsBase/TGo4CommandReceiver.h"
00023 
00029 class TGo4TaskOwner : public TGo4CommandReceiver {
00030 public:
00031 
00032     friend class TGo4Task;
00033     friend class TGo4ServerTask;
00034     
00035     TGo4TaskOwner() ;
00036 
00037     TGo4TaskOwner(Bool_t isserver) ;
00038 
00039     Bool_t IsServer()
00040         {
00041          return fbServerMode;    
00042         }
00043 
00044     virtual ~TGo4TaskOwner() ;
00045 
00046     TGo4Task* GetTask(){return fxTask;}
00047     
00053     virtual Int_t StartWorkThreads();
00054 
00060     virtual Int_t StopWorkThreads();
00061 
00068     virtual void Quit();
00069 
00070 
00071 const char* GetName() const 
00072     {
00073         if(fxTask) return fxTask->GetName();    
00074         else return 0;
00075     }
00076 
00077     Bool_t IsConnected();//{return fbConnected;}
00078 
00079 protected:
00080     
00081     void SetTask(TGo4Task* task, Bool_t delold=kTRUE)
00082         {
00083              if(delold) delete fxTask;
00084              fxTask=task;
00085              if(fxTask) fxTask->SetOwner(this);
00086         }
00087 
00088 
00089 private:
00090 
00094     TGo4Task* fxTask;
00095 
00099     Bool_t fbServerMode;
00100     
00101 };
00102 #endif //TGO4TASKOWNER_H
00103 
00104 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:06 2005 for Go4-v2.10-5 by doxygen1.2.15