Advertisement
Guest User

event.h

a guest
Apr 16th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.15 KB | None | 0 0
  1. #ifndef EVENT_H
  2. #define EVENT_H
  3.  
  4. #include <string>
  5. #include <vector>
  6.  
  7. class event_t
  8. {
  9.     private:
  10.  
  11.         std::string weekday;
  12.         unsigned warn_time = 0, start_time = 0, end_time = 0;
  13.         std::string warn_notif, start_notif, end_notif, about_to_start_notif, in_progress_notif;
  14.  
  15.         const unsigned parse_time(const std::string&) const;
  16.         const std::string unparse_notif(std::string, std::string) const;
  17.         const std::string& find_replace(std::string&, const std::string&,  const std::string&) const;
  18.         const std::string compose_notif(const std::string&, const std::string&) const;
  19.         const char* unparse_cmd(const std::string&) const;
  20.  
  21.     public:
  22.  
  23.         event_t();
  24.         event_t(const std::vector<std::string>&);
  25.  
  26.         void load_event(const std::vector<std::string>&);
  27.         friend void send_notif(const event_t&, const unsigned short);
  28.         friend void send_notif(const std::string&);
  29.  
  30.         const std::string& day() const;
  31.         const unsigned time(const unsigned short) const;
  32.         const std::string notif(const unsigned short) const;
  33. };
  34.  
  35. void send_notif(const std::string&);
  36.  
  37. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement