linearHistory.hh 478 B

123456789101112131415161718192021222324252627
  1. /**
  2. * linearHistory.hh for jsonstroller
  3. *
  4. * Author: isundil <isundill@gmail.com>
  5. **/
  6. #pragma once
  7. #include "config.h"
  8. #include "wrappedBuffer.hpp"
  9. class LinearHistory: public WrappedBuffer<char, ERROR_HISTORY_LEN>
  10. {
  11. public:
  12. LinearHistory();
  13. ~LinearHistory();
  14. unsigned int currentLine() const;
  15. void put(char item);
  16. void put(char item[], unsigned int count);
  17. private:
  18. bool willReset;
  19. unsigned int line;
  20. };