[#BloombergLP-balm-MetricId] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::MetricId :relfileprefix: ../../ :mrdocs: This class defines an in‐core value‐semantic type used to identify a metric. A `MetricId` object's value is the _address_ of a non‐modifiable `MetricDescription` object. In addition, a `MetricDescription` object provides auxiliary methods, `category`, `categoryName`, and `name`, that enable access to the properties of the held `MetricDescription`. Two `MetricId` objects have the same value if the values of their respective `MetricDescription` object _addresses_ are the same. == Synopsis Declared in `<balm_metricid.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MetricId; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/MetricId/2constructor-0c.adoc[`MetricId`] [.small]#[constructor]# | Constructors | xref:BloombergLP/balm/MetricId/category.adoc[`category`] | Return the address of the non‐modifiable `Category` object identifying the category with which this metric id is associated. The behavior is undefined unless `isValid()` is `true`. Note that this method is logically equivalent to `description()‐>category()`. | xref:BloombergLP/balm/MetricId/categoryName.adoc[`categoryName`] | Return the address of the non‐modifiable name for the category with which this metric id is associated. The behavior is undefined unless `isValid()` is `true`. Note that this method is logically equivalent to `description()‐>category()‐>name()`. | xref:BloombergLP/balm/MetricId/description-07.adoc[`description`] | `description` overloads | xref:BloombergLP/balm/MetricId/isValid.adoc[`isValid`] | Return `true` if this metric id object contains the address of a valid `MetricDescription` object, and false `otherwise`. Note that this method is logically equivalent to `0 != description()`. | xref:BloombergLP/balm/MetricId/metricName.adoc[`metricName`] | Return the address of the non‐modifiable name of this metric id. The behavior is undefined unless `isValid()` is `true`. Note that this method is logically equivalent to `description()‐>name()`. | xref:BloombergLP/balm/MetricId/print.adoc[`print`] | Print this metric id to the specified output `stream` in some single‐line human‐readable form, and return a reference to the modifiable `stream`. | xref:BloombergLP/balm/MetricId/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<MetricId, is_trivially_copyable>`] | Declare that this type is trivially copyable. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/operator_not_eq-0f.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` metric ids do not have the same value and `false` otherwise. Two metric ids do not have same value if they refer to different `MetricDescription` object _addresses_, or exactly one address is 0. | xref:BloombergLP/balm/operator_lt.adoc[`operator<`] | Return `true` if the specified `lhs` metric id is less than (ordered before) the specified `rhs` metric id, and return `false` otherwise'. The `lhs` is considered less if the (unsigned) _address_ of the contained `MetricDescription` object is numerically less than the `rhs` description. Note that this function does _not_ provide any form of alphabetic ordering, and is logically equivalent to the expression `lhs.description() < rhs.description()`. | xref:BloombergLP/balm/operator_eq-0f.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` metric ids have the same value and `false` otherwise. Two metric ids have the same value if they each hold the address of the same `MetricDescription` object, or both addresses are 0. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#