[#BloombergLP-balm-MetricFormatSpec] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::MetricFormatSpec :relfileprefix: ../../ :mrdocs: This class provides a value‐semantic representation of the formatting specification for a metric aggregate value. The `scale()` is a multiplier used to scale the numeric value. The `format()` is a `printf`‐style format string suitable for formatting a single floating‐point value. == Synopsis Declared in `<balm_metricformat.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MetricFormatSpec; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/MetricFormatSpec/2constructor-06.adoc[`MetricFormatSpec`] [.small]#[constructor]# | Constructors | xref:BloombergLP/balm/MetricFormatSpec/operator_assign.adoc[`operator=`] | Assign to this format spec the value of the specified `rhs` format spec, and return a reference to this modifiable format spec. | xref:BloombergLP/balm/MetricFormatSpec/format.adoc[`format`] | Return the address of the null‐terminated string containing the `printf`‐style format that may be used to format values. | xref:BloombergLP/balm/MetricFormatSpec/print.adoc[`print`] | Format this object to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`. If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects. If `level` is negative, suppress indentation of the first line. If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`). If `stream` is not valid on entry, this operation has no effect. | xref:BloombergLP/balm/MetricFormatSpec/scale.adoc[`scale`] | Return the floating‐point multiplier value that may be applied to scale formatted values. | xref:BloombergLP/balm/MetricFormatSpec/setFormat.adoc[`setFormat`] | Set, to the specified `format`, the `printf`‐style formatting string that may be applied when formatting values. The behavior is undefined unless `format` is null‐terminated, contains a `printf`‐style format string valid for a single floating‐point value, and remains valid and unmodified for the lifetime of this object. | xref:BloombergLP/balm/MetricFormatSpec/setScale.adoc[`setScale`] | Set, to the specified `scale`, the scale multiplier that may be applied when formatting values. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/MetricFormatSpec/formatValue.adoc[`formatValue`] | Write the specified `value` to the specified `stream` using the specified `format`, and return a reference to the modifiable `stream`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/operator_not_eq-07.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` metric format specs do not have the same value, and `false` otherwise. Two format specs do not have same value if they differ in their respective values for `scale` or `format` attributes. | xref:BloombergLP/balm/operator_eq-0ea.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` metric format specs have the same value, and `false` otherwise. Two format specs have the same value if they have the same values for their `scale` and `format` attributes, respectively. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#