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

A `DefaultAttributeContainer` object contains a collection of (unique) attributes values&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class DefaultAttributeContainer
    : public xref:BloombergLP/ball/AttributeContainer.adoc[AttributeContainer]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/ball/AttributeContainer.adoc[AttributeContainer]`
| This class defines a protocol for a container of attribute values&period; The attribute container provides a `hasValue()` method to determine whether an attribute value is in the container&period;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/DefaultAttributeContainer/allocator_type.adoc[`allocator&lowbar;type`] 
| This `typedef` is an alias for the allocator used by this object&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/const_iterator.adoc[`const&lowbar;iterator`] 
| This `typedef` is an alias for a constant iterator over the attributes managed by this object&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/DefaultAttributeContainer/2constructor-0d.adoc[`DefaultAttributeContainer`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/ball/DefaultAttributeContainer/2destructor.adoc[`&#126;DefaultAttributeContainer`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this object&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/operator_assign.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs` object, and return a non&hyphen;`const` reference to this object&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/addAttribute.adoc[`addAttribute`] 
| Add an attribute having the specified `value` to this object&period; Return `true` on success and `false` if an attribute having the same `value` already exists in this object&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/begin.adoc[`begin`] 
| Return an iterator pointing at the beginning of the (unordered) sequence of attributes managed by this map, or `end()` if `numAttributes()` is 0&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/end.adoc[`end`] 
| Return an iterator pointing at one past the end of the map&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/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/DefaultAttributeContainer/hasValue.adoc[`hasValue`]  [.small]#[virtual]#
| Return `true` if the attribute having specified `value` exists in this object, and `false` otherwise&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/numAttributes.adoc[`numAttributes`] 
| Return the number of attributes managed by this object&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/print.adoc[`print`]  [.small]#[virtual]#
| Format this object to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/removeAllAttributes.adoc[`removeAllAttributes`] 
| Remove every attribute in this attribute set&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/removeAttribute.adoc[`removeAttribute`] 
| Remove the attribute having the specified `value` from this object&period; Return the `true` on success and `false` if the attribute having the `value` does not exist in this object&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/visitAttributes.adoc[`visitAttributes`]  [.small]#[virtual]#
| Invoke the specified `visitor` function for all attributes in this container&period;
| xref:BloombergLP/ball/DefaultAttributeContainer/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;DefaultAttributeContainer, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/operator_not_eq-04.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `DefaultAttributeContainer` objects do not have the same value if they contain differing numbers of attributes or if there is at least one attribute that appears in one object, but not in the other&period;
| xref:BloombergLP/ball/operator_eq-01e.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `DefaultAttributeContainer` objects have the same value if they contain the same number of (unique) attributes, and every attribute that appears in one object also appears in the other&period;
|===


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