00001
00034 #ifndef ALARMSTATUSENTRY_H
00035 #define ALARMSTATUSENTRY_H
00036
00037 #include "oldgcccompat.h"
00038
00039 #include <ctime>
00040 #include <ostream>
00041 #include <string>
00042
00043 namespace AlarmNotifications
00044 {
00045
00051 class AlarmStatusEntry final
00052 {
00053 private:
00059 std::string _pvname;
00065 std::string _severity;
00071 std::string _status;
00077 time_t _triggertime;
00083 bool _desktopNotificationSent;
00089 bool _emailNotificationSent;
00090
00091 public:
00100 AlarmStatusEntry ( const std::string& pvname, const std::string& severity, const std::string& status ) noexcept;
00106 ~AlarmStatusEntry() noexcept;
00114 bool operator== ( const AlarmStatusEntry& other ) noexcept;
00121 AlarmStatusEntry ( const AlarmStatusEntry& other ) noexcept;
00128 AlarmStatusEntry ( AlarmStatusEntry&& other ) noexcept;
00136 AlarmStatusEntry& operator= ( const AlarmStatusEntry& other ) noexcept;
00144 AlarmStatusEntry& operator= ( AlarmStatusEntry&& other ) noexcept;
00151 const std::string& getPVName() const noexcept;
00158 const std::string& getSeverity() const noexcept;
00166 void setSeverity ( const std::string& severity ) noexcept;
00173 const std::string& getStatus() const noexcept;
00181 void setStatus ( const std::string& status ) noexcept;
00188 time_t getTriggerTime() const noexcept;
00196 void setTriggerTime ( const time_t triggertime ) noexcept;
00204 void update ( const AlarmStatusEntry& newdata ) noexcept;
00211 bool getDesktopNotificationSent() const noexcept;
00219 void setDesktopNotificationSent ( const bool desktopNotificationSent ) noexcept;
00226 bool getEmailNotificationSent() const noexcept;
00234 void setEmailNotificationSent ( const bool emailNotificationSent ) noexcept;
00235 };
00236
00245 std::ostream& operator<< ( std::ostream& os, const AlarmNotifications::AlarmStatusEntry& ase );
00246
00247 }
00248
00249 #endif // ALARMSTATUSENTRY_H