BloombergLP::ball::DefaultAttributeContainer

A DefaultAttributeContainer object contains a collection of (unique) attributes values.

Synopsis

Declared in <ball_defaultattributecontainer.h>

class DefaultAttributeContainer
    : public AttributeContainer

Base Classes

NameDescription
AttributeContainerThis 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

NameDescription
allocator_type This typedef is an alias for the allocator used by this object.
const_iterator This typedef is an alias for a constant iterator over the attributes managed by this object.

Member Functions

NameDescription
DefaultAttributeContainer [constructor]Constructors
~DefaultAttributeContainer [destructor] [virtual]Destroy this object.
operator= Assign to this object the value of the specified rhs object, and return a non-const reference to this object.
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.
begin Return an iterator pointing at the beginning of the (unordered) sequence of attributes managed by this map, or end() if numAttributes() is 0.
end Return an iterator pointing at one past the end of the map.
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.
hasValue [virtual]Return true if the attribute having specified value exists in this object, and false otherwise.
numAttributes Return the number of attributes managed by this object.
print [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.
removeAllAttributes Remove every attribute in this attribute set.
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.
visitAttributes [virtual]Invoke the specified visitor function for all attributes in this container.
operator BloombergLP::bslmf::NestedTraitDeclaration<DefaultAttributeContainer, UsesBslmaAllocator> Declare that this type uses a bslma allocator.

Non-Member Functions

NameDescription
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.
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.