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

Add a new category with the specified `categoryName`, possibly changed by the registered category name filter callback, unless it already exists&period; Return a pointer to the newly added category in case it did not already exist&period; 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&period; If no such category or category hierarchical setting exists use the defaults&period; Otherwise, if a category already exists with (the possibly filtered) `categoryName` do nothing and return 0&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/ball/Category.adoc[Category]*
addCategoryHierarchically(char const* categoryName);
----


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