open_toontown_panda3d/dtool/src/dconfig/notifyCategory.I

220 lines
7.6 KiB
Plaintext

// Filename: notifyCategory.I
// Created by: drose (29Feb00)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
//
// All use of this software is subject to the terms of the Panda 3d
// Software license. You should have received a copy of this license
// along with this source code; you will also find a current copy of
// the license at http://www.panda3d.org/license.txt .
//
// To contact the maintainers of this program write to
// panda3d@yahoogroups.com .
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::get_fullname
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE string NotifyCategory::
get_fullname() const {
return _fullname;
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::get_basename
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE string NotifyCategory::
get_basename() const {
return _basename;
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::get_severity
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE NotifySeverity NotifyCategory::
get_severity() const {
return _severity;
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::set_severity
// Access: Public
// Description: Sets the severity level of messages that will be
// reported from this Category. This allows any message
// of this severity level or higher.
////////////////////////////////////////////////////////////////////
INLINE void NotifyCategory::
set_severity(NotifySeverity severity) {
_severity = severity;
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_on
// Access: Public
// Description: Returns true if messages of the indicated severity
// level ought to be reported for this Category.
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_on(NotifySeverity severity) const {
return (int)severity >= (int)_severity;
}
#if defined(NOTIFY_DEBUG) || defined(CPPPARSER)
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_spam
// Access: Public
// Description: A shorthand way to write is_on(NS_spam).
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_spam() const {
return is_on(NS_spam);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_debug
// Access: Public
// Description: A shorthand way to write is_on(NS_debug).
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_debug() const {
return is_on(NS_debug);
}
#else
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_spam
// Access: Public, Static
// Description: When NOTIFY_DEBUG is not defined, the categories are
// never set to "spam" or "debug" severities, and these
// methods are redefined to be static to make it more
// obvious to the compiler.
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_spam() {
return false;
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_debug
// Access: Public
// Description: When NOTIFY_DEBUG is not defined, the categories are
// never set to "spam" or "debug" severities, and these
// methods are redefined to be static to make it more
// obvious to the compiler.
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_debug() {
return false;
}
#endif
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_info
// Access: Public
// Description: A shorthand way to write is_on(NS_info).
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_info() const {
return is_on(NS_info);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_warning
// Access: Public
// Description: A shorthand way to write is_on(NS_warning).
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_warning() const {
return is_on(NS_warning);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_error
// Access: Public
// Description: A shorthand way to write is_on(NS_error).
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_error() const {
return is_on(NS_error);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_fatal
// Access: Public
// Description: A shorthand way to write is_on(NS_fatal).
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_fatal() const {
return is_on(NS_fatal);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::spam
// Access: Public
// Description: A shorthand way to write out(NS_spam).
////////////////////////////////////////////////////////////////////
INLINE ostream &NotifyCategory::
spam(bool prefix) const {
return out(NS_spam, prefix);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::debug
// Access: Public
// Description: A shorthand way to write out(NS_debug).
////////////////////////////////////////////////////////////////////
INLINE ostream &NotifyCategory::
debug(bool prefix) const {
return out(NS_debug, prefix);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::info
// Access: Public
// Description: A shorthand way to write out(NS_info).
////////////////////////////////////////////////////////////////////
INLINE ostream &NotifyCategory::
info(bool prefix) const {
return out(NS_info, prefix);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::warning
// Access: Public
// Description: A shorthand way to write out(NS_warning).
////////////////////////////////////////////////////////////////////
INLINE ostream &NotifyCategory::
warning(bool prefix) const {
return out(NS_warning, prefix);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::error
// Access: Public
// Description: A shorthand way to write out(NS_error).
////////////////////////////////////////////////////////////////////
INLINE ostream &NotifyCategory::
error(bool prefix) const {
return out(NS_error, prefix);
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::fatal
// Access: Public
// Description: A shorthand way to write out(NS_fatal).
////////////////////////////////////////////////////////////////////
INLINE ostream &NotifyCategory::
fatal(bool prefix) const {
return out(NS_fatal, prefix);
}