AlpacaLibary  1.63
A closed source C++ bot for OSRS
Counter.hpp
Go to the documentation of this file.
1 #ifndef COUNTER_HPP_INCLUDED
2 #define COUNTER_HPP_INCLUDED
3 
4 #include <iostream>
5 #include <cstdint>
6 
7 class Counter
8 {
9  public:
10 
12  Counter(std::int32_t MaxIterations);
13 
14  void Reset();
15  bool Increment(std::int32_t Amount = 1);
16  bool IsFinished() const;
17  std::int32_t GetIterations() const;
18  std::int32_t GetMaxIterations() const;
19  friend std::ostream& operator<<(std::ostream& OS, const Counter& C);
21  private:
22  std::int32_t MaxIterations;
23  std::int32_t Iterations;
24 };
25 
26 #endif // COUNTER_HPP_INCLUDED
void Reset()
Counter(std::int32_t MaxIterations)
std::int32_t GetIterations() const
friend std::ostream & operator<<(std::ostream &OS, const Counter &C)
bool IsFinished() const
bool Increment(std::int32_t Amount=1)
std::int32_t GetMaxIterations() const