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.

123456789101112131415161718192021222324252627282930
  1. #ifndef MAINCLASS_HH
  2. # define MAINCLASS_HH
  3. # include <vector>
  4. # include <memory>
  5. class MainClass
  6. {
  7. public:
  8. MainClass(int argc, char* argv[]);
  9. int usage();
  10. int execute();
  11. static int get_current_device();
  12. static bool set_current_device(int c);
  13. static uint8_t get_pins();
  14. static uint8_t up_pin(uint8_t pin);
  15. static uint8_t down_pin(uint8_t pin);
  16. private:
  17. bool build_actions_();
  18. bool bad_value_();
  19. int argc_;
  20. char** argv_;
  21. std::vector<std::function<bool()>> actions_;
  22. static int current_device_;
  23. static uint8_t pins_;
  24. };
  25. #endif /* !MAINCLASS_HH */