117 if (__should_aborted__(
stack_frame, condition, message)) __xtd_debugbreak();
127 if (__should_aborted__(
stack_frame, condition, message, detail_message)) __xtd_debugbreak();
135 [[deprecated(
"Use xtd::diagnostics::trace::assert method - Will be removed in version 1.2.0.)")]]
146 [[deprecated(
"Use xtd::diagnostics::trace::assert method - Will be removed in version 1.2.0.)")]]
149 if (__should_aborted__(
stack_frame, condition, message)) __xtd_debugbreak();
158 [[deprecated(
"Use xtd::diagnostics::trace::assert method - Will be removed in version 1.2.0.)")]]
161 if (__should_aborted__(
stack_frame, condition, message, detail_message)) __xtd_debugbreak();
181 fail__(message, detail_message);
198 static auto
print(const
xtd::
string& message) ->
void {
200 write_line_(message);
207 template<
typename ...args_t>
214 template<
typename ...args_t>
215 static auto print(
const char*
format, args_t&& ... args) ->
void {
234 template<
typename ...objects>
253 template<
typename ...objects>
272 template<
typename ...objects>
286 static auto
write(const
xtd::
string& message) ->
void {
296 template<
typename object_t>
297 static auto write(
const object_t& message) ->
void {
308 template<
typename object_t>
319 template<
typename ...args_t>
326 template<
typename ...args_t>
327 static auto write(
const char*
format, args_t&& ... args) ->
void {
341 if (condition) write_(message);
349 template<
typename object_t>
350 static auto write_if(
bool condition,
const object_t& message) ->
void {
361 template<
typename object_t>
383 write_line_(message);
390 template<
typename object_t>
402 template<
typename object_t>
412 template<
typename ...args_t>
419 template<
typename ...args_t>
420 static auto write_line(
const char*
format, args_t&& ... args) ->
void {
434 if (condition) write_line_(message);
442 template<
typename object_t>
443 static auto write_line_if(
bool condition,
const object_t& message) ->
void {
454 template<
typename object_t>
467 auto result = xtd::diagnostics::debug::assert_dialog(condition, message, detail_message, stack_frame);
483 [[deprecated(
"Replaced by xtd::diagnostics::default_trace_listener::assert_ui_enabled - Will be removed in version 1.2.0.")]]
490 [[deprecated(
"Replaced by xtd::diagnostics::default_trace_listener::assert_ui_enabled - Will be removed in version 1.2.0.")]]
495 static auto fail__(const
xtd::
string& message) ->
void;
496 static auto fail__(const
xtd::
string& message, const
xtd::
string& detail_message) ->
void;
497 static auto flush_() ->
void;
499 static auto write_(const
xtd::
string& message) ->
void;
500 static auto write_(const
xtd::
string& message, const
xtd::
string& category) ->
void;
501 static auto write_line_(const
xtd::
string& message) ->
void;
502 static auto write_line_(const
xtd::
string& message, const
xtd::
string& category) ->
void;
504 inline static
bool auto_flush_ = false;
505 inline static
xtd::
uint32 indent_level_ = 0;
506 inline static
xtd::
uint32 indent_size_ = 4;
508 inline static
bool use_global_lock_ = true;
static const basic_string empty_string
Definition basic_string.hpp:111
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:46
static auto current(const xtd::diagnostics::source_location &value=xtd::diagnostics::source_location::current()) noexcept -> xtd::diagnostics::stack_frame
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
Represents a collection of xtd::diagnostics::trace_listener.
Definition trace_listener_collection.hpp:29
Provides a set of methods and properties that help you debug the execution of your code....
Definition trace.hpp:38
static auto cassert(bool condition, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Checks for a condition; if the condition is false, displays a message box that shows the call stack.
Definition trace.hpp:147
static auto write_if(bool condition, const object_t &message, const xtd::string &category) -> void
Writes a category name and message to the trace listeners in the Listeners collection if a condition ...
Definition trace.hpp:362
static auto listeners() -> listener_collection &
Gets the collection of listeners that is monitoring the trace output.
static auto trace_information(const xtd::string &message) -> void
Writes an informational message to the trace listeners in the listeners collection using the specifie...
Definition trace.hpp:244
static auto write(const xtd::string &message) -> void
Writes a message to the trace listeners in the listeners collection.
Definition trace.hpp:286
static auto indent() noexcept -> void
Increases the current indent_level by one.
static auto write_line_if(bool condition, const object_t &message) -> void
Writes a message followed by a line terminator to the trace listeners in the Listeners collection if ...
Definition trace.hpp:443
static auto write_line(const object_t &message, const xtd::string &category) -> void
Writes a category name and message followed by a line terminator to the trace listeners in the listen...
Definition trace.hpp:403
static auto write(const xtd::string &format, args_t &&... args) -> void
Writes a formatted string to the trace listeners in the listeners collection.
Definition trace.hpp:320
static auto fail(const xtd::string &message) -> void
Emits the specified error message.
Definition trace.hpp:169
static auto write_if(bool condition, const xtd::string &message) -> void
Writes a message to the trace listeners in the Listeners collection if a condition is true.
Definition trace.hpp:339
static auto write(const object_t &message, const xtd::string &category) -> void
Writes a category name and message to the trace listeners in the listeners collection.
Definition trace.hpp:309
static auto write_line_if(bool condition, const xtd::string &message) -> void
Writes a message followed by a line terminator to the trace listeners in the Listeners collection if ...
Definition trace.hpp:432
static auto write_line(const object_t &message) -> void
Writes a message followed by a line terminator to the trace listeners in the listeners collection.
Definition trace.hpp:391
static auto write_line() -> void
Writes a line terminator to the trace listeners in the listeners collection.
Definition trace.hpp:372
static auto assert(bool condition, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Checks for a condition; if the condition is false, displays a message box that shows the call stack.
Definition trace.hpp:115
static auto write_if(bool condition, const object_t &message) -> void
Writes a message to the trace listeners in the Listeners collection if a condition is true.
Definition trace.hpp:350
static auto assert(bool condition, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Checks for a condition; if the condition is false, displays a message box that shows the call stack.
Definition trace.hpp:106
static auto trace_information(const xtd::string &message, const objects &... args) -> void
Writes an informational message to the trace listeners in the listeners collection using the specifie...
Definition trace.hpp:254
static auto write_line_if(bool condition, const object_t &message, const xtd::string &category) -> void
Writes a category name and message followed by a line terminator to the trace listeners in the Listen...
Definition trace.hpp:455
static auto indent_level() noexcept -> xtd::uint32
Gets the indent level.
xtd::diagnostics::trace_listener_collection listener_collection
Represents a collection of xtd::diagnostics::trace_listener.
Definition trace.hpp:44
static auto cassert(bool condition, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Checks for a condition; if the condition is false, displays a message box that shows the call stack.
Definition trace.hpp:136
static auto fail(const xtd::string &message, const xtd::string &detail_message) -> void
Emits an error message and a detailed error message.
Definition trace.hpp:179
static auto assert(bool condition, const xtd::string &message, const xtd::string &detail_message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Checks for a condition; if the condition is false, displays a message box that shows the call stack.
Definition trace.hpp:125
static auto trace_warning(const xtd::string &message) -> void
Writes a warning message to the trace listeners in the listeners collection using the specified messa...
Definition trace.hpp:263
static auto print(const xtd::string &format, args_t &&... args) -> void
Writes a formatted string followed by a line terminator to the trace listeners in the listeners colle...
Definition trace.hpp:208
static auto unindent() noexcept -> void
Decreases the current indent_level by one.
static auto write_line(const xtd::string &format, args_t &&... args) -> void
Writes a formatted string followed by a line terminator to the trace listeners in the listeners colle...
Definition trace.hpp:413
static auto write(const object_t &message) -> void
Writes a message to the trace listeners in the listeners collection.
Definition trace.hpp:297
static void flush()
Flushes the output buffer and causes buffered data to write to the listeners collection.
Definition trace.hpp:186
static auto cassert(bool condition, const xtd::string &message, const xtd::string &detail_message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Checks for a condition; if the condition is false, displays a message box that shows the call stack.
Definition trace.hpp:159
static auto trace_error(const xtd::string &message, const objects &... args) -> void
Writes an error message to the trace listeners in the listeners collection using the specified array ...
Definition trace.hpp:235
static auto auto_flush() noexcept -> bool
Gets whether Flush should be called on the Listeners after every write.
static auto trace_warning(const xtd::string &message, const objects &... args) -> void
Writes a warning message to the trace listeners in the listeners collection using the specified array...
Definition trace.hpp:273
static auto trace_error(const xtd::string &message) -> void
Writes an error message to the trace listeners in the Listeners collection using the specified messag...
Definition trace.hpp:225
static auto write_line(const xtd::string &message) -> void
Writes a message followed by a line terminator to the trace listeners in the listeners collection.
Definition trace.hpp:381
static auto indent_size() noexcept -> xtd::uint32
Gets the number of spaces in an indent.
static auto print(const xtd::string &message) -> void
Writes a message followed by a line terminator to the trace listeners in the listeners collection.
Definition trace.hpp:198
static auto show_assert_dialog() noexcept -> bool
Gets a value indicating whether the assert dialog should be show.
static auto use_global_lock() noexcept -> bool
Gets a value indicating whether the global lock should be used.
static auto exit() -> void
Terminates this process and returns an exit code to the operating system.
Contains xtd::diagnostics::debug class.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:38
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
trace_event_type
Identifies the type of event that has caused the trace.
Definition trace_event_type.hpp:25
@ retry
The assert dialog return value is Retry (usually sent from a button labeled Retry).
Definition assert_dialog_result.hpp:29
@ abort
The assert dialog return value is Abort (usually sent from a button labeled Abort).
Definition assert_dialog_result.hpp:27
@ warning
Warning Noncritical problem.
Definition trace_event_type.hpp:31
@ information
Informational message.
Definition trace_event_type.hpp:33
@ error
Recoverable error.
Definition trace_event_type.hpp:29
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
auto print(FILE *file, arg_t &&value) -> void
Writes the text representation of the specified value to the file output stream.
Definition print.hpp:19