Pcannon Debug 1.0.0-build
Simple yet powerful debug manager for C++
Loading...
Searching...
No Matches
macros.hpp File Reference

Go to the source code of this file.

Macros

#define PD_DEBUGLOG(_logger, _type, _msg)
 Debug log with file and line output capabilities using pd::Debug for debugging Output it to the standard output.
#define PD_DEV   true
#define PD_SIMPLE_DEBUGLOG(_type, _msg)
 Simple debug log with file and line output capabilities with fully custom message without any setting needed Output it to the standard output.
#define PD_STRINGIFY(x)
#define PD_TOSTRING(x)
#define PD_VERSION   ((PD_VERSION_MAJOR<<16)|(STT_VERSION_MINOR<<8)|(STT_VERSION_PATCH)|(STT_VERSION_STATE << 24))
#define PD_VERSION_CHECK(PD_VERSION_MAJOR, PD_VERSION_MINOR, PD_VERSION_PATCH, PD_VERSION_STATE)
#define PD_VERSION_MAJOR   1
#define PD_VERSION_MINOR   0
#define PD_VERSION_PATCH   0
#define PD_VERSION_STATE   "build"

Macro Definition Documentation

◆ PD_DEBUGLOG

#define PD_DEBUGLOG ( _logger,
_type,
_msg )
Value:
_logger.log(_type, std::string(std::string(__FILE__) + ":" + std::to_string(__LINE__) + " " + _msg), 0)

Debug log with file and line output capabilities using pd::Debug for debugging Output it to the standard output.

Parameters
_loggerSet the logger for pd::Debug capabilities
_typeSet the type of the log (Ex: Information, Warning, Successs, Error, ...)
_msgSet the message to log

Definition at line 25 of file macros.hpp.

25#define PD_DEBUGLOG(_logger, _type, _msg) \
26 _logger.log(_type, std::string(std::string(__FILE__) + ":" + std::to_string(__LINE__) + " " + _msg), 0)

◆ PD_DEV

#define PD_DEV   true

Definition at line 42 of file macros.hpp.

◆ PD_SIMPLE_DEBUGLOG

#define PD_SIMPLE_DEBUGLOG ( _type,
_msg )
Value:
std::cout << _type << " [" << std::string(std::string(__FILE__) + ":" + std::to_string(__LINE__)) << "] " << _msg << "\n";

Simple debug log with file and line output capabilities with fully custom message without any setting needed Output it to the standard output.

Parameters
_typeSet the type of the log (Ex: Information, Warning, Successs, Error, ...)
_msgSet the message to log

Definition at line 34 of file macros.hpp.

34#define PD_SIMPLE_DEBUGLOG(_type, _msg) \
35 std::cout << _type << " [" << std::string(std::string(__FILE__) + ":" + std::to_string(__LINE__)) << "] " << _msg << "\n";

◆ PD_STRINGIFY

#define PD_STRINGIFY ( x)
Value:
#x

Definition at line 38 of file macros.hpp.

◆ PD_TOSTRING

#define PD_TOSTRING ( x)
Value:
#define PD_STRINGIFY(x)
Definition macros.hpp:38

Definition at line 39 of file macros.hpp.

◆ PD_VERSION

#define PD_VERSION   ((PD_VERSION_MAJOR<<16)|(STT_VERSION_MINOR<<8)|(STT_VERSION_PATCH)|(STT_VERSION_STATE << 24))

Definition at line 13 of file macros.hpp.

◆ PD_VERSION_CHECK

Value:
((PD_VERSION_MAJOR<<16)|(PD_VERSION_MINOR<<8)|(PD_VERSION_PATCH)|(STT_VERSION_STATE << 24))
#define PD_VERSION_MAJOR
Definition macros.hpp:4
#define PD_VERSION_MINOR
Definition macros.hpp:5
#define PD_VERSION_PATCH
Definition macros.hpp:6

Definition at line 15 of file macros.hpp.

15#define PD_VERSION_CHECK(PD_VERSION_MAJOR, PD_VERSION_MINOR, PD_VERSION_PATCH, PD_VERSION_STATE) \
16 ((PD_VERSION_MAJOR<<16)|(PD_VERSION_MINOR<<8)|(PD_VERSION_PATCH)|(STT_VERSION_STATE << 24))

◆ PD_VERSION_MAJOR

#define PD_VERSION_MAJOR   1

Definition at line 4 of file macros.hpp.

◆ PD_VERSION_MINOR

#define PD_VERSION_MINOR   0

Definition at line 5 of file macros.hpp.

◆ PD_VERSION_PATCH

#define PD_VERSION_PATCH   0

Definition at line 6 of file macros.hpp.

◆ PD_VERSION_STATE

#define PD_VERSION_STATE   "build"

Definition at line 11 of file macros.hpp.