[#BloombergLP-balm-CategoryHolder] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::CategoryHolder :relfileprefix: ../../ :mrdocs: This class, informally referred to as a "category holder" (or simply "holder"), holds a category, an enabled value, 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 collecting a metric occurs; (2) if the enabled value is true, the category contains the address of a valid, enabled, 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 no constructors or destructor are defined. == Synopsis Declared in `<balm_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 `balm` metric collection system. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/CategoryHolder/category.adoc[`category`] | Return the address of the non‐modifiable category held by this holder. | xref:BloombergLP/balm/CategoryHolder/enabled.adoc[`enabled`] | Return `true` if `category` is valid (i.e., non‐null) and enabled, and `false` otherwise. | xref:BloombergLP/balm/CategoryHolder/next.adoc[`next`] | Return the address of the modifiable holder pointed to by this holder. | xref:BloombergLP/balm/CategoryHolder/reset.adoc[`reset`] | Reset this object to its default value. The default value is: ` { false, 0, 0 } ` | xref:BloombergLP/balm/CategoryHolder/setCategory.adoc[`setCategory`] | Set the address of the category held by this holder to the specified `category`. | xref:BloombergLP/balm/CategoryHolder/setEnabled.adoc[`setEnabled`] | Set the `enabled` state of this category to the value of the specified `enabledFlag`. | xref:BloombergLP/balm/CategoryHolder/setNext.adoc[`setNext`] | Set this holder to point to the specified `holder`. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/CategoryHolder/d_category_p.adoc[`d_category_p`] | Address of the held category (not owned). | xref:BloombergLP/balm/CategoryHolder/d_enabled.adoc[`d_enabled`] | Whether the held category is enabled. | xref:BloombergLP/balm/CategoryHolder/d_next_p.adoc[`d_next_p`] | Next category holder in the linked list. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#