[#BloombergLP-ball-CategoryManager-addCategory-01] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/CategoryManager.adoc[CategoryManager]::addCategory :relfileprefix: ../../../ :mrdocs: `addCategory` overloads == Synopses Declared in `<ball_categorymanager.h>` Add to the registry of this category manager a category having the specified `categoryName`, possibly changed by the registered category name filter callback, and having the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` threshold values, respectively, if there is no category having (the possibly filtered) `categoryName` and each of the specified threshold values is in the range `[0 .. 255]`. Return the address of the newly‐created, modifiable category on success, and 0 otherwise. The behavior is undefined unless a lock is not held by this thread on the mutex returned by `rulesetMutex`. Note that if a category having (the possibly filtered) `categoryName` already exists in the registry, 0 is returned. Note that an existing category will not be modified if a category with the (possibly filtered) `categoryName` already exists. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Category.adoc[Category]* xref:BloombergLP/ball/CategoryManager/addCategory-07.adoc[addCategory]( char const* categoryName, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel); ---- [.small]#xref:BloombergLP/ball/CategoryManager/addCategory-07.adoc[_» more..._]# Add to the registry of this category manager a category having the specified `categoryName`, possibly changed by the registered category name filter callback, and having the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` threshold values, respectively, if there is no category having (the possibly filtered) `categoryName` and each of the specified threshold values is in the range `[0 .. 255]`. Return the address of the newly‐created, modifiable category on success, and 0 otherwise. If a newly‐created category is returned and the specified `categoryHolder` is non‐null, then also load into `categoryHolder` the returned category and its maximum level and link `categoryHolder` to the category. The behavior is undefined unless a lock is not held by this thread on the mutex returned by `rulesetMutex`. Note that if a category having (the possibly filtered) `categoryName` already exists in the registry, 0 is returned. Note that an existing category will not be modified if a category with the (possibly filtered) `categoryName` already exists. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Category.adoc[Category]* xref:BloombergLP/ball/CategoryManager/addCategory-0e.adoc[addCategory]( xref:BloombergLP/ball/CategoryHolder.adoc[CategoryHolder]* categoryHolder, char const* categoryName, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel); ---- [.small]#xref:BloombergLP/ball/CategoryManager/addCategory-0e.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#