00001 #include "Counter.h" 00002 00003 Counter::Counter() : fCount(0), fMult(1) {} 00004 00005 bool Counter::Add() 00006 { 00007 ++fCount; 00008 if (fCount>fMult*10) fMult *= 10; 00009 if (fCount%fMult == 0) return true; 00010 return false; 00011 } 00012 void Counter::Reset(int count) 00013 { 00014 fCount = count; 00015 fMult = 1; 00016 while (count < fMult) fMult *= 10; 00017 } 00018 int Counter::GetCount() 00019 { 00020 return fCount; 00021 }
1.3.9.1