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

This class implements a value&hyphen;semantic collection of unique attributes&period; (Note that an attribute is a compound entity that, as a whole, must be unique although individual parts need not be&period;) Additionally, the `evaluate` accessor can be used to determine if every attribute in the set is present in the specified attribute container list&period;

== Synopsis

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

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

== Type Aliases

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


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/ManagedAttributeSet/2constructor-0e.adoc[`ManagedAttributeSet`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/ball/ManagedAttributeSet/operator_assign.adoc[`operator&equals;`] 
| Assign the value of the specified `rhs` to this object, and return a reference providing modifiable access to this object&period;
| xref:BloombergLP/ball/ManagedAttributeSet/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/ManagedAttributeSet/addPredicate.adoc[`addPredicate`] 
| Add an attribute having the specified `value` to this object&period; Return 1 on success and 0 if an attribute having the same value already exists in this object&period;
| xref:BloombergLP/ball/ManagedAttributeSet/begin.adoc[`begin`] 
| Return an iterator referring to the first member of this attribute set&period;
| xref:BloombergLP/ball/ManagedAttributeSet/end.adoc[`end`] 
| Return an iterator referring to one past the last member of this attribute set&period;
| xref:BloombergLP/ball/ManagedAttributeSet/evaluate.adoc[`evaluate`] 
| Return `true` if for every attribute maintained by this object, an attribute with the same name and value exists in the specified `containerList`, or if this object has no attributes&semi; otherwise return `false`&period;
| xref:BloombergLP/ball/ManagedAttributeSet/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/ManagedAttributeSet/isMember.adoc[`isMember`] 
| Return `true` if an attribute having specified `value` exists in this object, and `false` otherwise&period;
| xref:BloombergLP/ball/ManagedAttributeSet/numAttributes.adoc[`numAttributes`] 
| Return the number of attributes managed by this object&period;
| xref:BloombergLP/ball/ManagedAttributeSet/numPredicates.adoc[`numPredicates`] 
| DEPRECATED&colon; Use `numAttributes` instead&period;
| xref:BloombergLP/ball/ManagedAttributeSet/print.adoc[`print`] 
| 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/ManagedAttributeSet/removeAll.adoc[`removeAll`] 
| Remove all attributes from this attribute set&period;
| xref:BloombergLP/ball/ManagedAttributeSet/removeAllPredicates.adoc[`removeAllPredicates`] 
| DEPRECATED&colon; Use `removeAll` instead&period;
| xref:BloombergLP/ball/ManagedAttributeSet/removeAttribute.adoc[`removeAttribute`] 
| Remove the attribute having the specified `value` from this object&period; Return `true` on success and `false` if an attribute having the `value` does not exist in this object&period;
| xref:BloombergLP/ball/ManagedAttributeSet/removePredicate.adoc[`removePredicate`] 
| Remove the attribute having the specified `value` from this object&period; Return the number of attributes removed (i&period;e&period;, 1 on success and 0 if an attribute having `value` does not exist in this object)&period;
| xref:BloombergLP/ball/ManagedAttributeSet/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ManagedAttributeSet, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/ManagedAttributeSet/hash.adoc[`hash`] 
| Return a hash value calculated from the specified `set` using the specified `size` as the number of slots&period; The hash value is guaranteed to be in the range `&lsqb;0 &period;&period; size &hyphen; 1&rsqb;`&period; The behavior is undefined unless `0 &lt; size`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/ball/operator_lshift-0cf9.adoc[BloombergLP::ball::operator&lt;&lt;]`
| Write the value of the specified `attributeSet` to the specified `output` stream&period; Return the specified `output` stream&period;
| `xref:BloombergLP/ball/operator_not_eq-0b6.adoc[BloombergLP::ball::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `ManagedAttributeSet` objects do not have the same value if they do not have the same number of attributes or there is at least one attribute value that appears in one object, but not in the other&period;
| `xref:BloombergLP/ball/operator_eq-08e2.adoc[BloombergLP::ball::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `ManagedAttributeSet` objects have the same value if they have the same number of attributes and every attribute value that appears in one object also appears in the other&period;
|===


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