00001 #ifndef _CTBcounter_HXX 00002 #define _CTBcounter_HXX 1 00003 00008 /*----------------------------------------------------------------------------*/ 00009 /* C Tool Box: Designed and implemented by: */ 00010 /* Walter F.J. Mueller Gesellschaft fuer Schwerionenforschung (GSI) */ 00011 /* Planckstrasse 1, D-64291 Darmstadt, Germany */ 00012 /* Email: W.F.J.Mueller@gsi.de */ 00013 /* WWW: http://www-kp3.gsi.de/www/kp3/people/mueller.html */ 00014 /*------------------------------------------+---------------------------------*/ 00015 00016 class CTBcounter { 00017 public: 00018 CTBcounter(); 00019 CTBcounter(const CTBcounter& rhs); 00020 00021 CTBcounter& operator=(const CTBcounter& rhs); 00022 CTBcounter& operator=(double d_count); 00023 CTBcounter& operator=(int i_count); 00024 00025 CTBcounter& operator+=(double d_inc); 00026 CTBcounter& operator+=(int i_inc); 00027 00028 CTBcounter& operator-=(double d_dec); 00029 CTBcounter& operator-=(int i_dec); 00030 00031 CTBcounter& operator++(); 00032 CTBcounter operator++(int); 00033 00034 CTBcounter& operator--(); 00035 CTBcounter operator--(int); 00036 00037 operator int(); 00038 operator double(); 00039 00040 friend ostream& operator<<(ostream& os, const CTBcounter& obj); 00041 friend istream& operator>>(istream& is, CTBcounter& obj); 00042 00043 private: 00044 double md_count; 00045 }; 00046 00047 00048 #if !(defined(CTB__OutLine) || defined(CTBcounter__OutLine)) 00049 #include "CTBcounter.icc" 00050 #endif 00051 00052 #endif