Parameterized Functor which parses and formats GCC call stack so that they are human readable. More...
#include <uhal/log/GccOutputCleaner.hpp>
Public Member Functions | |
| GccOutputCleaner (const uint32_t &aIndent=2, std::string(*aStyling)(const uint32_t &)=&GccOutputCleaner::SquareBracketStyle) | |
| Constructor. More... | |
| virtual | ~GccOutputCleaner () |
| Destructor. More... | |
| std::string | operator() (const std::string &aStr) |
| Functor implementation. More... | |
Static Public Member Functions | |
| static std::string | SquareBracketStyle (const uint32_t &aIndex) |
| Wrap the type-substitution index in square braces. More... | |
| static std::string | HashStyle (const uint32_t &aIndex) |
Prefix the type-substitution index with a # More... | |
| static std::string | TStyle (const uint32_t &aIndex) |
Prefix the type-substitution index with a T More... | |
Private Member Functions | |
| uint32_t | RecursiveClean (std::string::const_iterator aIt, std::string::const_iterator aEnd) |
| Recursively perform sub-term extraction from the string. More... | |
Private Attributes | |
| std::vector< std::string > | mTypes |
| A vector of known types, the position of which into this list becomes the substitution index. More... | |
| std::string | mIndent |
| The number of spaces by which to indent the lines. More... | |
| std::string(* | mStyling )(const uint32_t &) |
| The functor for styling the type-substitution index. More... | |
Parameterized Functor which parses and formats GCC call stack so that they are human readable.
It does this by substituting every template parameter and argument with an integer and then printing this across multiple lines
Definition at line 50 of file GccOutputCleaner.hpp.
| GccOutputCleaner::GccOutputCleaner | ( | const uint32_t & | aIndent = 2, |
| std::string(*)(const uint32_t &) | aStyling = &GccOutputCleaner::SquareBracketStyle |
||
| ) |
Constructor.
| aIndent | the number of spaces ahead of the formatted input |
| aStyling | functor which formats numbers to strings and which is used to format type substitutions |
Definition at line 61 of file GccOutputCleaner.cpp.
References mTypes.
|
virtual |
Destructor.
Definition at line 66 of file GccOutputCleaner.cpp.
|
static |
Prefix the type-substitution index with a #
| aIndex | a type-substitution index to prefix |
Definition at line 47 of file GccOutputCleaner.cpp.
| std::string GccOutputCleaner::operator() | ( | const std::string & | aStr | ) |
Functor implementation.
| aStr | A string containing a GCC call stack to format |
Definition at line 69 of file GccOutputCleaner.cpp.
References mIndent, mTypes, and RecursiveClean().
|
private |
Recursively perform sub-term extraction from the string.
| aIt | the starting point for the current extraction |
| aEnd | the end-point for the current extraction |
Definition at line 87 of file GccOutputCleaner.cpp.
References mTypes.
Referenced by operator()().
|
static |
Wrap the type-substitution index in square braces.
| aIndex | a type-substitution index to wrap |
Definition at line 40 of file GccOutputCleaner.cpp.
|
static |
Prefix the type-substitution index with a T
| aIndex | a type-substitution index to prefix |
Definition at line 54 of file GccOutputCleaner.cpp.
Referenced by uhal::exception::exception::what().
|
private |
The number of spaces by which to indent the lines.
Definition at line 96 of file GccOutputCleaner.hpp.
Referenced by operator()().
|
private |
The functor for styling the type-substitution index.
Definition at line 98 of file GccOutputCleaner.hpp.
|
private |
A vector of known types, the position of which into this list becomes the substitution index.
Definition at line 94 of file GccOutputCleaner.hpp.
Referenced by GccOutputCleaner(), operator()(), and RecursiveClean().
1.8.13