Scheduler
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
utils
countingWheel.cpp
Go to the documentation of this file.
1
10
#include "
countingWheel.h
"
11
12
13
using namespace
Utils
;
14
15
16
CountingWheel::CountingWheel
(
unsigned
int
b) : base(b)
17
{
18
}
19
20
void
CountingWheel::initialize
()
21
{
22
value = 0;
23
}
24
25
bool
CountingWheel::increment
()
26
{
27
if
(base == 0)
28
return
true
;
29
value++;
30
if
(value == base)
31
{
32
value = 0;
33
return
true
;
34
}
35
return
false
;
36
}
37
38
unsigned
int
CountingWheel::getValue
()
39
{
40
return
value;
41
}
42
43
44
45
unsigned
int
CountingWheel::getBase
()
46
{
47
return
base;
48
}
Utils::CountingWheel::initialize
void initialize()
Definition:
countingWheel.cpp:20
countingWheel.h
Utils::CountingWheel::CountingWheel
CountingWheel(unsigned int base)
Definition:
countingWheel.cpp:16
Utils::CountingWheel::getBase
unsigned int getBase()
Definition:
countingWheel.cpp:45
Utils::CountingWheel::increment
bool increment()
Definition:
countingWheel.cpp:25
Utils
Definition:
context.h:16
Utils::CountingWheel::getValue
unsigned int getValue()
Definition:
countingWheel.cpp:38
Generated on Sun Nov 26 2017 17:01:36 for Scheduler by
1.8.11