[#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. == Synopsis Declared in `<ball_defaultattributecontainer.h>` [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. The attribute container provides a `hasValue()` method to determine whether an attribute value is in the container. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/DefaultAttributeContainer/allocator_type.adoc[`allocator_type`] | This `typedef` is an alias for the allocator used by this object. | xref:BloombergLP/ball/DefaultAttributeContainer/const_iterator.adoc[`const_iterator`] | This `typedef` is an alias for a constant iterator over the attributes managed by this object. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/DefaultAttributeContainer/2constructor-0d.adoc[`DefaultAttributeContainer`] [.small]#[constructor]# | Constructors | xref:BloombergLP/ball/DefaultAttributeContainer/2destructor.adoc[`~DefaultAttributeContainer`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this object. | xref:BloombergLP/ball/DefaultAttributeContainer/operator_assign.adoc[`operator=`] | Assign to this object the value of the specified `rhs` object, and return a non‐`const` reference to this object. | xref:BloombergLP/ball/DefaultAttributeContainer/addAttribute.adoc[`addAttribute`] | Add an attribute having the specified `value` to this object. Return `true` on success and `false` if an attribute having the same `value` already exists in this object. | 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. | xref:BloombergLP/ball/DefaultAttributeContainer/end.adoc[`end`] | Return an iterator pointing at one past the end of the map. | xref:BloombergLP/ball/DefaultAttributeContainer/get_allocator.adoc[`get_allocator`] | 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. | xref:BloombergLP/ball/DefaultAttributeContainer/hasValue.adoc[`hasValue`] [.small]#[virtual]# | Return `true` if the attribute having specified `value` exists in this object, and `false` otherwise. | xref:BloombergLP/ball/DefaultAttributeContainer/numAttributes.adoc[`numAttributes`] | Return the number of attributes managed by this object. | 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`. If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects. If `level` is negative, suppress indentation of the first line. If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`). If `stream` is not valid on entry, this operation has no effect. | xref:BloombergLP/ball/DefaultAttributeContainer/removeAllAttributes.adoc[`removeAllAttributes`] | Remove every attribute in this attribute set. | xref:BloombergLP/ball/DefaultAttributeContainer/removeAttribute.adoc[`removeAttribute`] | Remove the attribute having the specified `value` from this object. Return the `true` on success and `false` if the attribute having the `value` does not exist in this object. | xref:BloombergLP/ball/DefaultAttributeContainer/visitAttributes.adoc[`visitAttributes`] [.small]#[virtual]# | Invoke the specified `visitor` function for all attributes in this container. | xref:BloombergLP/ball/DefaultAttributeContainer/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<DefaultAttributeContainer, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/operator_not_eq-04.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise. 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. | xref:BloombergLP/ball/operator_eq-01e.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise. 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#