10#ifndef LIBCWD_CLASS_CHANNEL_H
11#define LIBCWD_CLASS_CHANNEL_H
89 static Channel const off_channel;
100 explicit Channel(
char const* label,
bool add_to_channel_list =
true);
103 void NS_initialize(
char const* label, LIBCWD_TSD_PARAM,
bool add_to_channel_list);
112 friend struct _private_::DebugChannels;
113 void initialize(_private_::ChannelSetsWat wat,
char const* label,
size_t label_len);
128 void force_on(OnOffState& state,
char const* label);
129 void restore(OnOffState
const& state);
131 Channel const& operator()(
bool cond)
const {
return cond ? *this : off_channel; }
138 int index()
const {
return index_; }
141 bool is_on(LIBCWD_TSD_PARAM)
const;
Channel(char const *label, bool add_to_channel_list=true)
Construct a new debug channel with name label.
Definition Channel.inl.h:21
void off()
Turn this channel off.
Definition debug.cxx:1428
void on()
Cancel one call to off().
Definition debug.cxx:1439
Channel(char const *label, bool add_to_channel_list=true)
Construct a new debug channel with name label.
Definition Channel.inl.h:21
char const * get_label() const
Pointer to the label of the debug channel.
Definition Channel.inl.h:44
bool is_on() const
Returns true if the channel is active.
Definition Channel.inl.h:35
void initialize()
Initialize libcwd global state before normal dynamic initialization reaches libcw_do.
Definition debug.cxx:401
constexpr unsigned short max_label_len
The maximum number of characters that are allowed in a debug channel label.
Definition max_label_len.h:16