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

This class holds a category, a threshold level, and a next&hyphen;holder pointer&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CategoryHolder;
----

== Description

This class, informally referred to as a &quot;category holder&quot; (or simply &quot;holder&quot;), holds a category, a threshold level, and a pointer to a &quot;next&quot; holder&period; Both the category and next pointer may be null&period; The intended use is as follows&colon; (1) instances of this class are (only) declared in contexts where logging occurs&semi; (2) if the held category is non&hyphen;null, then the held threshold is the numerical maximum of the four levels of that category&semi; (3) if the next pointer is non&hyphen;null, then the holder pointed to holds the same category and threshold&period; Instances of this class must be _statically_ initializable&period; Hence, the data members are `public`, and automatically generated constructors and destructor are used&period;

This class should _not_ be used directly by client code&period; It is an implementation detail of the `ball` logging system&period;

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CategoryHolder/_04enum.adoc[`Unnamed enum`] 
| This enumeration defines distinguished values for category holder threshold levels&period; Note that these values are intentionally outside the range `&lsqb;0 &period;&period; 255&rsqb;`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CategoryHolder/category.adoc[`category`] 
| Return the address of the non&hyphen;modifiable category held by this holder&period;
| xref:BloombergLP/ball/CategoryHolder/next.adoc[`next`] 
| Return the address of the modifiable holder held by this holder&period;
| xref:BloombergLP/ball/CategoryHolder/reset.adoc[`reset`] 
| Reset this object to its default value&period; The default value is&colon; &grave; &lcub; e&lowbar;UNINITIALIZED&lowbar;CATEGORY, 0, 0 &rcub; &grave;
| xref:BloombergLP/ball/CategoryHolder/setCategory.adoc[`setCategory`] 
| Set the address of the category held by this holder to the specified `category`&period;
| xref:BloombergLP/ball/CategoryHolder/setNext.adoc[`setNext`] 
| Set this holder to point to the specified `holder`&period;
| xref:BloombergLP/ball/CategoryHolder/setThreshold.adoc[`setThreshold`] 
| Set the threshold level held by this holder to the specified `threshold`&period;
| xref:BloombergLP/ball/CategoryHolder/threshold.adoc[`threshold`] 
| Return the threshold level held by this holder&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CategoryHolder/d_category_p.adoc[`d&lowbar;category&lowbar;p`] 
| Held category (not owned)&period;
| xref:BloombergLP/ball/CategoryHolder/d_next_p.adoc[`d&lowbar;next&lowbar;p`] 
| Next category holder in the linked list&period;
| xref:BloombergLP/ball/CategoryHolder/d_threshold.adoc[`d&lowbar;threshold`] 
| Threshold level held by this holder&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/ball_log_getCategoryHolder.adoc[`ball&lowbar;log&lowbar;getCategoryHolder`]
| Return the address of the specified `categoryHolder`&period;
|===


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