msl 1.3.0
Loading...
Searching...
No Matches
msl::Counter Class Reference

Detailed Description

Counter from 0 (included) to end (excluded).

#include <Counter.h>

Public Member Functions

 Counter (std::size_t end)
 Initialize index to 0.
std::size_t index () const
 Return the current index.
std::size_t end () const
 Return the end value.
CountersetEnd (std::size_t end)
 Set the end value.
Counterreset ()
 Set the index to 0.
Counteroperator++ ()
 Increment the index.
bool first () const
 Test if the index is 0.
bool last () const
 Test if the index is equal to end-1.
bool done () const
 Test if the index is equal to end.

Member Function Documentation

◆ operator++()

Counter & msl::Counter::operator++ ( )

Increment the index.

Attention
No bound control is performed.

The documentation for this class was generated from the following file: