Models a counter that can be incremented and decremented and prevents from overflowing.
More...
#include <shark/Core/Counter.h>
List of all members.
Detailed Description
Models a counter that can be incremented and decremented and prevents from overflowing.
Definition at line 45 of file Counter.h.
Constructor & Destructor Documentation
Default c'tor.
Definition at line 51 of file Counter.h.
Constructs a counter from the given one.
Definition at line 56 of file Counter.h.
Member Function Documentation
| shark::Counter::operator unsigned int |
( |
| ) |
const [inline] |
| const Counter& shark::Counter::operator++ |
( |
| ) |
const [inline] |
Preincrement operator.
- Returns:
- An immutable reference to this object.
Definition at line 93 of file Counter.h.
References m_counter.
| Counter shark::Counter::operator++ |
( |
int |
| ) |
const [inline] |
Postincrement operator.
- Returns:
- An incremented copy of this instance.
Definition at line 102 of file Counter.h.
References m_counter.
| Counter& shark::Counter::operator++ |
( |
| ) |
[inline] |
Preincrement operator.
- Returns:
- A mutable reference to this object.
Definition at line 116 of file Counter.h.
References m_counter.
| Counter shark::Counter::operator++ |
( |
int |
| ) |
[inline] |
Postincrement operator.
- Returns:
- An incremented copy of this instance.
Definition at line 125 of file Counter.h.
References m_counter.
| void shark::Counter::operator-- |
( |
| ) |
const [inline] |
| void shark::Counter::operator-- |
( |
| ) |
[inline] |
template<typename Scalar >
| bool shark::Counter::operator< |
( |
const Scalar & |
rhs | ) |
const [inline] |
Equality comparator.
- Parameters:
-
| [in] | rhs | The scalar to compare with. |
- Returns:
- true if this counter values is smaller than the supplied scalar, false otherwise.
Definition at line 85 of file Counter.h.
References m_counter.
Assignment operator.
- Parameters:
-
| [in] | rhs | The instance to assign from. |
- Returns:
- A mutable reference to this instance.
Definition at line 64 of file Counter.h.
References m_counter.
template<typename Scalar >
| bool shark::Counter::operator== |
( |
const Scalar & |
rhs | ) |
const [inline] |
Equality comparator.
- Parameters:
-
| [in] | rhs | The instance to compare with. |
- Returns:
- true if both counter values are equal, false otherwise.
Definition at line 75 of file Counter.h.
References m_counter.
Member Data Documentation
The documentation for this class was generated from the following file: