lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Provides utility functions and classes, automatically logging raised exceptions, redirecting logged output to various targets, enhancing logged informtion by source information (caller file and line), etc. More...
Classes | |
class | log |
Log class. More... | |
class | log_stream_out |
Log stream class. More... | |
class | log_debugger |
Log debugger class that prints any given input to the debug output window. More... | |
class | basic_log_stream |
Log stream class that prints any given input to a given stream. As streams are not guaranteed to be thread-safe, it is recommended to only ever hold one wrapper for any given stream at a time. More... | |
class | log_target |
Log target interface. More... | |
Typedefs | |
typedef basic_log_stream | log_stream |
Std stream logging wrapper. | |
typedef basic_log_stream< wchar_t > | wlog_stream |
Wide-char std stream logging wrapper. | |
Functions | |
LEAN_MAYBE_EXPORT void | throw_error (const char *source) |
Throws a runtime_error exception. | |
LEAN_MAYBE_EXPORT void | throw_error (const char *source, const char *reason) |
Throws a runtime_error exception. | |
LEAN_MAYBE_EXPORT void | throw_error (const char *source, const char *reason, const char *context) |
Throws a runtime_error exception. | |
LEAN_MAYBE_EXPORT void | throw_error_ex (const char *source, const char *reason, const char *origin) |
Throws a runtime_error exception. | |
LEAN_MAYBE_EXPORT void | throw_error_ex (const char *source, const char *reason, const char *origin, const char *context) |
Throws a runtime_error exception. | |
LEAN_MAYBE_EXPORT void | throw_invalid (const char *source) |
Throws an invalid_argument exception. | |
LEAN_MAYBE_EXPORT void | throw_invalid (const char *source, const char *reason) |
Throws an invalid_argument exception. | |
LEAN_MAYBE_EXPORT void | throw_bad_alloc (const char *source) |
Throws a bad_alloc exception. | |
LEAN_MAYBE_EXPORT void | throw_bad_alloc (const char *source, size_t size) |
Throws a bad_alloc exception. | |
LEAN_MAYBE_EXPORT void | log_error (const char *source) |
Logs an error. | |
LEAN_MAYBE_EXPORT void | log_error (const char *source, const char *reason) |
Logs an error. | |
LEAN_MAYBE_EXPORT void | log_error (const char *source, const char *reason, const char *context) |
Logs an error. | |
LEAN_MAYBE_EXPORT void | log_error_ex (const char *source, const char *reason, const char *origin) |
Logs an error. | |
LEAN_MAYBE_EXPORT void | log_error_ex (const char *source, const char *reason, const char *origin, const char *context) |
Logs an error. | |
template<class String1 > | |
void | throw_error (const String1 &source) |
Throws a runtime_error exception. | |
template<class String1 , class String2 > | |
void | throw_error (const String1 &source, const String2 &reason) |
Throws a runtime_error exception. | |
template<class String1 , class String2 , class String3 > | |
void | throw_error (const String1 &source, const String2 &reason, const String3 &context) |
Throws a runtime_error exception. | |
template<class String1 , class String2 , class String3 > | |
void | throw_error_ex (const String1 &source, const String2 &reason, const String3 &origin) |
Throws a runtime_error exception. | |
template<class String1 , class String2 , class String3 , class String4 > | |
void | throw_error_ex (const String1 &source, const String2 &reason, const String3 &origin, const String4 &context) |
Throws a runtime_error exception. | |
template<class String1 > | |
void | throw_invalid (const String1 &source) |
Throws an invalid_argument exception. | |
template<class String1 , class String2 > | |
void | throw_invalid (const String1 &source, const String2 &reason) |
Throws an invalid_argument exception. | |
template<class String1 > | |
void | log_error (const String1 &source) |
Logs an error. | |
template<class String1 , class String2 > | |
void | log_error (const String1 &source, const String2 &reason) |
Logs an error. | |
template<class String1 , class String2 , class String3 > | |
void | log_error (const String1 &source, const String2 &reason, const String3 &context) |
Logs an error. | |
template<class String1 , class String2 , class String3 > | |
void | log_error_ex (const String1 &source, const String2 &reason, const String3 &origin) |
Logs an error. | |
template<class String1 , class String2 , class String3 , class String4 > | |
void | log_error_ex (const String1 &source, const String2 &reason, const String3 &origin, const String4 &context) |
Logs an error. | |
LEAN_MAYBE_EXPORT log & | error_log () |
Gets the error log. | |
LEAN_MAYBE_EXPORT log & | info_log () |
Gets the info log. | |
LEAN_MAYBE_EXPORT void | print_debugger (const char_ntri &message) |
Prints the given message to the debug output window. This method is thread-safe. | |
LEAN_MAYBE_EXPORT size_t | get_last_win_error_msg (utf16_t *buffer, size_t maxCount) |
Gets an error message describing the last WinAPI error that occurred. Returns the number of characters used. | |
template<class String > | |
String | get_last_win_error_msg () |
Gets an error message describing the last WinAPI error that occurred. | |
template<class String1 > | |
LEAN_NOTINLINE void | log_last_win_error (const String1 &source) |
Logs the last WinAPI error. | |
template<class String1 , class String2 > | |
LEAN_NOTINLINE void | log_last_win_error (const String1 &source, const String2 &reason) |
Logs the last WinAPI error. | |
template<class String1 , class String2 , class String3 > | |
LEAN_NOTINLINE void | log_last_win_error (const String1 &source, const String2 &reason, const String3 &context) |
Logs the last WinAPI error. | |
template<class String1 > | |
LEAN_NOTINLINE void | throw_last_win_error (const String1 &source) |
Throws a runtime_error exception containing the last WinAPI error. | |
template<class String1 , class String2 > | |
LEAN_NOTINLINE void | throw_last_win_error (const String1 &source, const String2 &reason) |
Throws a runtime_error exception containing the last WinAPI error. | |
template<class String1 , class String2 , class String3 > | |
LEAN_NOTINLINE void | throw_last_win_error (const String1 &source, const String2 &reason, const String3 &context) |
Throws a runtime_error exception containing the last WinAPI error. |
Provides utility functions and classes, automatically logging raised exceptions, redirecting logged output to various targets, enhancing logged informtion by source information (caller file and line), etc.
Std stream logging wrapper.
typedef basic_log_stream<wchar_t> lean::logging::wlog_stream |
Wide-char std stream logging wrapper.