00001 #ifndef SERVICESTATUS_H 00002 #define SERVICESTATUS_H 00003 00004 #include <is/info.h> 00005 00006 #include <string> 00007 00008 00009 // <<BeginUserCode>> 00010 00011 // <<EndUserCode>> 00018 class ServiceStatus : public ISInfo { 00019 public: 00020 00023 unsigned long done; 00024 00027 unsigned long queue; 00028 00031 float averageTimeEach; 00032 00035 float timeLeft; 00036 00037 00038 static const ISType & type() { 00039 static const ISType type_ = ServiceStatus( ).ISInfo::type(); 00040 return type_; 00041 } 00042 00043 ServiceStatus( ) 00044 : ISInfo( "ServiceStatus" ) 00045 { 00046 initialize(); 00047 } 00048 00049 ~ServiceStatus(){ 00050 00051 // <<BeginUserCode>> 00052 00053 // <<EndUserCode>> 00054 } 00055 00056 protected: 00057 ServiceStatus( const std::string & type ) 00058 : ISInfo( type ) 00059 { 00060 initialize(); 00061 } 00062 00063 void publishGuts( ISostream & out ){ 00064 out << done << queue << averageTimeEach << timeLeft; 00065 } 00066 00067 void refreshGuts( ISistream & in ){ 00068 in >> done >> queue >> averageTimeEach >> timeLeft; 00069 } 00070 00071 private: 00072 void initialize() 00073 { 00074 done = 0; 00075 queue = 0; 00076 averageTimeEach = 0; 00077 timeLeft = 0; 00078 00079 // <<BeginUserCode>> 00080 00081 // <<EndUserCode>> 00082 } 00083 00084 00085 // <<BeginUserCode>> 00086 00087 // <<EndUserCode>> 00088 }; 00089 00090 // <<BeginUserCode>> 00091 00092 // <<EndUserCode>> 00093 #endif // SERVICESTATUS_H