|
BDE 4.39.x Production Release
|
Provide default threshold values.
Provide default threshold values.
This component provides a namespace for the 4 default threshold level constants.
This section illustrates intended use of this component.
The following example demonstrates how to access the default threshold values provided by 'ball::ThresholdDefaults'.
Suppose we are implementing a function that initializes threshold levels for a logging system. We can use the constants provided by 'ball::ThresholdDefaults' to supply reasonable default values:
Then, we can call this function and verify it sets the values correctly:
Finally, the default values provide a reasonable starting configuration where 'k_RECORD_LEVEL' (e_OFF, 0) disables recording of messages to memory, 'k_PASS_LEVEL' (e_ERROR, 64) passes only ERROR level messages and above, 'k_TRIGGER_LEVEL' (e_OFF, 0) disables trigger of publication on single message, and 'k_TRIGGER_ALL_LEVEL' (e_OFF, 0) disables trigger of publication on all messages: