libcwdversion 2.0.0
The C++ Debugging Support Library
Loading...
Searching...
No Matches
Channel.inl.h
1// SPDX-FileCopyrightText: 2001-2004, 2018, 2020, 2026 Carlo Wood
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#ifndef LIBCWD_CLASS_CHANNEL_INL
7#define LIBCWD_CLASS_CHANNEL_INL
8
9#include "Channel.h"
10
11namespace libcwd {
12
21inline Channel::Channel(char const* label, bool add_to_channel_list)
22{
23 LIBCWD_TSD_DECLARATION;
24 NS_initialize(label, LIBCWD_TSD, add_to_channel_list);
25}
26
27inline bool Channel::is_on(LIBCWD_TSD_PARAM) const
28{
29 return (__libcwd_tsd.off_cnt_array[index_] < 0);
30}
31
35inline bool Channel::is_on() const
36{
37 LIBCWD_TSD_DECLARATION;
38 return is_on(LIBCWD_TSD);
39}
40
44inline char const* Channel::get_label() const
45{
46 return label_;
47}
48
49} // namespace libcwd
50
51#endif // LIBCWD_CLASS_CHANNEL_INL
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
namespace for libcwd.