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

CTBcounter.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 CTBcounter::CTBcounter()
00018   : md_count(0.)
00019 {}
00020 
00021 //------------------------------------------+-----------------------------------
00023 
00024 inline CTBcounter::CTBcounter(const CTBcounter& rhs)
00025   : md_count(rhs.md_count)
00026 {}
00027 
00028 //------------------------------------------+-----------------------------------
00030 
00031 inline CTBcounter& CTBcounter::operator=(const CTBcounter& rhs)
00032 {
00033   md_count = rhs.md_count;
00034   return *this;
00035 }
00036 
00037 //------------------------------------------+-----------------------------------
00039 
00040 inline CTBcounter& CTBcounter::operator=(double d_count)
00041 {
00042   md_count = d_count;
00043   return *this;
00044 }
00045 
00046 //------------------------------------------+-----------------------------------
00048 
00049 inline CTBcounter& CTBcounter::operator=(int i_count)
00050 {
00051   md_count = (double) i_count;
00052   return *this;
00053 }
00054 
00055 //------------------------------------------+-----------------------------------
00057 
00058 inline CTBcounter& CTBcounter::operator+=(double d_inc)
00059 {
00060   md_count += d_inc;
00061   return *this;
00062 }
00063 
00064 //------------------------------------------+-----------------------------------
00066 
00067 inline CTBcounter& CTBcounter::operator+=(int i_inc)
00068 {
00069   md_count += (double) i_inc;
00070   return *this;
00071 }
00072 
00073 //------------------------------------------+-----------------------------------
00075 
00076 inline CTBcounter& CTBcounter::operator-=(double d_inc)
00077 {
00078   md_count -= d_inc;
00079   return *this;
00080 }
00081 
00082 //------------------------------------------+-----------------------------------
00084 
00085 inline CTBcounter& CTBcounter::operator-=(int i_inc)
00086 {
00087   md_count -= (double) i_inc;
00088   return *this;
00089 }
00090 
00091 //------------------------------------------+-----------------------------------
00093 
00094 inline CTBcounter& CTBcounter::operator++()
00095 {
00096   md_count += 1.;
00097   return *this;
00098 }
00099 
00100 //------------------------------------------+-----------------------------------
00102 
00103 inline CTBcounter CTBcounter::operator++(int)
00104 {
00105   CTBcounter tmp = *this;
00106   md_count += 1.;
00107   return tmp;
00108 }
00109 
00110 //------------------------------------------+-----------------------------------
00112 
00113 inline CTBcounter& CTBcounter::operator--()
00114 {
00115   md_count -= 1.;
00116   return *this;
00117 }
00118 
00119 //------------------------------------------+-----------------------------------
00121 
00122 inline CTBcounter CTBcounter::operator--(int)
00123 {
00124   CTBcounter tmp = *this;
00125   md_count -= 1.;
00126   return tmp;
00127 }
00128 
00129 //------------------------------------------+-----------------------------------
00131 
00132 inline CTBcounter::operator int()
00133 {
00134   return (int) md_count;
00135 }
00136 
00137 //------------------------------------------+-----------------------------------
00139 
00140 inline CTBcounter::operator double()
00141 {
00142   return md_count;
00143 }
00144 
00145 //------------------------------------------+-----------------------------------
00151 inline istream& operator>>(istream& is, CTBcounter& obj)
00152 {
00153   is >> obj.md_count;
00154   return is;
00155 }

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