[#BloombergLP-balm-MetricRegistry-registerCategoryHolder]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricRegistry.adoc[MetricRegistry]::registerCategoryHolder
:relfileprefix: ../../../
:mrdocs:

Register `holder` with `category` in this registry&period;

== Synopsis

Declared in `&lt;balm&lowbar;metricregistry&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
registerCategoryHolder(
    xref:BloombergLP/balm/Category.adoc[Category] const* category,
    xref:BloombergLP/balm/CategoryHolder.adoc[CategoryHolder]* holder);
----

== Description

Load into the specified `holder` the address of the specified `category`, its `enabled` status, and the address of the next holder in the linked list of category holders maintained by `category` (prepending `holder` to the linked list of category holders for `category`)&period; The supplied `category` will update the value returned by `holder&hyphen;&gt;enabled()` when its enabled state changes, and will reset `holder` (i&period;e&period;, `holder&hyphen;&gt;reset()`) when `category` is destroyed&period; The behavior is undefined unless `holder` remains valid and _unmodified_ (by the client) for the lifetime of this object&period;

This method should _not_ be used directly by client code&period; It is an implementation detail of the `balm` metric collection system&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *category*
| category with which to register `holder`
| *holder*
| category holder to register
|===


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