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 <libcwd/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;
177 void set_indent(
unsigned short indentation);
178 void inc_indent(
unsigned short indentation);
179 void dec_indent(
unsigned short indentation);
180 unsigned short get_indent()
const;
191 std::ostream* get_ostream()
const;
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);
228 void set_ostream(std::ostream* os);
229 #if LIBCWD_THREAD_SAFE || defined(LIBCWD_DOXYGEN) 231 void set_ostream(std::ostream* os, T* mutex);
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 <libcwd/set_ostream.inl> 265 #endif // LIBCWD_CLASS_DEBUG_H The Debug Object class, this object represents one output device (ostream).
Definition: class_debug.h:77
A string class used for the debug output margin and marker.This type is used for the public attribute...
Definition: class_debug_string.h:48
void set_ostream(std::ostream *os)
Set output device (single threaded applications).Assign a new ostream to this debug object (default i...
Definition: debug.cc:2039
continued_channel_ct finish
Definition: debug.cc:517
namespace for libcwd.
Definition: debug.cc:87
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