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

/Go4ThreadManager/TGo4StartException.cxx

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 #include "Go4ThreadManager/TGo4ThreadHandler.h"
00017 #include "Go4ThreadManager/TGo4Runnable.h"
00018 #include "TGo4StartException.h"
00019 #include "Go4Log/TGo4Log.h"
00020 
00021 TGo4StartException::TGo4StartException(const TGo4StartException &right)
00022   :TGo4ThreadException(right)
00023 {
00024    TRACE((14,"TGo4StartException::TGo4StartException() copy constructor",__LINE__, __FILE__));
00025 }
00026 
00027 TGo4StartException::TGo4StartException (TGo4Runnable* runnable, const Text_t* threadname)
00028 : TGo4ThreadException(runnable,threadname)
00029 {
00030    TRACE((14,"TGo4StartException::TGo4StartException(TGo4Runnable*, const Text_t*) constructor",__LINE__, __FILE__));
00031    fxDescription= "!!!-- Go4 Start Exception --!!!";
00032 }
00033 
00034 
00035 TGo4StartException::~TGo4StartException()
00036 {
00037   TRACE((14,"TGo4StartException::~TGo4StartException() destructor",__LINE__, __FILE__));
00038 }
00039 
00040 
00041 TGo4StartException & TGo4StartException::operator=(const TGo4StartException &right)
00042 {
00043    TRACE((14,"TGo4StartException::operator=",__LINE__, __FILE__));
00044    if (&right!=this)
00045       {
00046          TRACE((13,"TGo4StartException::operator= processing copy",__LINE__, __FILE__));
00047          TGo4ThreadException::operator=(right); // copy base class members
00048          // put additional member copies here...
00049          return *this;
00050       }
00051    else
00052       {
00053          // copy is already source object
00054          TRACE((13,"TGo4StartException::operator= source and destination objects are identical",__LINE__, __FILE__));
00055          return *this;
00056       }
00057 }
00058 
00059 Int_t TGo4StartException::Handle ()
00060 {
00061    TRACE((14,"TGo4StartException::Handle()",__LINE__, __FILE__));
00062    Int_t rev=-1;
00063    if(GetThreadName()==0)
00064       // no threadname specified, operate on thread of runnable
00065       {
00066          TRACE((13,"TGo4StartException::Handle() -- starting thread of runnable",__LINE__, __FILE__));
00067          rev=fxRunnable->GetThread()->Start();
00068       }
00069    else
00070       // threadname given, use thread handler to cancel
00071       {
00072          TRACE((13,"TGo4StartException::Handle() -- starting thread by name",__LINE__, __FILE__));
00073          rev=fxThreadHandler->Start(GetThreadName());
00074       }
00075    // note: return values of Start() are boolean, are casted implicitly
00076    return rev;
00077 }
00078 
00079 
00080 
00081 
00082 
00083 //----------------------------END OF GO4 SOURCE FILE ---------------------

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