Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBretcode.icc

Go to the documentation of this file.
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 //------------------------------------------+-----------------------------------
00016 
00017 inline CTBretcode::CTBretcode()
00018   : mi_code(0),
00019     mi_errno(0),
00020     mc_text1(0),
00021     mc_text2(0),
00022     mc_text3(0)
00023 {}
00024 
00025 //------------------------------------------+-----------------------------------
00027 
00028 inline CTBretcode::CTBretcode(int i_code)
00029   : mi_code(i_code),
00030     mi_errno(0),
00031     mc_text1(0),
00032     mc_text2(0),
00033     mc_text3(0)
00034 {}
00035 
00036 //------------------------------------------+-----------------------------------
00038 
00039 inline CTBretcode::CTBretcode(int i_code, const char* c_text1)
00040   : mi_code(i_code),
00041     mi_errno(0),
00042     mc_text1(c_text1),
00043     mc_text2(0),
00044     mc_text3(0)
00045 {}
00046 
00047 //------------------------------------------+-----------------------------------
00049 
00050 inline CTBretcode::CTBretcode(int i_code, const char* c_text1, 
00051                               const char* c_text2)
00052   : mi_code(i_code),
00053     mi_errno(0),
00054     mc_text1(c_text1),
00055     mc_text2(c_text2),
00056     mc_text3(0)
00057 {}
00058 
00059 //------------------------------------------+-----------------------------------
00061 
00062 inline CTBretcode::CTBretcode(int i_code, const char* c_text1, 
00063                               const char* c_text2, const char* c_text3)
00064   : mi_code(i_code),
00065     mi_errno(0),
00066     mc_text1(c_text1),
00067     mc_text2(c_text2),
00068     mc_text3(c_text3)
00069 {}
00070 
00071 //------------------------------------------+-----------------------------------
00073 
00084 inline CTBretcode::CTBretcode(int i_code, int i_errno)
00085   : mi_code(i_code),
00086     mi_errno(i_errno),
00087     mc_text1(0),
00088     mc_text2(0),
00089     mc_text3(0)
00090 {}
00091 
00092 //------------------------------------------+-----------------------------------
00094 
00108 inline CTBretcode::CTBretcode(int i_code, const char* c_text1, int i_errno)
00109   : mi_code(i_code),
00110     mi_errno(i_errno),
00111     mc_text1(c_text1),
00112     mc_text2(0),
00113     mc_text3(0)
00114 {}
00115 
00116 //------------------------------------------+-----------------------------------
00118 
00130 inline CTBretcode::CTBretcode(int i_code, const CTBretcode& rc)
00131   : mi_code(i_code),
00132     mi_errno(rc.mi_errno),
00133     mc_text1(rc.mc_text1),
00134     mc_text2(rc.mc_text2),
00135     mc_text3(rc.mc_text3)
00136 {}
00137 
00138 //------------------------------------------+-----------------------------------
00140 
00153 inline CTBretcode::CTBretcode(int i_code, const char* c_text1,
00154                               const CTBretcode& rc)
00155   : mi_code(i_code),
00156     mi_errno(rc.mi_errno),
00157     mc_text1(c_text1),
00158     mc_text2(rc.mc_text1),
00159     mc_text3(rc.mc_text2)
00160 {}
00161 
00162 //------------------------------------------+-----------------------------------
00164 
00165 inline CTBretcode::CTBretcode(const CTBretcode& rhs)
00166   : mi_code(rhs.mi_code),
00167     mi_errno(rhs.mi_errno),
00168     mc_text1(rhs.mc_text1),
00169     mc_text2(rhs.mc_text2),
00170     mc_text3(rhs.mc_text3)
00171 {}
00172 
00173 //------------------------------------------+-----------------------------------
00175 
00176 inline void CTBretcode::Set(int i_code)
00177 {
00178   mi_code  = i_code;
00179   mi_errno = 0;
00180   mc_text1 = 0;
00181   mc_text2 = 0;
00182   mc_text3 = 0;
00183   return;
00184 }
00185 
00186 //------------------------------------------+-----------------------------------
00188 
00189 inline void CTBretcode::Set(int i_code, const char* c_text1)
00190 {
00191   mi_code  = i_code;
00192   mi_errno = 0;
00193   mc_text1 = c_text1;
00194   mc_text2 = 0;
00195   mc_text3 = 0;
00196   return;
00197 }
00198 
00199 //------------------------------------------+-----------------------------------
00201 
00202 inline void CTBretcode::Set(int i_code, const char* c_text1,
00203                             const char* c_text2)
00204 {
00205   mi_code  = i_code;
00206   mi_errno = 0;
00207   mc_text1 = c_text1;
00208   mc_text2 = c_text2;
00209   mc_text3 = 0;
00210   return;
00211 }
00212 
00213 //------------------------------------------+-----------------------------------
00215 
00216 inline void CTBretcode::Set(int i_code, const char* c_text1, 
00217                             const char* c_text2, const char* c_text3)
00218 {
00219   mi_code  = i_code;
00220   mi_errno = 0;
00221   mc_text1 = c_text1;
00222   mc_text2 = c_text2;
00223   mc_text3 = c_text3;
00224   return;
00225 }
00226 
00227 //------------------------------------------+-----------------------------------
00229 
00233 inline void CTBretcode::Set(int i_code, int i_errno)
00234 {
00235   mi_code  = i_code;
00236   mi_errno = i_errno;
00237   mc_text1 = 0;
00238   mc_text2 = 0;
00239   mc_text3 = 0;  
00240   return;
00241 }
00242 
00243 //------------------------------------------+-----------------------------------
00245 
00250 inline void CTBretcode::Set(int i_code, const char* c_text1, int i_errno)
00251 {
00252   mi_code  = i_code;
00253   mi_errno = i_errno;
00254   mc_text1 = c_text1;
00255   mc_text2 = 0;
00256   mc_text3 = 0;  
00257   return;
00258 }
00259 
00260 //------------------------------------------+-----------------------------------
00262 
00263 inline void CTBretcode::Set(int i_code, const CTBretcode& rc)
00264 {
00265   mi_code  = i_code;
00266   mi_errno = rc.mi_errno;
00267   mc_text1 = rc.mc_text1;
00268   mc_text2 = rc.mc_text2;
00269   mc_text3 = rc.mc_text3;
00270   return;
00271 }
00272 
00273 //------------------------------------------+-----------------------------------
00275 
00276 inline void CTBretcode::Set(int i_code, const char* c_text1,
00277                             const CTBretcode& rc)
00278 {
00279   mi_code  = i_code;
00280   mi_errno = rc.mi_errno;
00281   mc_text1 = c_text1;
00282   mc_text2 = rc.mc_text1;
00283   mc_text3 = rc.mc_text2;
00284   return;
00285 }
00286 
00287 //------------------------------------------+-----------------------------------
00289 
00290 inline int CTBretcode::Code() const
00291 {
00292   return mi_code;
00293 }
00294 
00295 //------------------------------------------+-----------------------------------
00297 
00298 inline int CTBretcode::Errno() const
00299 {
00300   return mi_errno;
00301 }
00302 
00303 //------------------------------------------+-----------------------------------
00305 
00306 inline const char* CTBretcode::Text1() const
00307 {
00308   return mc_text1;
00309 }
00310 
00311 //------------------------------------------+-----------------------------------
00313 
00314 inline const char* CTBretcode::Text2() const
00315 {
00316   return mc_text2;
00317 }
00318 
00319 //------------------------------------------+-----------------------------------
00321 
00322 inline const char* CTBretcode::Text3() const
00323 {
00324   return mc_text3;
00325 }
00326 
00327 //------------------------------------------+-----------------------------------
00329 
00342 inline bool CTBretcode::operator !() const
00343 {
00344   return !mi_code;
00345 }
00346 
00347 //------------------------------------------+-----------------------------------
00349 
00350 inline CTBretcode::operator int() const
00351 {
00352   return mi_code;
00353 }
00354 
00355 //------------------------------------------+-----------------------------------
00357 
00358 inline CTBretcode& CTBretcode::operator=(const CTBretcode& rhs)
00359 {
00360   mi_code  = rhs.mi_code;
00361   mi_errno = rhs.mi_errno;
00362   mc_text1 = rhs.mc_text1;
00363   mc_text2 = rhs.mc_text2;
00364   mc_text3 = rhs.mc_text3;
00365   return *this;
00366 }
00367 
00368 //------------------------------------------+-----------------------------------
00370 
00371 inline CTBretcode& CTBretcode::operator=(int i_code)
00372 {
00373   mi_code  = i_code;
00374   mi_errno = 0;
00375   mc_text1 = 0;
00376   mc_text2 = 0;
00377   mc_text3 = 0;  
00378   return *this;
00379 }
00380 
00381 //------------------------------------------+-----------------------------------
00387 inline ostream& operator<<(ostream& os, const CTBretcode& obj)
00388 {
00389   obj.ToStream(os);
00390   return os;
00391 }
00392 
00393 
00394 

Generated at Fri Oct 24 18:11:29 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001