|
Thrill
0.1
|
Definition at line 36 of file stats_counter.hpp.
#include <stats_counter.hpp>
Public Types | |
| using | ValueType = ValueType_ |
| The counter's value type. More... | |
Public Member Functions | |
| StatsCounter (const ValueType &initial=ValueType()) | |
| The constructor. Initializes the counter to 0. More... | |
| operator ValueType () const | |
| Cast to counter_type: Returns the counter's value as a regular integer value. More... | |
| StatsCounter & | operator++ () |
| Increases the counter by 1 (prefix). More... | |
| StatsCounter | operator++ (int) |
| Increases the counter by 1 (postfix). More... | |
| StatsCounter & | operator+= (const ValueType &right) |
| Increases the counter by right. More... | |
| bool | Real () const |
| Whether the counter is active. More... | |
| void | set_max (const ValueType &other) |
| ValueType | value () const |
Private Attributes | |
| ValueType | value_ |
| The counter's value. More... | |
| using ValueType = ValueType_ |
The counter's value type.
Definition at line 40 of file stats_counter.hpp.
|
inline |
The constructor. Initializes the counter to 0.
Definition at line 48 of file stats_counter.hpp.
|
inline |
Cast to counter_type: Returns the counter's value as a regular integer value.
This can be used as a getter as well as for printing with std::out.
Definition at line 85 of file stats_counter.hpp.
|
inline |
Increases the counter by 1 (prefix).
Definition at line 62 of file stats_counter.hpp.
|
inline |
Increases the counter by 1 (postfix).
Definition at line 68 of file stats_counter.hpp.
|
inline |
Increases the counter by right.
Definition at line 56 of file stats_counter.hpp.
|
inline |
Whether the counter is active.
Definition at line 53 of file stats_counter.hpp.
|
inline |
Set the counter to other if other is larger than the current counter value.
Definition at line 76 of file stats_counter.hpp.
References max().
|
inline |
Definition at line 90 of file stats_counter.hpp.
|
private |
The counter's value.
Definition at line 44 of file stats_counter.hpp.