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

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

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