You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
266B

  1. #pragma once
  2. #include "trigger.h"
  3. namespace DHE {
  4. class Gate : public Trigger {
  5. protected:
  6. virtual void on_fall() = 0;
  7. void on_state_change(bool state) override {
  8. if (state) {
  9. on_rise();
  10. } else {
  11. on_fall();
  12. }
  13. }
  14. };
  15. } // namespace DHE