21 template<
class GetCategory>
25 _ptr = GetCategory::get_category();
40 template<
class GetCategory>
45 nout <<
"Uninitialized notify proxy: " << _ptr->get_fullname() <<
"\n";
61 template<
class GetCategory>
72 template<
class GetCategory>
74 is_on(NotifySeverity severity) {
75 return get_unsafe_ptr()->
is_on(severity);
84 template<
class GetCategory>
87 return get_unsafe_ptr()->
is_spam();
90 template<
class GetCategory>
103 template<
class GetCategory>
106 return get_unsafe_ptr()->
is_debug();
109 template<
class GetCategory>
121 template<
class GetCategory>
124 return get_unsafe_ptr()->
is_info();
132 template<
class GetCategory>
143 template<
class GetCategory>
146 return get_unsafe_ptr()->
is_error();
154 template<
class GetCategory>
157 return get_unsafe_ptr()->
is_fatal();
165 template<
class GetCategory>
167 out(NotifySeverity severity,
bool prefix) {
168 return get_unsafe_ptr()->
out(severity, prefix);
176 template<
class GetCategory>
179 return get_unsafe_ptr()->
spam(prefix);
187 template<
class GetCategory>
190 return get_unsafe_ptr()->
debug(prefix);
198 template<
class GetCategory>
201 return get_unsafe_ptr()->
info(prefix);
209 template<
class GetCategory>
212 return get_unsafe_ptr()->
warning(prefix);
220 template<
class GetCategory>
223 return get_unsafe_ptr()->
error(prefix);
231 template<
class GetCategory>
234 return get_unsafe_ptr()->
fatal(prefix);
246 template<
class GetCategory>
249 return get_safe_ptr();
260 template<
class GetCategory>
263 return *get_safe_ptr();
274 template<
class GetCategory>
277 return get_safe_ptr();
NotifyCategory & operator*()
This operator handles the case of dereferencing the proxy object as if it were a pointer, e.g.
bool is_error() const
A shorthand way to write is_on(NS_error).
NotifyCategory * get_unsafe_ptr()
Returns a pointer which is assumed to have been already initialized.
ostream & warning(bool prefix=true) const
A shorthand way to write out(NS_warning).
A handy wrapper around a NotifyCategory pointer.
static CONSTEXPR bool is_debug()
When NOTIFY_DEBUG is not defined, the categories are never set to "spam" or "debug" severities...
ostream & debug(bool prefix=true) const
A shorthand way to write out(NS_debug).
A particular category of error messages.
NotifyCategory * operator->()
This magic operator function defines the syntax proxy->info(), etc., for all of the methods that are ...
bool is_warning() const
A shorthand way to write is_on(NS_warning).
ostream & info(bool prefix=true) const
A shorthand way to write out(NS_info).
ostream & error(bool prefix=true) const
A shorthand way to write out(NS_error).
ostream & spam(bool prefix=true) const
A shorthand way to write out(NS_spam).
bool is_info() const
A shorthand way to write is_on(NS_info).
ostream & fatal(bool prefix=true) const
A shorthand way to write out(NS_fatal).
bool is_on(NotifySeverity severity) const
Returns true if messages of the indicated severity level ought to be reported for this Category...
bool is_fatal() const
A shorthand way to write is_on(NS_fatal).
NotifyCategory * get_safe_ptr()
Returns a pointer which is *not* assumed to have been already initialized; if necessary, it will be initialized before it returns.
ostream & out(NotifySeverity severity, bool prefix=true) const
Begins a new message to this Category at the indicated severity level.
static CONSTEXPR bool is_spam()
When NOTIFY_DEBUG is not defined, the categories are never set to "spam" or "debug" severities...
NotifyCategory * init()
Initializes the proxy object by calling get_category() on the template class.