8#ifndef INCLUDED_BALM_METRICDESCRIPTION
9#define INCLUDED_BALM_METRICDESCRIPTION
128#include <balscm_version.h>
138#include <bsl_iosfwd.h>
139#include <bsl_memory.h>
163 const char *d_name_p;
166 d_preferredPublicationType;
245 const char *
name()
const;
279 bsl::ostream&
print(bsl::ostream& stream)
const;
305MetricDescription::MetricDescription(
const Category *category,
308: d_category_p(category)
312, d_userData(basicAllocator)
336 d_preferredPublicationType = type;
353 if ((
unsigned int)key >= d_userData.
size()) {
354 d_userData.
resize(key + 1, 0);
356 d_userData[key] = value;
378 return d_preferredPublicationType;
395 return ((
unsigned int)key < d_userData.
size()) ? d_userData[key] : 0;
403 const MetricDescription& rhs)
405 return rhs.print(stream);
Definition balm_category.h:151
Definition balm_metricdescription.h:158
void setName(const char *name)
Definition balm_metricdescription.h:319
bsl::ostream & printDescription(bsl::ostream &stream) const
void setPreferredPublicationType(PublicationType::Value type)
Definition balm_metricdescription.h:331
~MetricDescription()=default
Destroy this object.
void setCategory(const Category *category)
Definition balm_metricdescription.h:325
const void * userData(UserDataKey key) const
Definition balm_metricdescription.h:391
bsl::ostream & print(bsl::ostream &stream) const
void setUserData(UserDataKey key, const void *value)
Definition balm_metricdescription.h:348
void setFormat(const bsl::shared_ptr< const MetricFormat > &format)
Definition balm_metricdescription.h:340
int UserDataKey
Definition balm_metricdescription.h:190
const Category * category() const
Definition balm_metricdescription.h:367
bsl::shared_ptr< const MetricFormat > format() const
Definition balm_metricdescription.h:383
PublicationType::Value preferredPublicationType() const
Definition balm_metricdescription.h:374
const char * name() const
Definition balm_metricdescription.h:361
Definition bslstl_sharedptr.h:1830
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this vector.
Definition bslstl_vector.h:2664
Definition bslstl_vector.h:1025
void resize(size_type newSize)
Definition bslstl_vector.h:3616
Definition bslma_allocator.h:457
Definition bslmt_lockguard.h:234
Definition bslmt_mutex.h:315
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balm_bdlmmetricsadapter.h:141
bsl::ostream & operator<<(bsl::ostream &stream, const Category &rhs)
Definition balm_publicationtype.h:77
Value
Definition balm_publicationtype.h:81