ROSE
0.11.96.11
|
Information printed at the beginning of each free-format message.
#include <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. More... | |
void | setStartTime () |
Reset the start time from operating system information. More... | |
virtual std::string | toString (const Mesg &, const MesgProps &) const |
Return a prefix string. More... | |
const ColorSet & | colorSet () const |
Property: colors to use for the prefix if coloring is enabled. More... | |
ColorSet & | colorSet () |
Property: colors to use for the prefix if coloring is enabled. More... | |
const Optional< std::string > & | programName () const |
Property: program name. More... | |
PrefixPtr | programName (const std::string &s) |
Property: program name. More... | |
bool | showProgramName () const |
Property: whether to show the program name in the message prefix area. More... | |
PrefixPtr | showProgramName (bool b) |
Property: whether to show the program name in the message prefix area. More... | |
bool | showThreadId () const |
Property: whether to show the thread ID in the message prefix area. More... | |
PrefixPtr | showThreadId (bool b) |
Property: whether to show the thread ID in the message prefix area. More... | |
const Optional< double > | startTime () const |
Property: start time when emitting time deltas. More... | |
PrefixPtr | startTime (double t) |
Property: start time when emitting time deltas. More... | |
bool | showElapsedTime () const |
Property: whether to show time deltas. More... | |
PrefixPtr | showElapsedTime (bool b) |
Property: whether to show time deltas. More... | |
When | showFacilityName () const |
Property: whether to show the facilityName property. More... | |
PrefixPtr | showFacilityName (When w) |
Property: whether to show the facilityName property. More... | |
bool | showImportance () const |
Property: whether to show the importance property. More... | |
PrefixPtr | showImportance (bool b) |
Property: whether to show the importance property. More... | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. More... | |
SharedObject (const SharedObject &) | |
Copy constructor. More... | |
virtual | ~SharedObject () |
Virtual destructor. More... | |
SharedObject & | operator= (const SharedObject &) |
Assignment. More... | |
Public Member Functions inherited from Sawyer::SharedFromThis< Prefix > | |
SharedPointer< Prefix > | sharedFromThis () |
Create a shared pointer from this . More... | |
SharedPointer< const Prefix > | sharedFromThis () const |
Create a shared pointer from this . More... | |
Static Public Member Functions | |
static PrefixPtr | instance () |
Allocating constructor. More... | |
static PrefixPtr | silentInstance () |
Construct a prefix that is silent. More... | |
Protected Member Functions | |
Prefix () | |
Constructor for derived classes. More... | |
|
inlineprotected |
Constructor for derived classes.
Non-subclass users should use instance instead.
Definition at line 1011 of file Message.h.
References Sawyer::Message::ColorSet::fullColor().
|
inlinestatic |
Allocating constructor.
Creates a new prefix instance and returns a pointer to it. The new object is initialized with information about the thread that created it, such as program name, thread ID, time of creation, etc.
Definition at line 1024 of file Message.h.
Referenced by Sawyer::Message::UnformattedSink::UnformattedSink().
|
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.