[#BloombergLP-ball-CategoryManager-setCategory-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/CategoryManager.adoc[CategoryManager]::setCategory :relfileprefix: ../../../ :mrdocs: Return the category named `categoryName`, creating it if needed. == Synopsis Declared in `<ball_categorymanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Category.adoc[Category] const* setCategory(char const* categoryName); ---- == Description 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. == Return Value address of the category named `categoryName`, or of the _Default_ _Category_ if none exists == Parameters [cols="1,4"] |=== | Name| Description | *categoryName* | name of the category to look up or create |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#