[#BloombergLP-ball-CategoryManager]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::CategoryManager
:relfileprefix: ../../
:mrdocs:

This class manages a registry of categories&period;

== Synopsis

Declared in `&lt;ball&lowbar;categorymanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CategoryManager;
----

== Description

This class manages a set (or &quot;registry&quot;) of categories&period; Categories may be added to the registry, but they cannot be removed&period; However, the threshold levels of existing categories may be accessed and modified directly&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CategoryManager/CategoryNameFilterCallback.adoc[`CategoryNameFilterCallback`] 
| `CategoryNameFilterCallback` is the type of the user&hyphen;supplied functor that translates external category names to internal names&period;
| xref:BloombergLP/ball/CategoryManager/DefaultThresholdLevelsCallback.adoc[`DefaultThresholdLevelsCallback`] 
| Functor type that computes default threshold levels for new categories&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CategoryManager/2constructor-00.adoc[`CategoryManager`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/ball/CategoryManager/2destructor.adoc[`&#126;CategoryManager`] [.small]#[destructor]#
| Destroy this category manager&period;
| xref:BloombergLP/ball/CategoryManager/addCategory-01.adoc[`addCategory`] 
| Add a category with the specified name and threshold levels&period;
| xref:BloombergLP/ball/CategoryManager/addCategoryHierarchically.adoc[`addCategoryHierarchically`] 
| Add a category inheriting thresholds from the longest matching prefix&period;
| xref:BloombergLP/ball/CategoryManager/addDefaultCategory.adoc[`addDefaultCategory`] 
| Add the default category if it has not already been added&period;
| xref:BloombergLP/ball/CategoryManager/addRule.adoc[`addRule`] 
| Add the specified rule to the unique rule set of this object&period;
| xref:BloombergLP/ball/CategoryManager/addRules.adoc[`addRules`] 
| Add each rule in `ruleSet` to the unique rule set of this object&period;
| xref:BloombergLP/ball/CategoryManager/defaultCategory-0c.adoc[`defaultCategory`] 
| `defaultCategory` overloads
| xref:BloombergLP/ball/CategoryManager/defaultPassThresholdLevel.adoc[`defaultPassThresholdLevel`] 
| Return the default pass threshold level of this object&period;
| xref:BloombergLP/ball/CategoryManager/defaultRecordThresholdLevel.adoc[`defaultRecordThresholdLevel`] 
| Return the default record threshold level of this object&period;
| xref:BloombergLP/ball/CategoryManager/defaultThresholdLevels.adoc[`defaultThresholdLevels`] 
| Return the default threshold levels associated with this object&period;
| xref:BloombergLP/ball/CategoryManager/defaultTriggerAllThresholdLevel.adoc[`defaultTriggerAllThresholdLevel`] 
| Return the default trigger&hyphen;all threshold level of this object&period;
| xref:BloombergLP/ball/CategoryManager/defaultTriggerThresholdLevel.adoc[`defaultTriggerThresholdLevel`] 
| Return the default trigger threshold level of this object&period;
| xref:BloombergLP/ball/CategoryManager/length.adoc[`length`] 
| Return the number of categories in the registry of this category manager&period;
| xref:BloombergLP/ball/CategoryManager/lookupCategory-06.adoc[`lookupCategory`] 
| `lookupCategory` overloads
| xref:BloombergLP/ball/CategoryManager/maxNumCategories.adoc[`maxNumCategories`] 
| Return the current capacity of this category registry&period;
| xref:BloombergLP/ball/CategoryManager/operator_subs-0d.adoc[`operator&lsqb;&rsqb;`] 
| Subscript operators
| xref:BloombergLP/ball/CategoryManager/removeAllRules.adoc[`removeAllRules`] 
| Remove every rule from the set of rules maintained by this object&period;
| xref:BloombergLP/ball/CategoryManager/removeRule.adoc[`removeRule`] 
| Remove the specified rule from the unique rule set of this object&period;
| xref:BloombergLP/ball/CategoryManager/removeRules.adoc[`removeRules`] 
| Remove each rule in `ruleSet` from the rule set of this object&period;
| xref:BloombergLP/ball/CategoryManager/resetCategoryHolders.adoc[`resetCategoryHolders`] 
| Reset all linked category holders to their default values&period;
| xref:BloombergLP/ball/CategoryManager/resetDefaultThresholdLevels.adoc[`resetDefaultThresholdLevels`] 
| Reset the default threshold levels to the original &quot;factory&hyphen;supplied&quot; default values or the factory overrides supplied at construction&period;
| xref:BloombergLP/ball/CategoryManager/ruleSet.adoc[`ruleSet`] 
| Return a const reference to the maintained rule set&period;
| xref:BloombergLP/ball/CategoryManager/ruleSetSequenceNumber.adoc[`ruleSetSequenceNumber`] 
| Return the sequence number that tracks rule&hyphen;set changes&period;
| xref:BloombergLP/ball/CategoryManager/rulesetMutex.adoc[`rulesetMutex`] 
| Return a reference to the mutex guarding the rule set&period;
| xref:BloombergLP/ball/CategoryManager/setCategory-00.adoc[`setCategory`] 
| `setCategory` overloads
| xref:BloombergLP/ball/CategoryManager/setCategoryThresholdsToCurrentDefaults.adoc[`setCategoryThresholdsToCurrentDefaults`] 
| Set the specified category&apos;s thresholds to the current default values&period;
| xref:BloombergLP/ball/CategoryManager/setCategoryThresholdsToFactoryDefaults.adoc[`setCategoryThresholdsToFactoryDefaults`] 
| Set the specified category&apos;s thresholds to the factory default values&period;
| xref:BloombergLP/ball/CategoryManager/setDefaultThresholdLevels.adoc[`setDefaultThresholdLevels`] 
| Set the default threshold levels&period;
| xref:BloombergLP/ball/CategoryManager/setDefaultThresholdLevelsCallback.adoc[`setDefaultThresholdLevelsCallback`] 
| Set or clear the default&hyphen;thresholds callback&period;
| xref:BloombergLP/ball/CategoryManager/setMaxNumCategories.adoc[`setMaxNumCategories`] 
| Set the capacity of this category registry&period;
| xref:BloombergLP/ball/CategoryManager/setThresholdLevels.adoc[`setThresholdLevels`] 
| Set or create the named category with the specified threshold levels&period;
| xref:BloombergLP/ball/CategoryManager/setThresholdLevelsHierarchically.adoc[`setThresholdLevelsHierarchically`] 
| Set threshold levels for all categories matching a name prefix&period;
| xref:BloombergLP/ball/CategoryManager/thresholdLevelsForNewCategory.adoc[`thresholdLevelsForNewCategory`] 
| Load the threshold levels that would apply to a newly created category&period;
| xref:BloombergLP/ball/CategoryManager/visitCategories-0a9.adoc[`visitCategories`] 
| `visitCategories` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
