#include <counter.h>
◆ Counter() [1/2]
dsac::design::Counter::Counter |
( |
| ) |
|
Constructs a new Counter with value zero.
◆ Counter() [2/2]
dsac::design::Counter::Counter |
( |
int |
initial | ) |
|
Constructs a new Counter with given initial value.
- Parameters
-
◆ get_value()
int dsac::design::Counter::get_value |
( |
| ) |
const |
Returns the current counter value.
- Returns
- the current counter value
◆ increment() [1/2]
void dsac::design::Counter::increment |
( |
| ) |
|
Increments the counter value by one.
◆ increment() [2/2]
void dsac::design::Counter::increment |
( |
int |
delta | ) |
|
Increments the counter value by the specified delta.
- Parameters
-
delta | the amount of the increment |
◆ reset()
void dsac::design::Counter::reset |
( |
| ) |
|
Resets the counter value to zero.
The documentation for this class was generated from the following files: