|
BDE 4.39.x Production Release
|
Provide category related callback function types.
Provide category related callback function types.
This component provides a namespace for category related callback function types. CategoryCallbacks::NameFilter is used to translate external category names to internal names, while CategoryCallbacks::DefaultThresholdLevels is used to determine default threshold levels for new categories.
This section illustrates intended use of this component.
In this example, we demonstrate how to use the NameFilter callback type to translate category names. Suppose we want to add a prefix to all category names:
First, we define a function that implements the name filtering logic:
Then, we create a NameFilter object and assign our function to it:
Now, we can use the filter to transform category names:
In this example, we demonstrate how to use the DefaultThresholdLevels callback type to set default threshold levels for categories.
First, we define a function that implements the threshold level logic. In this example, we provide more verbose logging for categories starting with "CORE":
Then, we create a DefaultThresholdLevels object and assign our function to it:
Finally, we can use the callback to obtain threshold levels: