setCategory overloads

Synopses

Declared in <ball_categorymanager.h>

Add to this category registry a new category having the specified categoryName, possibly changed by the registered category name filter callback, and default threshold levels if (the possibly filtered) categoryName is not present in the registry and the number of categories in the registry is less than the registry capacity. Return the address of the (possibly newly‐created) non‐modifiable category having (the possibly filtered) categoryName, if such a category exists, and the address of the non‐modifiable Default Category otherwise. The behavior is undefined unless categoryName is null‐terminated. Note that a valid category address is always returned.

Category const*
setCategory(char const* categoryName);

Add to this category registry a new category having the specified categoryName, possibly changed by the registered category name filter callback, and default threshold levels if (the possibly filtered) categoryName is not present in the registry and the number of categories in the registry is less than the registry capacity. Return the address of the (possibly newly‐created) non‐modifiable category having (the possibly filtered) categoryName, if such a category exists, and the address of the non‐modifiable Default Category otherwise. If the specified categoryHolder is non‐null, then also load into categoryHolder the returned category and its maximum level and link categoryHolder to the category if it has not yet been linked. The behavior is undefined unless categoryName is null‐terminated. Note that a valid category address is always returned.

Category const*
setCategory(
    CategoryHolder* categoryHolder,
    char const* categoryName);

Add to this category registry a new category having the specified categoryName, possibly changed by the registered category name filter callback, and having recordLevel, passLevel, triggerLevel, and triggerAllLevel threshold levels, respectively, if (1) (the possibly filtered) categoryName is not present in the registry, (2) the number of categories in the registry is less than the registry capacity, and (3) recordLevel, passLevel, triggerLevel, and triggerAllLevel are all within the range [0 .. 255]. If (the possibly filtered) categoryName is already present and each threshold level is within the valid range then reset the threshold levels of (the possibly filtered) categoryName to the specified values. Return the address of the (possibly newly‐created) modifiable category having (the possibly filtered) categoryName if that categoryName was either created or its thresholds reset, and 0 otherwise. The behavior is undefined unless categoryName is null‐terminated. Note that 0, and not the Default Category, is returned on failure.

Category*
setCategory(
    char const* categoryName,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);

Created with MrDocs