#include <balm_metricid.h>
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.
See balm_metricid
◆ MetricId() [1/3]
balm::MetricId::MetricId |
( |
| ) |
|
|
inline |
◆ MetricId() [2/3]
Create a metric id whose value is the specified metricDescription
address. The behavior is undefined unless metricDescription
is 0, or the indicated metric description object remains valid for the lifetime of this metric id object.
◆ MetricId() [3/3]
balm::MetricId::MetricId |
( |
const MetricId & |
original | ) |
|
|
default |
Create a metric id with the value of the specified 'original' metric id. The behavior is undefined unless the 'description()' of 'original' is 0, or the indicated metric description object remains valid for the lifetime of this metric id object.
◆ ~MetricId()
balm::MetricId::~MetricId |
( |
| ) |
|
|
default |
◆ BSLMF_NESTED_TRAIT_DECLARATION()
◆ category()
const Category * balm::MetricId::category |
( |
| ) |
const |
|
inline |
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()
.
◆ categoryName()
const char * balm::MetricId::categoryName |
( |
| ) |
const |
|
inline |
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()
.
◆ description() [1/2]
Return a reference to the modifiable address of the held non-modifiable MetricDescription
, which defines the value of this metric id.
◆ description() [2/2]
Return a reference to the non-modifiable address of the held non-modifiable MetricDescription
, which defines the value of this metric id.
◆ isValid()
bool balm::MetricId::isValid |
( |
| ) |
const |
|
inline |
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()
.
◆ metricName()
const char * balm::MetricId::metricName |
( |
| ) |
const |
|
inline |
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()
.
◆ operator=()
Assign this metric id the value of the specified 'rhs' metric id object, and return a reference to this object. The behavior is undefined unless the 'description()' of 'rhs' is 0, or the metric-description object remains valid for the lifetime of this metric-id object.
◆ print()
bsl::ostream & balm::MetricId::print |
( |
bsl::ostream & |
stream | ) |
const |
Print this metric id to the specified output stream
in some single-line human-readable form, and return a reference to the modifiable stream
.
The documentation for this class was generated from the following file: