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