00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "notifySeverity.h"
00016 #include "pnotify.h"
00017
00018 ostream &
00019 operator << (ostream &out, NotifySeverity severity) {
00020 switch (severity) {
00021 case NS_spam:
00022 return out << "spam";
00023
00024 case NS_debug:
00025 return out << "debug";
00026
00027 case NS_info:
00028 return out << "info";
00029
00030 case NS_warning:
00031 return out << "warning";
00032
00033 case NS_error:
00034 return out << "error";
00035
00036 case NS_fatal:
00037 return out << "fatal";
00038
00039 case NS_unspecified:
00040 return out << "unspecified";
00041 }
00042
00043 return out << "**invalid severity**";
00044 }
00045
00046 istream &
00047 operator >> (istream &in, NotifySeverity &severity) {
00048 string word;
00049 in >> word;
00050 severity = Notify::string_severity(word);
00051 return in;
00052 }