18 #ifndef LIBCWD_CLASS_DEBUG_H
19 #define LIBCWD_CLASS_DEBUG_H
21 #ifndef LIBCWD_CONFIG_H
24 #ifndef LIBCWD_CLASS_CHANNEL_SET_H
27 #ifndef LIBCWD_PRIVATE_STRUCT_TSD_H
30 #ifndef LIBCWD_STRUCT_DEBUG_TSD_H
31 #include "struct_debug_tsd.h"
33 #ifndef LIBCWD_PRIVATE_LOCK_INTERFACE_H
48 struct debug_message_st {
49 struct debug_message_st* next;
50 struct debug_message_st* prev;
52 char buf[
sizeof(int)];
78 friend void debug_tsd_st::start(
debug_ct&, channel_set_data_st& LIBCWD_COMMA_TSD_PARAM);
85 #if LIBCWD_THREAD_SAFE
87 static int S_index_count;
102 std::ostream* real_os;
105 #if LIBCWD_THREAD_SAFE
106 friend class libcwd::buffer_ct;
107 _private_::lock_interface_base_ct* M_mutex;
111 buffer_ct* unfinished_oss;
112 void const* newlineless_tsd;
120 bool WNS_initialized;
123 bool NS_being_initialized;
136 _private_::debug_message_st* queue;
137 _private_::debug_message_st* queue_top;
199 friend class fatal_channel_ct;
200 friend void ST_initialize_globals(LIBCWD_TSD_PARAM);
202 friend bool cwbfd::ST_init(LIBCWD_TSD_PARAM);
204 bool NS_init(LIBCWD_TSD_PARAM);
221 void private_set_ostream(std::ostream* os);
229 #if LIBCWD_THREAD_SAFE || defined(LIBCWD_DOXYGEN)
232 #ifdef LIBCWD_DOXYGEN
235 void set_ostream(std::ostream* os, pthread_mutex_t* mutex);
243 #if CWDEBUG_DEBUGOUTPUT
248 void force_on(OnOffState& state);
249 void restore(OnOffState
const& state);
250 bool is_on(LIBCWD_TSD_PARAM)
const;
253 #if LIBCWD_THREAD_SAFE && !defined(LIBCWD_DOXYGEN)
261 #ifndef LIBCWD_SET_OSTREAM_INL
262 #include "set_ostream.inl"
This object represents a debug channel, it has a fixed label. A debug channel can be viewed upon as a...
Definition: class_channel.h:82
The Debug Object class, this object represents one output device (ostream).
Definition: class_debug.h:77
debug_ct()
Constructor.
Definition: class_debug.inl:155
void on()
Cancel last call to off().
Definition: class_debug.inl:202
void off()
Turn this debug object off.
Definition: class_debug.inl:171
A string class used for the debug output margin and marker.
Definition: class_debug_string.h:48
continued_channel_ct finish
Definition: debug.cc:517
std::ostream * get_ostream() const
Get the ostream device as set with set_ostream().
Definition: class_debug.inl:128
void set_ostream(std::ostream *os)
Set output device (single threaded applications).
Definition: debug.cc:2041
namespace for libcwd.
Definition: debug.cc:87