This class provides a value‐semantic description for the formatting of a metric.

Synopsis

Declared in <balm_metricformat.h>

class MetricFormat;

Description

For each published aggregate type of a metric (e.g., count, total, min, max, etc.), a MetricFormat contains a MetricFormatSpec object describing how to format values of that aggregate, or null if no formatting information is supplied. Metricformat provides the setFormatSpec method to set the format spec for a publication type, and the formatSpec method to retrieve the format spec for a publication type (or 0 if no format spec has been provided for the indicated publication type). Note that the types of published aggregates explicitly provided by the balm package are defined in the PublicationType enumeration.

Member Functions

Name

Description

MetricFormat [constructor]

Constructors

operator=

Assign to this metric format object the value of the specified rhs metric format, and return a reference to this modifiable metric format.

clearFormatSpec

Remove the format spec for the specified publicationType from this metric format object. After this methods returns, formatSpec(publicationType) will return 0.

clearFormatSpecs

Remove all format specs from this metric format object and put this object into its default‐constructed state.

formatSpec

Return the address of the non‐modifiable format spec for the specified publicationType, or 0 if no format spec has been provided for publicationType.

print

Format this object to the specified output stream.

setFormatSpec

Set the format spec for the metric aggregate indicated by the specified publicationType to the specified formatSpec.

operator BloombergLP::bslmf::NestedTraitDeclaration<MetricFormat, UsesBslmaAllocator>

Declare that this type uses a bslma allocator.

Friends

Name

Description

BloombergLP::balm::operator==

Return true if the specified lhs and rhs metric formats have the same value, and false otherwise.

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs metric formats do not have the same value, and false otherwise.

Created with MrDocs