Advertisement
Guest User

main.cpp

a guest
Apr 16th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <string>
  2. #include <vector>
  3.  
  4. #include "notify_time.h"
  5. #include "event.h"
  6.  
  7. int main(int argc, char* argv[])
  8. {
  9.     if (argc != 3) return -1;
  10.     std::string mode = argv[1], path = argv[2];
  11.     bool loop = false;
  12.     {
  13.         if (mode == "loop")
  14.         {
  15.             loop = true;
  16.             send_notif(" \"Event Loop\" \"Event loop has started.\"");
  17.         }
  18.         else if (mode == "now") loop = false;
  19.         else return -1;
  20.     }
  21.  
  22.     std::vector<event_t> events;
  23.     load_conf(events, path);
  24.  
  25.     event_loop(events, loop);
  26.  
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement