[#BloombergLP-ball-ScopedAttribute]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::ScopedAttribute
:relfileprefix: ../../
:mrdocs:

This class provides a scoped guard that sets a single BALL attribute in the current thread&period;

== Synopsis

Declared in `&lt;ball&lowbar;scopedattribute&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ScopedAttribute;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/ScopedAttribute/allocator_type.adoc[`allocator&lowbar;type`] 
| `allocator&lowbar;type` is an alias for the type of allocator used by this class&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/ScopedAttribute/2constructor-01.adoc[`ScopedAttribute`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/ball/ScopedAttribute/2destructor.adoc[`&#126;ScopedAttribute`] [.small]#[destructor]#
| Remove the attributes managed by this object from the BALL system, and destroy this object&period;
| xref:BloombergLP/ball/ScopedAttribute/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this object to supply memory&period; Note that if no allocator was supplied at construction the default allocator in effect at construction is used&period;
| xref:BloombergLP/ball/ScopedAttribute/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ScopedAttribute, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
