timeractions.hpp 657 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef TIMERACTIONS_HPP
  2. #define TIMERACTIONS_HPP
  3. #include "timer.hpp"
  4. #include <chrono>
  5. #include <cstddef>
  6. #include <functional>
  7. #include <memory>
  8. #include <ncurses.h>
  9. #include <string>
  10. #include <vector>
  11. class SwapAction : public TimerAction {
  12. public:
  13. size_t it_i = 0;
  14. bool is_complete = false;
  15. std::vector<int> &input_vector;
  16. SwapAction(std::vector<int> &input_vector);
  17. void update(const Timer &t);
  18. };
  19. class SortAction : public TimerAction {
  20. public:
  21. size_t it_i = 0;
  22. size_t it_j = 0;
  23. bool is_complete = false;
  24. std::vector<int> &input_vector;
  25. SortAction(std::vector<int> &input_vector);
  26. void update(const Timer &t);
  27. };
  28. #endif