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

`setCategory` overloads

== Synopses

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

Return the category named `categoryName`, creating it if needed&period;


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

[.small]#xref:BloombergLP/ball/CategoryManager/setCategory-0d.adoc[_» more&period;&period;&period;_]#

Return the category named `categoryName`, creating it if needed&period;


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

[.small]#xref:BloombergLP/ball/CategoryManager/setCategory-04.adoc[_» more&period;&period;&period;_]#

Add or update a category with the specified name and threshold levels&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/ball/Category.adoc[Category]*
xref:BloombergLP/ball/CategoryManager/setCategory-0f.adoc[setCategory](
    char const* categoryName,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);
----

[.small]#xref:BloombergLP/ball/CategoryManager/setCategory-0f.adoc[_» more&period;&period;&period;_]#

== Return Value

* address of the category named `categoryName`, or of the _Default_ _Category_ if none exists
* address of the (possibly newly&hyphen;created) category if created or reset, and 0 otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *categoryName*
| name of the category to look up or create
| *categoryHolder*
| optional holder to load with the category
| *recordLevel*
| record threshold level
| *passLevel*
| pass threshold level
| *triggerLevel*
| trigger threshold level
| *triggerAllLevel*
| trigger&hyphen;all threshold level
|===


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