8#ifndef INCLUDED_BALM_METRICFORMAT
9#define INCLUDED_BALM_METRICFORMAT
12BSLS_IDENT(
"$Id: balm_metricformat.h,v 1.8 2008/04/16 20:00:49 hversche Exp $")
157#include <balscm_version.h>
165#include <bsl_iosfwd.h>
166#include <bsl_vector.h>
167#include <bsl_cstring.h>
188 const char *d_format;
192 static const char *k_DEFAULT_FORMAT;
259 const char *
format()
const;
270 bsl::ostream&
print(bsl::ostream& stream,
272 int spacesPerLevel = -1)
const;
401 bsl::ostream&
print(bsl::ostream& stream,
403 int spacesPerLevel = 4)
const;
440, d_format(k_DEFAULT_FORMAT)
454: d_scale(original.d_scale)
455, d_format(original.d_format)
464 d_scale = rhs.d_scale;
465 d_format = rhs.d_format;
498 const MetricFormatSpec& rhs)
500 return lhs.scale() == rhs.scale()
501 && 0 == bsl::strcmp(lhs.format(), rhs.format());
506 const MetricFormatSpec& rhs)
513 const MetricFormatSpec& rhs)
515 return rhs.print(stream, 0, -1);
526: d_formatSpecs(basicAllocator)
533: d_formatSpecs(original.d_formatSpecs, basicAllocator)
542 d_formatSpecs = rhs.d_formatSpecs;
550 if (d_formatSpecs.empty()) {
553 d_formatSpecs[(int)publicationType].makeValue(
formatSpec);
559 d_formatSpecs.clear();
567 if (d_formatSpecs.empty()) {
579 const MetricFormat& rhs)
581 return lhs.d_formatSpecs == rhs.d_formatSpecs;
586 const MetricFormat& rhs)
592bsl::ostream&
balm::operator<<(bsl::ostream& stream,
const MetricFormat& rhs)
594 return rhs.print(stream, 0, -1);
Definition bdlb_nullablevalue.h:262
bool isNull() const BSLS_KEYWORD_NOEXCEPT
Return true if this object is null, and false otherwise.
Definition bdlb_nullablevalue.h:1829
TYPE & value()
Definition bdlb_nullablevalue.h:1792
Definition bslstl_vector.h:1120
Definition bslma_allocator.h:545
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition balm_bdlmmetricsadapter.h:142
bool operator==(const IntegerMetric &lhs, const IntegerMetric &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Category &rhs)
bool operator!=(const IntegerMetric &lhs, const IntegerMetric &rhs)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
@ k_LENGTH
Definition balm_publicationtype.h:128
Value
Definition balm_publicationtype.h:83
Definition bslma_usesbslmaallocator.h:344