![]() |
LLGL 0.05 Beta
|
Classes | |
| struct | StdOutFlags |
| Standard output flags enumeration. More... | |
| struct | ColorFlags |
| Enumeration of all log color code flags. More... | |
| struct | ColorCodes |
| Log color code structure. More... | |
Typedefs | |
| using | LogHandle = void* |
| Opaque handle to a log callback. | |
| using | ReportCallback = std::function<void(ReportType type, const char* text, void* userData)> |
| Report callback function signature. | |
| using | ReportCallbackExt = std::function<void(ReportType type, const char* text, void* userData, const ColorCodes& colors)> |
Enumerations | |
| enum class | ReportType { Default = 0 , Error } |
| Report type enumeration. More... | |
Functions | |
| LLGL_EXPORT void | Printf (const char *format,...) |
| Prints a formatted message to the log. | |
| LLGL_EXPORT void | Printf (const ColorCodes &colors, const char *format,...) |
| Prints a formatted message to the log with color codes. | |
| LLGL_EXPORT void | Errorf (const char *format,...) |
| Prints a formatted error message to the log. | |
| LLGL_EXPORT void | Errorf (const ColorCodes &colors, const char *format,...) |
| Prints a formatted error message to the log with color codes. | |
| LLGL_EXPORT LogHandle | RegisterCallback (const ReportCallback &callback, void *userData=nullptr) |
| Registers a new log callback. No log callback is specified by default, in which case the reports are ignored. | |
| LLGL_EXPORT LogHandle | RegisterCallback (const ReportCallbackExt &callback, void *userData=nullptr) |
| LLGL_EXPORT LogHandle | RegisterCallbackReport (Report &report) |
| Registers a new log callback that is forwarded to the specified Report. | |
| LLGL_EXPORT LogHandle | RegisterCallbackStd (long stdOutFlags=0) |
Registers a new log callback to the standard output streams, i.e. stdout and stderr from <stdio.h>. | |
| LLGL_EXPORT void | UnregisterCallback (LogHandle handle) |
| Unregisters the specified handle from the log output. | |
| using LLGL::Log::LogHandle = void* |
Opaque handle to a log callback.
| using LLGL::Log::ReportCallback = std::function<void(ReportType type, const char* text, void* userData)> |
Report callback function signature.
| [in] | type | Specifies the type of the report message. |
| [in] | text | Pointer to a NUL-terminated string of the report text. |
| [in] | userData | Specifies the user data that was set in the previous call to SetReportCallback. |
| using LLGL::Log::ReportCallbackExt = std::function<void(ReportType type, const char* text, void* userData, const ColorCodes& colors)> |
|
strong |
Report type enumeration.
| Enumerator | |
|---|---|
| Default | Default report type. Usually forwarded to
|
| Error | Error message type. Usually forwarded to
|
| LLGL_EXPORT void LLGL::Log::Errorf | ( | const char * | format, |
| ... ) |
Prints a formatted error message to the log.
| [in] | format | Specifies the formatted text. Same as ::printf. |
| LLGL_EXPORT void LLGL::Log::Errorf | ( | const ColorCodes & | colors, |
| const char * | format, | ||
| ... ) |
Prints a formatted error message to the log with color codes.
| [in] | format | Specifies the formatted text. Same as ::printf. |
| [in] | colors | Specifies color codes to highlight the printed text. |
| LLGL_EXPORT void LLGL::Log::Printf | ( | const char * | format, |
| ... ) |
Prints a formatted message to the log.
| [in] | format | Specifies the formatted text. Same as ::printf. |
| LLGL_EXPORT void LLGL::Log::Printf | ( | const ColorCodes & | colors, |
| const char * | format, | ||
| ... ) |
Prints a formatted message to the log with color codes.
| [in] | format | Specifies the formatted text. Same as ::printf. |
| [in] | colors | Specifies color codes to highlight the printed text. |
| LLGL_EXPORT LogHandle LLGL::Log::RegisterCallback | ( | const ReportCallback & | callback, |
| void * | userData = nullptr ) |
Registers a new log callback. No log callback is specified by default, in which case the reports are ignored.
| [in] | callback | Specifies the new report callback. This can also be null. |
| [in] | userData | Optional raw pointer to some user data that will be passed to the callback each time a report is generated. |
| LLGL_EXPORT LogHandle LLGL::Log::RegisterCallback | ( | const ReportCallbackExt & | callback, |
| void * | userData = nullptr ) |
| LLGL_EXPORT LogHandle LLGL::Log::RegisterCallbackReport | ( | Report & | report | ) |
Registers a new log callback that is forwarded to the specified Report.
| [out] | report | Specifies the report that will receive all log entries. |
| LLGL_EXPORT LogHandle LLGL::Log::RegisterCallbackStd | ( | long | stdOutFlags = 0 | ) |
Registers a new log callback to the standard output streams, i.e. stdout and stderr from <stdio.h>.
| [in] | stdOutFlags | Bitwise OR combination of standard output flags (StdOutFlags). Use this to enable colored output for instance. |
| LLGL_EXPORT void LLGL::Log::UnregisterCallback | ( | LogHandle | handle | ) |
Unregisters the specified handle from the log output.
| [in] | handle | Specifies the opaque handle that was returned from a previous call to RegisterCallback, RegisterCallbackReport, or RegisterCallbackStd. |