File Debug.h¶
Go to the source code of this file
#include <array>#include <iomanip>#include <iostream>#include <string>#include <vector>#include "Rays.h"#include "Shader/Ray.h"
Namespaces¶
| Type | Name |
|---|---|
| namespace | rayx |
Classes¶
| Type | Name |
|---|---|
| struct | Exit |
| struct | IgnoreLog |
| struct | Log |
| struct | Verb |
| struct | Warn |
Macros¶
| Type | Name |
|---|---|
| define | RAYX_DBG (C) rayx::dbg(\_\_FILE\_\_, \_\_LINE\_\_, #C, rayx::formatAsVec(C)) |
| define | RAYX_DEBUG (x) /* multi line expression */For quick debugging prints, this file further exposes RAYX_DBG(x). |
| define | RAYX_D_ERR [**rayx::IgnoreLog**](structrayx_1_1IgnoreLog.md)() |
| define | RAYX_D_LOG [**rayx::IgnoreLog**](structrayx_1_1IgnoreLog.md)() |
| define | RAYX_D_VERB [**rayx::IgnoreLog**](structrayx_1_1IgnoreLog.md)() |
| define | RAYX_D_WARN [**rayx::IgnoreLog**](structrayx_1_1IgnoreLog.md)() |
| define | RAYX_EXIT [**rayx::Exit**](structrayx_1_1Exit.md)(\_\_FILE\_\_, \_\_LINE\_\_) |
| define | RAYX_LOG [**rayx::Log**](structrayx_1_1Log.md)(\_\_FILE\_\_, \_\_LINE\_\_) |
| define | RAYX_VERB [**rayx::Verb**](structrayx_1_1Verb.md)(\_\_FILE\_\_, \_\_LINE\_\_) |
| define | RAYX_WARN [**rayx::Warn**](structrayx_1_1Warn.md)(\_\_FILE\_\_, \_\_LINE\_\_) |
| define | STRING (s) #s |
| define | X (type, name, flag) insert(formatAsVec(rays.name)); |
Macro Definition Documentation¶
define RAYX_DBG¶
define RAYX_DEBUG¶
For quick debugging prints, this file further exposes RAYX_DBG(x).
This file mostly exposes the RAYX_LOG, RAYX_VERB, RAYX_WARN and RAYX_EXIT macros. We mostly use these macros instead of std::cout / std::cerr for convenience reasons. These macros automatically generate a newline at the end, and also print file and line number from where the print originated. RAYX_LOG, RAYX_VERB prints to std::cout, whereas RAYX_WARN and RAYX_EXIT are printed in red and go to std::cerr. RAYX_VERB is used for "verbose" prints, they can be activated and deactivated using the setDebugVerbose function. Finally RAYX_EXIT is to be used for fatal errors, calling it will automatically terminate the program by calling the configurable error_fn defined below.
Each of these variants also has a "debug-only" variant, that gets deactivated in the release mode. The "debug-only" variant is prefixed by "RAYX_D_" instead of "RAYX_". For example the "debug-only" RAYX_LOG would be RAYX_D_LOG.
define RAYX_D_ERR¶
define RAYX_D_LOG¶
define RAYX_D_VERB¶
define RAYX_D_WARN¶
define RAYX_EXIT¶
define RAYX_LOG¶
define RAYX_VERB¶
define RAYX_WARN¶
define STRING¶
define X¶
The documentation for this class was generated from the following file Intern/rayx-core/src/Debug/Debug.h