|
#define | LODWORD32(l) ((DWORD32)(((ULONG64)(l)) & 0xffffffff)) |
|
#define | HIDWORD32(l) ((DWORD32)((((ULONG64)(l)) >> 32) & 0xffffffff)) |
|
#define | DBOUT(s) |
|
|
template<class T > |
T | Signum (const T &_v) |
|
template<class Interface > |
void | SafeRelease (Interface **ppInterfaceToRelease) |
|
void | scope::ScopeExceptionHandler (const std::string &_origin, const bool &_log=true, const bool &_showmessagebox=false, const bool &_trace=true, const bool &_rethrow=false) |
|
void | scope::__ScopeExceptionHandlerHelper (const std::string &_msg, const bool &_log, const bool &_showmessagebox, const bool &_trace) |
|
void | scope::__ScopeExceptionHandlerHelperW (const std::wstring &_msg, const bool &_log, const bool &_showmessagebox, const bool &_trace) |
|
|
For convenience, round double to whatever
|
double | round (const double &v) |
|
uint64_t | round2ui64 (const double &v) |
|
uint32_t | round2ui32 (const double &v) |
|
uint16_t | round2ui16 (const double &v) |
|
uint8_t | round2ui8 (const double &v) |
|
int64_t | round2i64 (const double &v) |
|
int32_t | round2i32 (const double &v) |
|
int16_t | round2i16 (const double &v) |
|
int8_t | round2i8 (const double &v) |
|
template<class T > |
T | round2 (const double &v) |
|
Contains various classes and functions.
#define LODWORD32 |
( |
|
l | ) |
((DWORD32)(((ULONG64)(l)) & 0xffffffff)) |
Extracts low dword (32 bits) from an ULONG64 (64 bits)
Definition at line 19 of file helpers.h.
#define HIDWORD32 |
( |
|
l | ) |
((DWORD32)((((ULONG64)(l)) >> 32) & 0xffffffff)) |
Extracts high dword (32 bits) from an ULONG64 (64 bits)
Definition at line 21 of file helpers.h.
A debug output to the debug console.
Definition at line 153 of file helpers.h.
- Returns
- +1 for positive T, -1 for negative T
Definition at line 16 of file helpers.h.
template<class Interface >
void SafeRelease |
( |
Interface ** |
ppInterfaceToRelease | ) |
|
A safe release for COM objects.
Definition at line 25 of file helpers.h.
std::wstring GetCurrentDateString |
( |
| ) |
|
- Returns
- string with the current date in format YYYY-MM-DD
Definition at line 4 of file helpers.cpp.
std::wstring GetCurrentTimeString |
( |
const bool & |
_filenamecompatible = true | ) |
|
- Parameters
-
[in] | _filenamecompatible | true for compatiblity with file name, returns . instead of : (whichis required by ISO standard) |
- Returns
- string with current time in format HH:MM:SS
Definition at line 12 of file helpers.cpp.
void scope::ScopeExceptionHandler |
( |
const std::string & |
_origin, |
|
|
const bool & |
_log = true , |
|
|
const bool & |
_showmessagebox = false , |
|
|
const bool & |
_trace = true , |
|
|
const bool & |
_rethrow = false |
|
) |
| |
Handles all exceptions and does nice logging.
- Parameters
-
[in] | _origin | string with the origin of the exception |
[in] | _log | true for logging to the ScopeLogger |
[in] | _showmessagebox | true for displaying a Windows message box with a warning text |
[in] | _trace | true for debug output |
[in] | _rethrow | true to rethrow the exception after handling in here |
Definition at line 8 of file ScopeException.cpp.
void scope::__ScopeExceptionHandlerHelper |
( |
const std::string & |
_msg, |
|
|
const bool & |
_log, |
|
|
const bool & |
_showmessagebox, |
|
|
const bool & |
_trace |
|
) |
| |
Helper function that actually handles the logging to the ScopeLogger.
- Parameters
-
[in] | _msg | string with the exception's message |
[in] | _log | true for logging to the ScopeLogger |
[in] | _showmessagebox | true for displaying a Windows message box with a warning text |
[in] | _trace | true for debug output |
Definition at line 55 of file ScopeException.cpp.
void scope::__ScopeExceptionHandlerHelperW |
( |
const std::wstring & |
_msg, |
|
|
const bool & |
_log, |
|
|
const bool & |
_showmessagebox, |
|
|
const bool & |
_trace |
|
) |
| |
Helper function that actually handles the logging to the ScopeLogger (wide string version)
- Parameters
-
[in] | _msg | string with the exception's message |
[in] | _log | true for logging to the ScopeLogger |
[in] | _showmessagebox | true for displaying a Windows message box with a warning text |
[in] | _trace | true for debug output |
Definition at line 69 of file ScopeException.cpp.