Precompiler macros.
More...
#include "TBTK/Streams.h"
#include <chrono>
#include <cstring>
#include <ctime>
#include <sstream>
#include <string>
Go to the source code of this file.
|
#define | TBTK_VERSION_STRING |
|
#define | TBTK_ABOUT_STRING |
|
#define | TBTK_RUNTIME_CONTEXT_STRING |
|
#define | TBTKAssert(expression, function, message, hint) |
|
#define | TBTKExceptionAssert(expression, exception) |
|
#define | TBTKExit(function, message, hint) |
|
#define | TBTKNotYetImplemented(function) |
|
#define | TBTKReadableCodeBlock(code) ; |
|
#define | TBTKWhere std::string(__FILE__) + ", " + std::to_string(__LINE__) |
|
|
std::string | TBTK_GET_CURRENT_TIME_STRING () |
|
Precompiler macros.
- Author
- Kristofer Björnson
◆ TBTK_ABOUT_STRING
#define TBTK_ABOUT_STRING |
Value: "TBTK\n" \
"Version:\t" + TBTK_VERSION_STRING + "\n" \
"Git hash:\t" TBTK_VERSION_GIT_HASH
◆ TBTK_RUNTIME_CONTEXT_STRING
#define TBTK_RUNTIME_CONTEXT_STRING |
Value: TBTK_ABOUT_STRING + "\n" \
+ "Date:\t" + TBTK_GET_CURRENT_TIME_STRING()
◆ TBTK_VERSION_STRING
#define TBTK_VERSION_STRING |
Value: std::to_string(TBTK_VERSION_MAJOR) + "." \
+ std::to_string(TBTK_VERSION_MINOR) + "." \
+ std::to_string(TBTK_VERSION_PATCH)
◆ TBTKAssert
#define TBTKAssert |
( |
|
expression, |
|
|
|
function, |
|
|
|
message, |
|
|
|
hint |
|
) |
| |
Value:
std::stringstream hintStream; \
hintStream << hint; \
if(std::strcmp(hintStream.str().c_str(),
"") != 0)
\
exit(1); \
}
◆ TBTKExceptionAssert
#define TBTKExceptionAssert |
( |
|
expression, |
|
|
|
exception |
|
) |
| |
Value: if(!(expression)) \
throw exception;
◆ TBTKExit
#define TBTKExit |
( |
|
function, |
|
|
|
message, |
|
|
|
hint |
|
) |
| |
Value:
std::stringstream hintStream; \
hintStream << hint; \
if(std::strcmp(hintStream.str().c_str(),
"") != 0)
\
exit(1);
◆ TBTKNotYetImplemented
#define TBTKNotYetImplemented |
( |
|
function | ) |
|