Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Counter.cxx

Go to the documentation of this file.
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 }

Generated on Mon Feb 15 11:06:33 2010 for loon by  doxygen 1.3.9.1