This struct is used to format caller information provided with type CallerInfo.
Besides using method Format "manually", instances of type CallerInfo may be passed as arguments to type FormatterPythonStyle using the according placeholder syntax. If done, internally an instance of this type is created and its Format method called.
Definition at line 34 of file fmtcallerinfo.hpp.
#include <fmtcallerinfo.hpp>
Public Field Index: | |
const lang::CallerInfo & | ci |
The wrapped caller information. | |
Public Method Index: | |
ALIB_API AString & | Format (Substring format, AString &target, lang::CurrentData targetData=lang::CurrentData::Keep) const |
const lang::CallerInfo& ci |
The wrapped caller information.
Definition at line 36 of file fmtcallerinfo.hpp.
AString & Format | ( | Substring | format, |
AString & | target, | ||
lang::CurrentData | targetData = lang::CurrentData::Keep ) const |
Formats the wrapped caller information using a given pattern string. Within the pattern string, different symbols are interpreted as tokens.
Strings within the format text that should not be interpreted as tokens may be given in single quotes. Two consecutive single quotes will be replaced to one single quote.
The following tokens are supported:
sf | Prints the source file name. |
sl | Prints the line number in the source file. |
sm | Prints the function or method name in the source file. |
tn | Prints the ALib tread name. If no thread is set, the string "<None>" is written, which is resourced with "FMTCINT". |
ti | Prints the ALib tread ID. If no thread is set, the string "<Null>" is written, which is resourced with "FMTCINR". |
tc | Prints the native tread ID of type std::thread::id in hexadecimal format. If no thread is set, this value is 0 . |
ta | Prints a combination of 'tn', 'ti', and 'tc'. |
yf | Prints the full type name. If the CallerInfo does originate a static or global function, the string "<None>" is written, which is resourced with "FMTCINY". (With release-builds, nothing is printed.) |
yn | Prints shortened type name generated with DbgTypeDemangler::GetShort, otherwise like 'yf'. |
ya | Like 'sm' but in case the CallerInfo originates from a non-static member function, the shortened type name and "::" are prepended. (With release-builds, nothing is printed.) |
format | The format pattern string. |
target | A reference to an AString that gets the result of the format processing appended. |
targetData | If CurrentData::Keep (the default) the string is appended to target. if CurrentData::Clear , target is cleared. |
Definition at line 36 of file fmtcallerinfo.cpp.