|
LvArray
|
Contains functions that interact with the system or runtime environment. More...
Classes | |
| class | FloatingPointExceptionGuard |
| Changes the floating point environment and reverts it when destoyed. More... | |
Typedefs | |
| using | handle_type = void(*)(int) |
| An alias for a function that takes an int and returns nothing. | |
Functions | |
| std::string | stackTrace (bool const lineInfo) |
| Return a demangled stack trace of the last 25 frames. More... | |
| std::string | demangle (char const *const name) |
| std::string | calculateSize (size_t const bytes) |
| void | setErrorHandler (std::function< void() > const &handler) |
| Set the error handler called by LVARRAY_ERROR and others. More... | |
| void | callErrorHandler () |
| Call the error handler, by default this is std::abort. | |
| void | stackTraceHandler (int const sig, bool const exit) |
| Print signal information and a stack trace to standard out, optionally aborting. More... | |
| void | setSignalHandling (void(*handler)(int)) |
| Set the signal handler for common signals. More... | |
| void | resetSignalHandling () |
| Rest the signal handling back to the original state. | |
| int | getDefaultFloatingPointExceptions () |
| Get the default set of exceptions to check. More... | |
| int | enableFloatingPointExceptions (int const exceptions=getDefaultFloatingPointExceptions()) |
A wrapper around feenableexcept that work on OSX. More... | |
| int | disableFloatingPointExceptions (int const exceptions=getDefaultFloatingPointExceptions()) |
A wrapper around fedisableexcept that work on OSX. More... | |
| void | setFPE () |
| Sets the floating point environment. More... | |
| template<class T > | |
| std::string | demangleType () |
| template<class T > | |
| std::string | demangleType (T const &var) |
Variables | |
| static std::map< int, handle_type > | initialHandler |
| A map containing the initial signal handlers. | |
| std::function< void() > * | s_errorHandler = nullptr |
| A static pointer to the error handler. More... | |
Contains functions that interact with the system or runtime environment.
| std::string LvArray::system::calculateSize | ( | size_t const | bytes | ) |
bytes converted to either KB, MB, or GB. | bytes | The number of bytes. |
| std::string LvArray::system::demangle | ( | char const *const | name | ) |
name. | name | The mangled name. |
|
inline |
| T. | |
| T | The type to demangle. |
|
inline |
| T. | |
| T | The type of the object to demangle. |
| var | The variable to demangle the type of. |
| int LvArray::system::disableFloatingPointExceptions | ( | int const | exceptions = getDefaultFloatingPointExceptions() | ) |
A wrapper around fedisableexcept that work on OSX.
| exceptions | The set of floating point exceptions to disable. |
| int LvArray::system::enableFloatingPointExceptions | ( | int const | exceptions = getDefaultFloatingPointExceptions() | ) |
A wrapper around feenableexcept that work on OSX.
| exceptions | The set of floating point exceptions to enable. |
| int LvArray::system::getDefaultFloatingPointExceptions | ( | ) |
Get the default set of exceptions to check.
| void LvArray::system::setErrorHandler | ( | std::function< void() > const & | handler | ) |
Set the error handler called by LVARRAY_ERROR and others.
| handler | The error handler. |
| void LvArray::system::setFPE | ( | ) |
Sets the floating point environment.
Sets the floating point environment such that FE_DIVBYZERO, FE_OVERFLOW or FE_INVALID throw exceptions. Denormal numbers are flushed to zero.
| void LvArray::system::setSignalHandling | ( | void(*)(int) | handler | ) |
Set the signal handler for common signals.
| handler | The signal handler. |
| std::string LvArray::system::stackTrace | ( | bool const | lineInfo | ) |
Return a demangled stack trace of the last 25 frames.
| lineInfo | If true then file and line numbers will be added to the trace if available. This is only supported if LVARRAY_ADDR2LINE_EXEC is defined and normally only works in debug builds. |
| void LvArray::system::stackTraceHandler | ( | int const | sig, |
| bool const | exit | ||
| ) |
Print signal information and a stack trace to standard out, optionally aborting.
| sig | The signal received. |
| exit | If true abort execution. |
| std::function< void() >* LvArray::system::s_errorHandler = nullptr |
A static pointer to the error handler.
1.8.13