BDE 4.14.0 Production release
Loading...
Searching...
No Matches
ball::ScopedAttribute Class Reference

#include <ball_scopedattribute.h>

Public Types

typedef bsl::allocator< char > allocator_type
 

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (ScopedAttribute, bslma::UsesBslmaAllocator)
 
 ScopedAttribute (const char *name, const bsl::string_view &value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, const char *value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, int value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, long value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, long long value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, unsigned int value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, unsigned long value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, unsigned long long value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, bdlb::Guid value, const allocator_type &allocator=allocator_type())
 
 ScopedAttribute (const char *name, const void *value, const allocator_type &allocator=allocator_type())
 
 ~ScopedAttribute ()
 
allocator_type get_allocator () const
 

Detailed Description

This class provides a scoped guard that sets a single BALL attribute in the current thread.

See ball_scopedattribute

Member Typedef Documentation

◆ allocator_type

Constructor & Destructor Documentation

◆ ScopedAttribute() [1/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
const bsl::string_view value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [2/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
const char *  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [3/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
int  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [4/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
long  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [5/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
long long  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [6/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
unsigned int  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [7/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
unsigned long  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [8/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
unsigned long long  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [9/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
bdlb::Guid  value,
const allocator_type allocator = allocator_type() 
)
inline

◆ ScopedAttribute() [10/10]

ball::ScopedAttribute::ScopedAttribute ( const char *  name,
const void *  value,
const allocator_type allocator = allocator_type() 
)
inline

Set BALL logging attributes for the current thread for the scope of this object, associating the specified name with the specified value. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.

◆ ~ScopedAttribute()

ball::ScopedAttribute::~ScopedAttribute ( )
inline

Remove the attributes managed by this object from the BALL system, and destroy this object.

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION()

ball::ScopedAttribute::BSLMF_NESTED_TRAIT_DECLARATION ( ScopedAttribute  ,
bslma::UsesBslmaAllocator   
)

◆ get_allocator()

ScopedAttribute::allocator_type ball::ScopedAttribute::get_allocator ( ) const
inline

Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used.


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