[#BloombergLP-ball-CategoryHolder] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::CategoryHolder :relfileprefix: ../../ :mrdocs: This class, informally referred to as a "category holder" (or simply "holder"), holds a category, a threshold level, and a pointer to a "next" holder. Both the category and next pointer may be null. The intended use is as follows: (1) instances of this class are (only) declared in contexts where logging occurs; (2) if the held category is non‐null, then the held threshold is the numerical maximum of the four levels of that category; (3) if the next pointer is non‐null, then the holder pointed to holds the same category and threshold. Instances of this class must be _statically_ initializable. Hence, the data members are `public`, and automatically generated constructors and destructor are used. == Synopsis Declared in `<ball_category.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class CategoryHolder; ---- == Description This class should _not_ be used directly by client code. It is an implementation detail of the `ball` logging system. == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/CategoryHolder/_04enum.adoc[`Unnamed enum`] | This enumeration defines distinguished values for category holder threshold levels. Note that these values are intentionally outside the range `[0 .. 255]`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/CategoryHolder/category.adoc[`category`] | Return the address of the non‐modifiable category held by this holder. | xref:BloombergLP/ball/CategoryHolder/next.adoc[`next`] | Return the address of the modifiable holder held by this holder. | xref:BloombergLP/ball/CategoryHolder/reset.adoc[`reset`] | Reset this object to its default value. The default value is: ` { e_UNINITIALIZED_CATEGORY, 0, 0 } ` | xref:BloombergLP/ball/CategoryHolder/setCategory.adoc[`setCategory`] | Set the address of the category held by this holder to the specified `category`. | xref:BloombergLP/ball/CategoryHolder/setNext.adoc[`setNext`] | Set this holder to point to the specified `holder`. | xref:BloombergLP/ball/CategoryHolder/setThreshold.adoc[`setThreshold`] | Set the threshold level held by this holder to the specified `threshold`. | xref:BloombergLP/ball/CategoryHolder/threshold.adoc[`threshold`] | Return the threshold level held by this holder. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/CategoryHolder/d_category_p.adoc[`d_category_p`] | Held category (not owned). | xref:BloombergLP/ball/CategoryHolder/d_next_p.adoc[`d_next_p`] | Next category holder in the linked list. | xref:BloombergLP/ball/CategoryHolder/d_threshold.adoc[`d_threshold`] | Threshold level held by this holder. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/ball_log_getCategoryHolder.adoc[`ball_log_getCategoryHolder`] | Return the address of the specified `categoryHolder`. Note that this function facilitates consistent lookup of block‐scope and class‐scope category holders (see "Logging Macro Reuse" in the "IMPLEMENTATION NOTES" of the component implementation file for details). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#