[#BloombergLP-balm-Metric-2constructor-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/Metric.adoc[Metric]::Metric
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

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

Create a metric object that will record values for the same metric (i&period;e&period;, using the same `Collector` object) as the specified `original` metric&period; If the `original` metric is inactive (i&period;e&period;, `isActive()` is `false`), then this metric will be similarly inactive&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/Metric/2constructor-04.adoc[Metric](xref:BloombergLP/balm/Metric.adoc[Metric] const& original);
----

[.small]#xref:BloombergLP/balm/Metric/2constructor-04.adoc[_» more&period;&period;&period;_]#

Create a metric object to collect values for the metric implied by the specified `collector` (i&period;e&period;, `collector&hyphen;&gt;metricId()`)&period; The behavior is undefined unless `collector` is a valid address of a `Collector` object and `collector` has a valid id (i&period;e&period;, `collector&hyphen;&gt;metricId()&period;isValid()`)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/balm/Metric/2constructor-0b3.adoc[Metric](xref:BloombergLP/balm/Collector.adoc[Collector]* collector);
----

[.small]#xref:BloombergLP/balm/Metric/2constructor-0b3.adoc[_» more&period;&period;&period;_]#

Create a metric object to collect values for the specified `metricId`&period; Optionally specify a metrics `manager` used to provide a collector for `metricId`&period; If `manager` is 0, use the default metrics manager, if initialized&semi; if `manager` is 0 and the default metrics manager has not been initialized, place this metric object in the inactive state (i&period;e&period;, `isActive()` is `false`) in which case instance methods that would otherwise update the metric will have no effect&period; The behavior is undefined unless `metricId` is a valid id returned by the `MetricRepository` object owned by the indicated metrics manager&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/balm/Metric/2constructor-0b2.adoc[Metric](
    xref:BloombergLP/balm/MetricId.adoc[MetricId] const& metricId,
    xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0);
----

[.small]#xref:BloombergLP/balm/Metric/2constructor-0b2.adoc[_» more&period;&period;&period;_]#

Create a metric object to collect values for the metric identified by the specified null&hyphen;terminated strings `category` and `name`&period; Optionally specify a metrics `manager` used to provide a collector for the indicated metric&period; If `manager` is 0, use the default metrics manager, if initialized&semi; if `manager` is 0 and the default metrics manager has not been initialized, place this metric object in the inactive state (i&period;e&period;, `isActive()` is `false`) in which case instance methods that would otherwise update the metric will have no effect&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/Metric/2constructor-0a.adoc[Metric](
    char const* category,
    char const* name,
    xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0);
----

[.small]#xref:BloombergLP/balm/Metric/2constructor-0a.adoc[_» more&period;&period;&period;_]#


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