BDE 4.14.0 Production release
|
#include <ball_loggermanagerdefaults.h>
Public Member Functions | |
LoggerManagerDefaults () | |
LoggerManagerDefaults (const LoggerManagerDefaults &original) | |
~LoggerManagerDefaults () | |
LoggerManagerDefaults & | operator= (const LoggerManagerDefaults &rhs) |
int | setDefaultRecordBufferSizeIfValid (int numBytes) |
int | setDefaultLoggerBufferSizeIfValid (int numBytes) |
int | setDefaultThresholdLevelsIfValid (int passLevel) |
int | setDefaultThresholdLevelsIfValid (int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel) |
int | defaultRecordBufferSize () const |
int | defaultLoggerBufferSize () const |
int | defaultRecordLevel () const |
Return the default record threshold level attribute of this object. | |
int | defaultPassLevel () const |
Return the default pass threshold level attribute of this object. | |
int | defaultTriggerLevel () const |
Return the default trigger threshold level attribute of this object. | |
int | defaultTriggerAllLevel () const |
bsl::ostream & | print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const |
Static Public Member Functions | |
static bool | isValidDefaultRecordBufferSize (int numBytes) |
static bool | isValidDefaultLoggerBufferSize (int numBytes) |
static bool | areValidDefaultThresholdLevels (int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel) |
static int | defaultDefaultRecordBufferSize () |
static int | defaultDefaultLoggerBufferSize () |
static int | defaultDefaultRecordLevel () |
static int | defaultDefaultPassLevel () |
static int | defaultDefaultTriggerLevel () |
static int | defaultDefaultTriggerAllLevel () |
Friends | |
bsl::ostream & | operator<< (bsl::ostream &, const LoggerManagerDefaults &) |
bool | operator== (const LoggerManagerDefaults &, const LoggerManagerDefaults &) |
This class provides constrained configuration parameters for a logger manager. The constraints are maintained as class invariants; it is not possible to obtain an invalid object through this interface.
More generally, this class supports a complete set of value semantic operations, including copy construction, assignment, equality comparison, ostream
printing. (A precise operational definition of when two instances have the same value can be found in the description of operator==
for the class.) This class is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre-existing instance, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.
ball::LoggerManagerDefaults::LoggerManagerDefaults | ( | ) |
Create a logger manager default-values constrained-attribute object having valid default values for all attributes.
ball::LoggerManagerDefaults::LoggerManagerDefaults | ( | const LoggerManagerDefaults & | original | ) |
Create a logger manager default-values constrained-attribute object having the value of the specified original
object.
ball::LoggerManagerDefaults::~LoggerManagerDefaults | ( | ) |
Destroy this logger manager default-values constrained-attribute object.
|
static |
Return true
if each of the specified recordLevel
, passLevel
, triggerLevel
, and triggerAllLevel
values is a valid default severity threshold level attributes, and false
otherwise. Valid severity threshold level values are in the range [0 .. 255]
.
|
static |
Return the implementation-defined default logger-message-buffer size value for this class.
|
static |
Return the implementation-defined default pass threshold level value for this class.
|
static |
Return the implementation-defined default-logger record-buffer size value for this class.
|
static |
Return the implementation-defined default record threshold level value for this class.
|
static |
Return the implementation-defined default trigger-all threshold value for this class.
|
static |
Return the implementation-defined default trigger threshold level value for this class.
int ball::LoggerManagerDefaults::defaultLoggerBufferSize | ( | ) | const |
Return the default logger-message-buffer size attribute of this object.
int ball::LoggerManagerDefaults::defaultPassLevel | ( | ) | const |
int ball::LoggerManagerDefaults::defaultRecordBufferSize | ( | ) | const |
Return the default-logger record-buffer size attribute of this object.
int ball::LoggerManagerDefaults::defaultRecordLevel | ( | ) | const |
int ball::LoggerManagerDefaults::defaultTriggerAllLevel | ( | ) | const |
Return the default trigger-all threshold level attribute of this object.
int ball::LoggerManagerDefaults::defaultTriggerLevel | ( | ) | const |
|
static |
Return true
if the specified numBytes
is a valid default logger-message-buffer size attribute, and false
otherwise. numBytes
is valid if 0 < numBytes.
|
static |
Return true
if the specified numBytes
is a valid default-logger record-buffer size attribute, and false
otherwise. numBytes
is valid if 0 < numBytes.
LoggerManagerDefaults & ball::LoggerManagerDefaults::operator= | ( | const LoggerManagerDefaults & | rhs | ) |
Assign to this logger manager default-values constrained-attribute object the value of the specified rhs
object.
bsl::ostream & ball::LoggerManagerDefaults::print | ( | bsl::ostream & | stream, |
int | level = 0 , |
||
int | spacesPerLevel = 4 |
||
) | const |
Format this object to the specified output stream
at the (absolute value of) the optionally specified indentation level
and return a reference to stream
. If level
is specified, optionally specify spacesPerLevel
, the number of spaces per indentation level for this and all of its nested objects. If level
is negative, suppress indentation of the first line. If spacesPerLevel
is negative, suppress all indentation AND format the entire output on one line. If stream
is not valid on entry, this operation has no effect.
int ball::LoggerManagerDefaults::setDefaultLoggerBufferSizeIfValid | ( | int | numBytes | ) |
Set the default logger-message-buffer size attribute of this object to the specified numBytes
if 0 < numBytes. Return 0 on success, and a non-zero value (with no effect on the state of this object) otherwise.
int ball::LoggerManagerDefaults::setDefaultRecordBufferSizeIfValid | ( | int | numBytes | ) |
Set the default-logger record-buffer size attribute of this object to the specified numBytes
if 0 < numBytes. Return 0 on success, and a non-zero value (with no effect on the state of this object) otherwise.
int ball::LoggerManagerDefaults::setDefaultThresholdLevelsIfValid | ( | int | passLevel | ) |
Set the pass-through severity threshold level attribute of the LoggerManagerDefaults
attribute of this object to the specified passLevel
, if it is in the range [0 .. 255]
, and set all the other threshold levels (recordLevel, triggerLevel, triggerAllLevel) to 0. Return 0 on success, and a non-zero value otherwise with no effect on this object.
int ball::LoggerManagerDefaults::setDefaultThresholdLevelsIfValid | ( | int | recordLevel, |
int | passLevel, | ||
int | triggerLevel, | ||
int | triggerAllLevel | ||
) |
Set the quadruplet of default severity threshold level attributes of this object to the specified recordLevel
, passLevel
, triggerLevel
, and triggerAllLevel
values if each level is in the range [0 .. 255]
. Return 0 on success, and a non-zero value (with no effect on the state of this object) otherwise.
|
friend |
Write the specified defaults
object to the specified output stream
in a reasonable multi-line format.
|
friend |
Return true
if the specified lhs
and rhs
attribute objects have the same value, and false
otherwise. Two attribute objects objects have the same value if each respective attribute has the same value.