BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlm::MetricDescriptor Class Reference

#include <bdlm_metricdescriptor.h>

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (MetricDescriptor, bslma::UsesBslmaAllocator)
 
 MetricDescriptor (bslma::Allocator *basicAllocator=0)
 
 MetricDescriptor (const bsl::string_view &metricNamespace, const bsl::string_view &metricName, InstanceCount::Value instanceNumber, const bsl::string_view &objectTypeName, const bsl::string_view &objectTypeAbbreviation, const bsl::string_view &objectIdentifier, bslma::Allocator *basicAllocator=0)
 
 MetricDescriptor (const MetricDescriptor &original, bslma::Allocator *basicAllocator=0)
 
 ~MetricDescriptor ()=default
 Destroy this object.
 
MetricDescriptoroperator= (const MetricDescriptor &rhs)
 
void setInstanceNumber (const InstanceCount::Value &value)
 
void setMetricName (const bsl::string_view &value)
 
void setMetricNamespace (const bsl::string_view &value)
 
void setObjectIdentifier (const bsl::string_view &value)
 
void setObjectTypeAbbreviation (const bsl::string_view &value)
 
void setObjectTypeName (const bsl::string_view &value)
 
const InstanceCount::ValueinstanceNumber () const
 Return the instanceNumber attribute.
 
const bsl::stringmetricName () const
 Return the metricName attribute.
 
const bsl::stringmetricNamespace () const
 Return the metricNamespace attribute.
 
const bsl::stringobjectIdentifier () const
 Return the objectIdentifier attribute.
 
const bsl::stringobjectTypeAbbreviation () const
 Return the objectTypeAbbreviation attribute.
 
const bsl::stringobjectTypeName () const
 Return the objectTypeName attribute.
 
bslma::Allocatorallocator () const
 Return the allocator used by this object to supply memory.
 

Static Public Attributes

static const char * k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION
 
static const char * k_USE_METRICS_ADAPTER_OBJECT_ID_SELECTION
 

Friends

bool operator== (const MetricDescriptor &, const MetricDescriptor &)
 
bool operator!= (const MetricDescriptor &, const MetricDescriptor &)
 

Detailed Description

This attribute class characterizes how to describe a metric.

See bdlm_metricdescriptor

Constructor & Destructor Documentation

◆ MetricDescriptor() [1/3]

bdlm::MetricDescriptor::MetricDescriptor ( bslma::Allocator basicAllocator = 0)
inline

Create an object of this class having the default attribute values. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The default value for the namespace attribute is k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION and the default value for the object identifier attribute is k_USE_METRICS_ADAPTER_OBJECT_ID_SELECTION. The residual attibutes default to an empty string, except the instance number which defaults to 0. Note that implementations of the bdlm::MetricsAdapter protocal will typically use an implementation specific value for the namespace attribute when metricNamespace == k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION and the object identifier attribute when objectIdentrifier == k_USE_METRICS_ADAPTER_OBJECT_ID_SELECTION.

◆ MetricDescriptor() [2/3]

bdlm::MetricDescriptor::MetricDescriptor ( const bsl::string_view metricNamespace,
const bsl::string_view metricName,
InstanceCount::Value  instanceNumber,
const bsl::string_view objectTypeName,
const bsl::string_view objectTypeAbbreviation,
const bsl::string_view objectIdentifier,
bslma::Allocator basicAllocator = 0 
)
inline

Create an object of this class having the specified metricNamespace, metricName, instanceNumber, objectTypeName, objectTypeAbbreviation, and objectIdentifier attribute values. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. Note that implementations of the bdlm::MetricsAdapter protocal will typically use an implementation specific value for the namespace attribute when metricNamespace == k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION and the object identifier attribute when objectIdentrifier == k_USE_METRICS_ADAPTER_OBJECT_ID_SELECTION.

◆ MetricDescriptor() [3/3]

bdlm::MetricDescriptor::MetricDescriptor ( const MetricDescriptor original,
bslma::Allocator basicAllocator = 0 
)
inline

Create an object of this class having the same value as the specified original one. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ ~MetricDescriptor()

bdlm::MetricDescriptor::~MetricDescriptor ( )
default

Member Function Documentation

◆ allocator()

bslma::Allocator * bdlm::MetricDescriptor::allocator ( ) const
inline

◆ BSLMF_NESTED_TRAIT_DECLARATION()

bdlm::MetricDescriptor::BSLMF_NESTED_TRAIT_DECLARATION ( MetricDescriptor  ,
bslma::UsesBslmaAllocator   
)

◆ instanceNumber()

const InstanceCount::Value & bdlm::MetricDescriptor::instanceNumber ( ) const
inline

◆ metricName()

const bsl::string & bdlm::MetricDescriptor::metricName ( ) const
inline

◆ metricNamespace()

const bsl::string & bdlm::MetricDescriptor::metricNamespace ( ) const
inline

◆ objectIdentifier()

const bsl::string & bdlm::MetricDescriptor::objectIdentifier ( ) const
inline

◆ objectTypeAbbreviation()

const bsl::string & bdlm::MetricDescriptor::objectTypeAbbreviation ( ) const
inline

◆ objectTypeName()

const bsl::string & bdlm::MetricDescriptor::objectTypeName ( ) const
inline

◆ operator=()

MetricDescriptor & bdlm::MetricDescriptor::operator= ( const MetricDescriptor rhs)
inline

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

◆ setInstanceNumber()

void bdlm::MetricDescriptor::setInstanceNumber ( const InstanceCount::Value value)
inline

Set the instanceNumber attribute of this object to the specified value.

◆ setMetricName()

void bdlm::MetricDescriptor::setMetricName ( const bsl::string_view value)
inline

Set the metricName attribute of this object to the specified value.

◆ setMetricNamespace()

void bdlm::MetricDescriptor::setMetricNamespace ( const bsl::string_view value)
inline

Set the metricNamespace attribute of this object to the specified value.

◆ setObjectIdentifier()

void bdlm::MetricDescriptor::setObjectIdentifier ( const bsl::string_view value)
inline

Set the objectIdentifier attribute of this object to the specified value.

◆ setObjectTypeAbbreviation()

void bdlm::MetricDescriptor::setObjectTypeAbbreviation ( const bsl::string_view value)
inline

Set the objectTypeAbbreviation attribute of this object to the specified value.

◆ setObjectTypeName()

void bdlm::MetricDescriptor::setObjectTypeName ( const bsl::string_view value)
inline

Set the objectTypeName attribute of this object to the specified value.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const MetricDescriptor lhs,
const MetricDescriptor rhs 
)
friend

Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two MetricDescriptor objects do not have the same value if any of their attributes (respectively) do not have the same value.

◆ operator==

bool operator== ( const MetricDescriptor lhs,
const MetricDescriptor rhs 
)
friend

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two MetricDescriptor objects have the same value if each of their attributes (respectively) have the same value.

Member Data Documentation

◆ k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION

const char* bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION
static

◆ k_USE_METRICS_ADAPTER_OBJECT_ID_SELECTION

const char* bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_OBJECT_ID_SELECTION
static

The documentation for this class was generated from the following file: