10 namespace diagnostics {
54 static bool auto_flush() noexcept;
59 static
void auto_flush(
bool auto_flush) noexcept;
64 static
uint32 indent_level() noexcept;
68 static
void indent_level(
uint32 indent_level) noexcept;
73 static
uint32 indent_size() noexcept;
77 static
void indent_size(
uint32 indent_size) noexcept;
94 static
bool show_assert_dialog() noexcept;
99 static
void show_assert_dialog(
bool show_assert_dialog) noexcept;
104 static
bool use_global_lock() noexcept;
108 static
void use_global_lock(
bool use_global_lock) noexcept;
119 static
void cassert(
bool condition);
123 static
void cassert(
bool condition, const
xtd::
ustring& message);
133 static
void cassert(
bool condition, const
xtd::
ustring& message, const
xtd::
ustring& detail_message);
139 static
void cassert(
bool condition, const
xtd::
ustring& message, const
xtd::
ustring& detail_message, const
xtd::diagnostics::stack_frame& stack_frame);
143 static
void cassert(
bool condition, const
xtd::diagnostics::stack_frame& stack_frame);
161 fail__(message, detail_message);
173 static void indent() noexcept;
179 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 180 write_line_(message);
187 template<
typename ...args_t>
189 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 194 template<
typename ...args_t>
195 static void print(
const char* format, args_t&& ... args) {
196 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 206 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 214 template<
typename ...objects>
216 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 225 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 233 template<
typename ...objects>
235 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 244 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 252 template<
typename ...objects>
254 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE) 260 static void unindent() noexcept;
276 template<
typename object_t>
277 static void write(
const object_t& message) {
288 template<
typename object_t>
299 template<
typename ...args_t>
306 template<
typename ...args_t>
307 static void write(
const char* format, args_t&& ... args) {
321 if (condition) write_(message);
329 template<
typename object_t>
330 static void write_if(
bool condition,
const object_t& message) {
341 template<
typename object_t>
363 write_line_(message);
370 template<
typename object_t>
382 template<
typename object_t>
392 template<
typename ...args_t>
399 template<
typename ...args_t>
400 static void write_line(
const char* format, args_t&& ... args) {
414 if (condition) write_line_(message);
422 template<
typename object_t>
434 template<
typename object_t>
443 static inline bool __should_aborted__(
bool condition) {
return __should_aborted__(condition,
"",
csf_); }
444 static inline bool __should_aborted__(
bool condition,
const xtd::ustring& message) {
return __should_aborted__(condition, message,
csf_);}
447 static inline bool __should_aborted__(
bool condition,
const xtd::ustring& message,
const xtd::ustring& detail_message) {
return __should_aborted__(condition, message, detail_message,
csf_);}
450 auto result = xtd::diagnostics::debug::assert_dialog(condition, message, detail_message, stack_frame);
461 static void flush_();
468 inline static bool auto_flush_ =
false;
469 inline static uint32 indent_level_ = 0;
470 inline static uint32 indent_size_ = 4;
472 static bool& show_assert_dialog_;
473 inline static bool use_global_lock_ =
true;
static void write(const xtd::ustring &format, args_t &&... args)
Writes a formatted string to the trace listeners in the listeners collection.
Definition: trace.h:300
static void write_line(const xtd::ustring &format, args_t &&... args)
Writes a formatted string followed by a line terminator to the trace listeners in the listeners colle...
Definition: trace.h:393
static void trace_information(const xtd::ustring &message, const objects &... args)
Writes an informational message to the trace listeners in the listeners collection using the specifie...
Definition: trace.h:234
static void trace_warning(const xtd::ustring &message, const objects &... args)
Writes a warning message to the trace listeners in the listeners collection using the specified array...
Definition: trace.h:253
static void flush()
Flushes the output buffer and causes buffered data to write to the listeners collection.
Definition: trace.h:166
Contains xtd::diagnostics::debug class.
static void trace_information(const xtd::ustring &message)
Writes an informational message to the trace listeners in the listeners collection using the specifie...
Definition: trace.h:224
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition: static.h:37
static void write_if(bool condition, const object_t &message, const xtd::ustring &category)
Writes a category name and message to the trace listeners in the Listeners collection if a condition ...
Definition: trace.h:342
static void trace_error(const xtd::ustring &message, const objects &... args)
Writes an error message to the trace listeners in the listeners collection using the specified array ...
Definition: trace.h:215
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
#define csf_
Provides information about the current stack frame.
Definition: current_stack_frame.h:30
static void write_line(const object_t &message)
Writes a message followed by a line terminator to the trace listeners in the listeners collection...
Definition: trace.h:371
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Warning Noncritical problem.
static void write_if(bool condition, const xtd::ustring &message)
Writes a message to the trace listeners in the Listeners collection if a condition is true...
Definition: trace.h:319
static void write_line(const object_t &message, const xtd::ustring &category)
Writes a category name and message followed by a line terminator to the trace listeners in the listen...
Definition: trace.h:383
static void exit()
Terminates this process and returns an exit code to the operating system.
The assert dialog return value is Abort (usually sent from a button labeled Abort).
static void write_line_if(bool condition, const xtd::ustring &message)
Writes a message followed by a line terminator to the trace listeners in the Listeners collection if ...
Definition: trace.h:412
static void print(const xtd::ustring &message)
Writes a message followed by a line terminator to the trace listeners in the listeners collection...
Definition: trace.h:178
static void write(const object_t &message, const xtd::ustring &category)
Writes a category name and message to the trace listeners in the listeners collection.
Definition: trace.h:289
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition: trace.h:352
static void write_if(bool condition, const object_t &message)
Writes a message to the trace listeners in the Listeners collection if a condition is true...
Definition: trace.h:330
static void write_line_if(bool condition, const object_t &message)
Writes a message followed by a line terminator to the trace listeners in the Listeners collection if ...
Definition: trace.h:423
Represents a collection of xtd::diagnostics::trace_listener.
Definition: trace_listener_collection.h:26
static void trace_warning(const xtd::ustring &message)
Writes a warning message to the trace listeners in the listeners collection using the specified messa...
Definition: trace.h:243
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition: stack_frame.h:37
The assert dialog return value is Retry (usually sent from a button labeled Retry).
static void write(const object_t &message)
Writes a message to the trace listeners in the listeners collection.
Definition: trace.h:277
Provides a set of methods and properties that help you debug the execution of your code...
Definition: trace.h:38
static void print(const xtd::ustring &format, args_t &&... args)
Writes a formatted string followed by a line terminator to the trace listeners in the listeners colle...
Definition: trace.h:188
static void trace_error(const xtd::ustring &message)
Writes an error message to the trace listeners in the Listeners collection using the specified messag...
Definition: trace.h:205
static void write_line(const xtd::ustring &message)
Writes a message followed by a line terminator to the trace listeners in the listeners collection...
Definition: trace.h:361
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239
static void write(const xtd::ustring &message)
Writes a message to the trace listeners in the listeners collection.
Definition: trace.h:266
static void fail(const xtd::ustring &message, const xtd::ustring &detail_message)
Emits an error message and a detailed error message.
Definition: trace.h:159
trace_event_type
Identifies the type of event that has caused the trace.
Definition: trace_event_type.h:23
static void write_line_if(bool condition, const object_t &message, const xtd::ustring &category)
Writes a category name and message followed by a line terminator to the trace listeners in the Listen...
Definition: trace.h:435