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.

25 lines
434 B

  1. #pragma once
  2. #include <fstream>
  3. #include <functional>
  4. #include <iostream>
  5. #include <list>
  6. #include <map>
  7. #include <memory>
  8. #include <set>
  9. #include <sstream>
  10. #include <string>
  11. #include <vector>
  12. namespace iflytopcpp {
  13. using namespace std;
  14. class Autodo {
  15. function<void()> autoRun;
  16. public:
  17. Autodo(function<void()> autoRun) : autoRun(autoRun) {}
  18. ~Autodo() {
  19. if (autoRun) autoRun();
  20. }
  21. private:
  22. };
  23. } // namespace iflytopcpp