[#BloombergLP-ball-CategoryManager-addCategoryHierarchically] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/CategoryManager.adoc[CategoryManager]::addCategoryHierarchically :relfileprefix: ../../../ :mrdocs: Add a category inheriting thresholds from the longest matching prefix. == Synopsis Declared in `<ball_categorymanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Category.adoc[Category]* addCategoryHierarchically(char const* categoryName); ---- == Description Add a new category with the specified `categoryName`, possibly changed by the registered category name filter callback, unless it already exists. Return a pointer to the newly added category in case it did not already exist. Determine the threshold levels for the category by finding the longest category name or category name prefix that is a prefix of this (possibly filtered) `categoryName` and use its settings. If no such category or category hierarchical setting exists use the defaults. Otherwise, if a category already exists with (the possibly filtered) `categoryName` do nothing and return 0. == Return Value address of the newly added category, or 0 if it already exists == Parameters [cols="1,4"] |=== | Name| Description | *categoryName* | name of the category to add |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#