Macros | |
| #define | tb_debug_log(log_stream) TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); |
| #define | tb_debug_log_if(testResult, log_stream) if (testResult) { TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); } |
| #define | tb_debug_hexdump(message, rawData, dataSize) TurtleBrains::Core::Debug::LogHexDump(message, rawData, dataSize) |
| #define | tb_always_log(log_stream) TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); |
| #define | tb_always_log_if(testResult, log_stream) if (testResult) { TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); } |
| #define | tb_always_hexdump(message, rawData, dataSize) TurtleBrains::Core::Debug::LogHexDump(message, rawData, dataSize) |
| #define | tb_debug_project_entry_point(entryPoint) TurtleBrains::Core::Debug::ProjectEntryPoint(entryPoint); |
| #define | tb_debug_project_entry_point_with(entryPoint, argumentCount, argumentValues) TurtleBrains::Core::Debug::ProjectEntryPoint(entryPoint, argumentCount, argumentValues); |
| #define tb_always_hexdump | ( | message, | |
| rawData, | |||
| dataSize | |||
| ) | TurtleBrains::Core::Debug::LogHexDump(message, rawData, dataSize) |
Show the raw bytes as hexvalues directly in a log with a message that introduces what is being displayed. Implementation simply calls Debug::LogHexDump().
| message | A quick string preceding the hexdump that can be used to understand the data. |
| rawData | The address of the data to dump into the log. |
| dataSize | How much data, in bytes, should get displayed. |
| #define tb_always_log | ( | log_stream | ) | TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); |
Writes a message into the log using a stream and anything that overloads operator<<(ofstream&) should be able to be shoved through. One would typically log to a specific channel and set the logging level using tb_debug_log(LogGameplay::Info() << "Hello Turtles!"); to log on the "Gameplay" channel at Info level. Implementation simply calls the Debug::TheLogger() with start/end entry, however the define is simpler.
| log_stream | Any combination of objects that support operator<<ofstream&) typically starting with the the LogChannel and LogLevel like; tb_debug_log(LogGameplay::Info() << "Hello Turtles!"); |
| #define tb_always_log_if | ( | testResult, | |
| log_stream | |||
| ) | if (testResult) { TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); } |
Checks if the testResult is true and only when that is true will this write a message to the log exactly as tb_debug_log would.
| testResult | An expression that will result in a boolean, true or false, result. If true the message will output in the log and stdout, otherwise it will not be displayed. |
| log_stream | Any combination of objects that support operator<<ofstream&) typically starting with the the LogChannel and LogLevel like; tb_debug_log(LogGameplay::Info() << "Hello Turtles!"); |
| #define tb_debug_hexdump | ( | message, | |
| rawData, | |||
| dataSize | |||
| ) | TurtleBrains::Core::Debug::LogHexDump(message, rawData, dataSize) |
Show the raw bytes as hexvalues directly in a log with a message that introduces what is being displayed. Implementation simply calls Debug::LogHexDump() but the define should be preferred as it will be disabled in public builds when tb_without_debug_set is defined in tb_configuration.h
| message | A quick string preceding the hexdump that can be used to understand the data. |
| rawData | The address of the data to dump into the log. |
| dataSize | How much data, in bytes, should get displayed. |
| #define tb_debug_log | ( | log_stream | ) | TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); |
Writes a message into the log using a stream and anything that overloads operator<<(ofstream&) should be able to be shoved through. One would typically log to a specific channel and set the logging level using tb_debug_log(LogGameplay::Info() << "Hello Turtles!"); to log on the "Gameplay" channel at Info level. Implementation simply calls the Debug::TheLogger() with start/end entry, however the define should be preferred because it will disable all logging with the tb_without_debug_set defined in tb_configuration.h
| log_stream | Any combination of objects that support operator<<ofstream&) typically starting with the the LogChannel and LogLevel like; tb_debug_log(LogGameplay::Info() << "Hello Turtles!"); |
| #define tb_debug_log_if | ( | testResult, | |
| log_stream | |||
| ) | if (testResult) { TurtleBrains::Core::Debug::TheLogger() << TurtleBrains::Core::Debug::StartOfEntry() << log_stream << TurtleBrains::Core::Debug::EndOfEntry(); } |
Checks if the testResult is true and only when that is true will this write a message to the log exactly as tb_debug_log would.
| testResult | An expression that will result in a boolean, true or false, result. If true the message will output in the log and stdout, otherwise it will not be displayed. |
| log_stream | Any combination of objects that support operator<<ofstream&) typically starting with the the LogChannel and LogLevel like; tb_debug_log(LogGameplay::Info() << "Hello Turtles!"); |
| #define tb_debug_project_entry_point | ( | entryPoint | ) | TurtleBrains::Core::Debug::ProjectEntryPoint(entryPoint); |
Setups a special exception handler on Windows built with Visual CPP that will create a crash report with a callstack when an exception is thrown and caught within. For other platforms and compilers the exception will be caught but no crash report will be created as far as TurlteBrains v0.2.0. Hopeful future support.
Underneath this simply calls the Debug::ProjectEntryPoint() function, however the define should be preferred when you want to have the option of turning off all logging with the tb_without_debug_set define in the tb_configuration.h file.
| entryPoint | A function pointer to a function that takes no parameters and returns no parameters, void foo(void); that will be called after setting up an exception handler to create a crash report. |
| #define tb_debug_project_entry_point_with | ( | entryPoint, | |
| argumentCount, | |||
| argumentValues | |||
| ) | TurtleBrains::Core::Debug::ProjectEntryPoint(entryPoint, argumentCount, argumentValues); |
Setups a special exception handler on Windows built with Visual CPP that will create a crash report with a callstack when an exception is thrown and caught within. For other platforms and compilers the exception will be caught but no crash report will be created as far as TurlteBrains v0.2.0. Hopeful future support.
Underneath this simply calls the Debug::ProjectEntryPoint() function, however the define should be preferred when you want to have the option of turning off all logging with the tb_without_debug_set define in the tb_configuration.h file.
| entryPoint | A function pointer to a function that takes an argumentCount and values parameters just like the would be passed to a main and returns an int: int foo(int c, char* v[]); that will be called after setting up an exception handler to create a crash report. |
| argumentCount | The number of values in the argumentValues array, typically just pass the same argumentCount you would get from main(int c, char* v[]); |
| argumentValues | The actual values of each argument as null-terminated strings, typically just pass the same argumentValues you would get from main(int c, char* v[]); |