ROSE 0.11.145.192
|
Information printed at the beginning of each free-format message.
#include <Sawyer/Message.h>
Public Types | |
enum | When { NEVER =0 , SOMETIMES =1 , ALWAYS =2 } |
When to show something. More... | |
Public Member Functions | |
void | setProgramName () |
Reset the program name from operating system information. | |
void | setStartTime () |
Reset the start time from operating system information. | |
virtual std::string | toString (const Mesg &, const MesgProps &) const |
Return a prefix string. | |
const ColorSet & | colorSet () const |
Property: colors to use for the prefix if coloring is enabled. | |
ColorSet & | colorSet () |
Property: colors to use for the prefix if coloring is enabled. | |
const Optional< std::string > & | programName () const |
Property: program name. | |
PrefixPtr | programName (const std::string &s) |
Property: program name. | |
bool | showProgramName () const |
Property: whether to show the program name in the message prefix area. | |
PrefixPtr | showProgramName (bool b) |
Property: whether to show the program name in the message prefix area. | |
bool | showThreadId () const |
Property: whether to show the thread ID in the message prefix area. | |
PrefixPtr | showThreadId (bool b) |
Property: whether to show the thread ID in the message prefix area. | |
const Optional< double > | startTime () const |
Property: start time when emitting time deltas. | |
PrefixPtr | startTime (double t) |
Property: start time when emitting time deltas. | |
bool | showElapsedTime () const |
Property: whether to show time deltas. | |
PrefixPtr | showElapsedTime (bool b) |
Property: whether to show time deltas. | |
When | showFacilityName () const |
Property: whether to show the facilityName property. | |
PrefixPtr | showFacilityName (When w) |
Property: whether to show the facilityName property. | |
bool | showImportance () const |
Property: whether to show the importance property. | |
PrefixPtr | showImportance (bool b) |
Property: whether to show the importance property. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Public Member Functions inherited from Sawyer::SharedFromThis< Prefix > | |
SharedPointer< Prefix > | sharedFromThis () |
Create a shared pointer from this . | |
SharedPointer< const Prefix > | sharedFromThis () const |
Create a shared pointer from this . | |
Static Public Member Functions | |
static PrefixPtr | instance () |
Allocating constructor. | |
static PrefixPtr | silentInstance () |
Construct a prefix that is silent. | |
Protected Member Functions | |
Prefix () | |
Constructor for derived classes. | |
|
inlineprotected |
|
inlinevirtual |
|
inlinestatic |
|
static |
Construct a prefix that is silent.
Constructs a prefix whose output properties are all false, thus producing no output.
|
inline |
|
inline |
|
inline |
Property: program name.
The default is the base name of the file that was executed. An "lt-" prefix is removed from the base name since this is typically added by libtool and doesn't correspond to the name that the user executed.
Thread safety: Not thread safe.
|
inline |
Property: program name.
The default is the base name of the file that was executed. An "lt-" prefix is removed from the base name since this is typically added by libtool and doesn't correspond to the name that the user executed.
Thread safety: Not thread safe.
void Sawyer::Message::Prefix::setProgramName | ( | ) |
Reset the program name from operating system information.
Thread safety: This method is thread-safe.
|
inline |
Property: whether to show the program name in the message prefix area.
The default is true.
Thread safety: This method is not thread-safe.
|
inline |
Property: whether to show the program name in the message prefix area.
The default is true.
Thread safety: This method is not thread-safe.
|
inline |
|
inline |
const Optional< double > Sawyer::Message::Prefix::startTime | ( | ) | const |
Property: start time when emitting time deltas.
On some systems the start time will be the time at which this object was created.
Thread safety: This method is not thread-safe.
PrefixPtr Sawyer::Message::Prefix::startTime | ( | double | t | ) |
Property: start time when emitting time deltas.
On some systems the start time will be the time at which this object was created.
Thread safety: This method is not thread-safe.
void Sawyer::Message::Prefix::setStartTime | ( | ) |
Reset the start time from operating system information.
On some systems this will be the time at which the first prefix object was created rather than the time the operating system created the main process.
Thread safety: This method is not thread-safe.
|
inline |
Property: whether to show time deltas.
Time deltas are displayed as fractional seconds since some starting time.
Thread safety: This method is not thread-safe.
|
inline |
Property: whether to show time deltas.
Time deltas are displayed as fractional seconds since some starting time.
Thread safety: This method is not thread-safe.
|
inline |
Property: whether to show the facilityName property.
When set to SOMETIMES, the facility name is shown when it differs from the program name and the program name has been shown. In any case, the facility name is not shown if it has no value.
Thread safety: This method is not thread-safe.
Property: whether to show the facilityName property.
When set to SOMETIMES, the facility name is shown when it differs from the program name and the program name has been shown. In any case, the facility name is not shown if it has no value.
Thread safety: This method is not thread-safe.
|
inline |
|
inline |
|
virtual |
Return a prefix string.
Generates a string from this prefix object.
Thread safety: This method is not thread-safe.