00001 00006 /*----------------------------------------------------------------------------*/ 00007 /* C Tool Box: Designed and implemented by: */ 00008 /* Walter F.J. Mueller Gesellschaft fuer Schwerionenforschung (GSI) */ 00009 /* Planckstrasse 1, D-64291 Darmstadt, Germany */ 00010 /* Email: W.F.J.Mueller@gsi.de */ 00011 /* WWW: http://www-kp3.gsi.de/www/kp3/people/mueller.html */ 00012 /*------------------------------------------+---------------------------------*/ 00013 00014 #include "CTB.hxx" 00015 #include "CTBmessage.hxx" 00016 #include "CTBmessageWriterStream.hxx" 00017 00046 //------------------------------------------+----------------------------------- 00048 00059 void CTBmessage::Status(const char* c_text) 00060 { 00061 if (!mp_mw) Hook(); 00062 mp_mw->Status(c_text); 00063 return; 00064 } 00065 00066 //------------------------------------------+----------------------------------- 00068 00074 void CTBmessage::Info(const char* c_text) 00075 { 00076 if (!mp_mw) Hook(); 00077 mp_mw->Info(c_text); 00078 return; 00079 } 00080 00081 //------------------------------------------+----------------------------------- 00083 00088 void CTBmessage::Warning(const char* c_text) 00089 { 00090 if (!mp_mw) Hook(); 00091 mp_mw->Warning(c_text); 00092 return; 00093 } 00094 00095 //------------------------------------------+----------------------------------- 00097 00102 CTBint CTBmessage::Error(const char* c_text) 00103 { 00104 if (!mp_mw) Hook(); 00105 return mp_mw->Error(c_text); 00106 } 00107 00108 //------------------------------------------+----------------------------------- 00110 00124 void CTBmessage::Hook(CTBmessageWriter* p_mw) 00125 { 00126 delete mp_mw; 00127 mp_mw = p_mw; 00128 if (!mp_mw) mp_mw = new CTBmessageWriterStream; 00129 return; 00130 } 00131 00132 //------------------------------------------+----------------------------------- 00133 CTBmessageWriter* CTBmessage::mp_mw; 00134 //------------------------------------------+----------------------------------- 00135 00146 //------------------------------------------+----------------------------------- 00148 00149 CTBmessageWriter::~CTBmessageWriter() 00150 {} 00151 00152 //------------------------------------------+-----------------------------------