Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4StartException.h"
00015
00016 #include "TGo4Log.h"
00017 #include "TGo4Thread.h"
00018 #include "TGo4ThreadHandler.h"
00019 #include "TGo4Runnable.h"
00020
00021 TGo4StartException::TGo4StartException(const TGo4StartException &right)
00022 :TGo4ThreadException(right)
00023 {
00024 GO4TRACE((14,"TGo4StartException::TGo4StartException() copy constructor",__LINE__, __FILE__));
00025 }
00026
00027 TGo4StartException::TGo4StartException (TGo4Runnable* runnable, const char* threadname)
00028 : TGo4ThreadException(runnable,threadname)
00029 {
00030 GO4TRACE((14,"TGo4StartException::TGo4StartException(TGo4Runnable*, const char*) constructor",__LINE__, __FILE__));
00031 fxDescription= "!!!-- Go4 Start Exception --!!!";
00032 }
00033
00034
00035 TGo4StartException::~TGo4StartException()
00036 {
00037 GO4TRACE((14,"TGo4StartException::~TGo4StartException() destructor",__LINE__, __FILE__));
00038 }
00039
00040
00041 TGo4StartException & TGo4StartException::operator=(const TGo4StartException &right)
00042 {
00043 GO4TRACE((14,"TGo4StartException::operator=",__LINE__, __FILE__));
00044 if (&right!=this)
00045 {
00046 GO4TRACE((13,"TGo4StartException::operator= processing copy",__LINE__, __FILE__));
00047 TGo4ThreadException::operator=(right);
00048
00049 return *this;
00050 }
00051 else
00052 {
00053
00054 GO4TRACE((13,"TGo4StartException::operator= source and destination objects are identical",__LINE__, __FILE__));
00055 return *this;
00056 }
00057 }
00058
00059 Int_t TGo4StartException::Handle ()
00060 {
00061 GO4TRACE((14,"TGo4StartException::Handle()",__LINE__, __FILE__));
00062 Int_t rev=-1;
00063 if(GetThreadName()==0)
00064
00065 {
00066 GO4TRACE((13,"TGo4StartException::Handle() -- starting thread of runnable",__LINE__, __FILE__));
00067 rev=fxRunnable->GetThread()->Start();
00068 }
00069 else
00070
00071 {
00072 GO4TRACE((13,"TGo4StartException::Handle() -- starting thread by name",__LINE__, __FILE__));
00073 rev=fxThreadHandler->Start(GetThreadName());
00074 }
00075
00076 return rev;
00077 }
00078
00079
00080
00081