parsercmd/src/configpar.cxx
// ===========================================================================
// Sets sev if the string designates a known severity, otherwise sets
// sev to unknown_sev.  Returns true if the string designates a known
// severity or if it is "no_message".
//
Sets sev if the string designates a known severity, otherwise sets
sev to unknown_sev.  Returns true if the string designates a known
severity or if it is "no_message".
Sets sev if the string designates a known severity otherwise sets sev to unknown_sev . Returns true if the string designates a known severity or if it is " no_message " .
bool string_to_severity(const string &str, msg_sev &sev) {
    sev = unknown_sev;
    if (str == "normal") {
	sev = normal_sev;
    }
    else if (str == "warning") {
	sev = warning_sev;
    }
    else if (str == "error") {
	sev = error_sev;
    }
    else if (str == "catastrophe") {
	sev = catastrophe_sev;
    }
    else if (str == "unknown") {
    }
    else if (str == "no_message") {
        sev = msg_sev(no_message_sev);
    }
    else {
	return false;
    }
    return true;
}
bool string_to_severity ( const string & str , msg_sev & sev ) { sev = unknown_sev ; if ( str == " " ) { sev = normal_sev ; } else if ( str == " " ) { sev = warning_sev ; } else if ( str == " " ) { sev = error_sev ; } else if ( str == " " ) { sev = catastrophe_sev ; } else if ( str == " " ) { } else if ( str == " " ) { sev = msg_sev ( no_message_sev ) ; } else { return false ; } return true ; }
Sets sev if the string designates a known severity, otherwise sets
sev to unknown_sev.
Sets sev if the string designates a known severity otherwise sets sev to unknown_sev .