Panda3D
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
dtool
src
prc
notifySeverity.cxx
1
// Filename: notifySeverity.cxx
2
// Created by: drose (29Feb00)
3
//
4
////////////////////////////////////////////////////////////////////
5
//
6
// PANDA 3D SOFTWARE
7
// Copyright (c) Carnegie Mellon University. All rights reserved.
8
//
9
// All use of this software is subject to the terms of the revised BSD
10
// license. You should have received a copy of this license along
11
// with this source code in a file named "LICENSE."
12
//
13
////////////////////////////////////////////////////////////////////
14
15
#include "notifySeverity.h"
16
#include "pnotify.h"
17
18
ostream &
19
operator << (ostream &out, NotifySeverity severity) {
20
switch
(severity) {
21
case
NS_spam:
22
return
out <<
"spam"
;
23
24
case
NS_debug:
25
return
out <<
"debug"
;
26
27
case
NS_info:
28
return
out <<
"info"
;
29
30
case
NS_warning:
31
return
out <<
"warning"
;
32
33
case
NS_error:
34
return
out <<
"error"
;
35
36
case
NS_fatal:
37
return
out <<
"fatal"
;
38
39
case
NS_unspecified:
40
return
out <<
"unspecified"
;
41
}
42
43
return
out <<
"**invalid severity**"
;
44
}
45
46
istream &
47
operator >> (istream &in, NotifySeverity &severity) {
48
string
word;
49
in >> word;
50
severity =
Notify::string_severity
(word);
51
return
in;
52
}
Notify::string_severity
static NotifySeverity string_severity(const string &string)
Given a string, one of "debug", "info", "warning", etc., return the corresponding Severity level...
Definition:
notify.cxx:443
Generated on Mon Feb 1 2016 13:44:16 for Panda3D by
1.8.5