BDE 4.14.0 Production release
Loading...
Searching...
No Matches
ball::LoggerManagerDefaults Class Reference

#include <ball_loggermanagerdefaults.h>

Public Member Functions

 LoggerManagerDefaults ()
 
 LoggerManagerDefaults (const LoggerManagerDefaults &original)
 
 ~LoggerManagerDefaults ()
 
LoggerManagerDefaultsoperator= (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 &)
 

Detailed Description

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.

See ball_loggermanagerdefaults

Constructor & Destructor Documentation

◆ LoggerManagerDefaults() [1/2]

ball::LoggerManagerDefaults::LoggerManagerDefaults ( )

Create a logger manager default-values constrained-attribute object having valid default values for all attributes.

◆ LoggerManagerDefaults() [2/2]

ball::LoggerManagerDefaults::LoggerManagerDefaults ( const LoggerManagerDefaults original)

Create a logger manager default-values constrained-attribute object having the value of the specified original object.

◆ ~LoggerManagerDefaults()

ball::LoggerManagerDefaults::~LoggerManagerDefaults ( )

Destroy this logger manager default-values constrained-attribute object.

Member Function Documentation

◆ areValidDefaultThresholdLevels()

static bool ball::LoggerManagerDefaults::areValidDefaultThresholdLevels ( int  recordLevel,
int  passLevel,
int  triggerLevel,
int  triggerAllLevel 
)
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].

◆ defaultDefaultLoggerBufferSize()

static int ball::LoggerManagerDefaults::defaultDefaultLoggerBufferSize ( )
static

Return the implementation-defined default logger-message-buffer size value for this class.

◆ defaultDefaultPassLevel()

static int ball::LoggerManagerDefaults::defaultDefaultPassLevel ( )
static

Return the implementation-defined default pass threshold level value for this class.

◆ defaultDefaultRecordBufferSize()

static int ball::LoggerManagerDefaults::defaultDefaultRecordBufferSize ( )
static

Return the implementation-defined default-logger record-buffer size value for this class.

◆ defaultDefaultRecordLevel()

static int ball::LoggerManagerDefaults::defaultDefaultRecordLevel ( )
static

Return the implementation-defined default record threshold level value for this class.

◆ defaultDefaultTriggerAllLevel()

static int ball::LoggerManagerDefaults::defaultDefaultTriggerAllLevel ( )
static

Return the implementation-defined default trigger-all threshold value for this class.

◆ defaultDefaultTriggerLevel()

static int ball::LoggerManagerDefaults::defaultDefaultTriggerLevel ( )
static

Return the implementation-defined default trigger threshold level value for this class.

◆ defaultLoggerBufferSize()

int ball::LoggerManagerDefaults::defaultLoggerBufferSize ( ) const

Return the default logger-message-buffer size attribute of this object.

◆ defaultPassLevel()

int ball::LoggerManagerDefaults::defaultPassLevel ( ) const

◆ defaultRecordBufferSize()

int ball::LoggerManagerDefaults::defaultRecordBufferSize ( ) const

Return the default-logger record-buffer size attribute of this object.

◆ defaultRecordLevel()

int ball::LoggerManagerDefaults::defaultRecordLevel ( ) const

◆ defaultTriggerAllLevel()

int ball::LoggerManagerDefaults::defaultTriggerAllLevel ( ) const

Return the default trigger-all threshold level attribute of this object.

◆ defaultTriggerLevel()

int ball::LoggerManagerDefaults::defaultTriggerLevel ( ) const

◆ isValidDefaultLoggerBufferSize()

static bool ball::LoggerManagerDefaults::isValidDefaultLoggerBufferSize ( int  numBytes)
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.

◆ isValidDefaultRecordBufferSize()

static bool ball::LoggerManagerDefaults::isValidDefaultRecordBufferSize ( int  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.

◆ operator=()

LoggerManagerDefaults & ball::LoggerManagerDefaults::operator= ( const LoggerManagerDefaults rhs)

Assign to this logger manager default-values constrained-attribute object the value of the specified rhs object.

◆ print()

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.

◆ setDefaultLoggerBufferSizeIfValid()

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.

◆ setDefaultRecordBufferSizeIfValid()

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.

◆ setDefaultThresholdLevelsIfValid() [1/2]

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.

◆ setDefaultThresholdLevelsIfValid() [2/2]

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.

Friends And Related Symbol Documentation

◆ operator<<

bsl::ostream & operator<< ( bsl::ostream &  ,
const LoggerManagerDefaults  
)
friend

Write the specified defaults object to the specified output stream in a reasonable multi-line format.

◆ operator==

bool operator== ( const LoggerManagerDefaults ,
const LoggerManagerDefaults  
)
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.


The documentation for this class was generated from the following file: