Metronome.h 561 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef METRONOME_H
  2. #define METRONOME_H
  3. #include <memory>
  4. #include <functional>
  5. namespace Timer {
  6. class MetronomeImpl;
  7. class Metronome
  8. {
  9. public:
  10. class Quantity
  11. {
  12. public:
  13. enum type
  14. {
  15. Hours,
  16. Minutes,
  17. Seconds
  18. };
  19. };
  20. public:
  21. Metronome(Quantity::type quantity, int amount);
  22. ~Metronome();
  23. public:
  24. typedef std::function<void()> CallbackMethod;
  25. public:
  26. size_t Connect(CallbackMethod function);
  27. void Disconnect(size_t connection);
  28. private:
  29. std::unique_ptr<MetronomeImpl> m_pMetronomeImpl;
  30. };
  31. } // namespace Timer
  32. #endif // METRONOME_H