8#ifndef INCLUDED_BALL_MANAGEDATTRIBUTESET
9#define INCLUDED_BALL_MANAGEDATTRIBUTESET
98#include <balscm_version.h>
108#include <bsl_functional.h>
109#include <bsl_unordered_set.h>
114class AttributeContainerList;
135 struct AttributeHash {
139 static int s_hashtableSize;
156 static int s_initialSize;
282 bsl::ostream&
print(bsl::ostream& stream,
284 int spacesPerLevel = 4)
const;
320: d_attributeSet(s_initialSize,
328: d_attributeSet(s_initialSize,
331 allocator.mechanism())
338: d_attributeSet(original.d_attributeSet, allocator)
346 return d_attributeSet.
insert(value).second;
358 return !!d_attributeSet.
erase(value);
364 return static_cast<int>(d_attributeSet.
erase(value));
370 d_attributeSet.
clear();
390 return d_attributeSet.
find(value) != d_attributeSet.
end();
396 return static_cast<int>(d_attributeSet.
size());
408 return d_attributeSet.
begin();
414 return d_attributeSet.
end();
422 const ManagedAttributeSet& attributeSet)
424 attributeSet.print(output, 0, -1);
Definition ball_attributecontainerlist.h:271
Definition ball_managedattributeset.h:128
allocator_type get_allocator() const
Definition ball_managedattributeset.h:382
friend bsl::ostream & operator<<(bsl::ostream &, const ManagedAttributeSet &)
int numAttributes() const
Return the number of attributes managed by this object.
Definition ball_managedattributeset.h:394
friend bool operator==(const ManagedAttributeSet &, const ManagedAttributeSet &)
bool removeAttribute(const ManagedAttribute &value)
Definition ball_managedattributeset.h:356
const_iterator end() const
Definition ball_managedattributeset.h:412
const_iterator begin() const
Return an iterator referring to the first member of this attribute set.
Definition ball_managedattributeset.h:406
BSLMF_NESTED_TRAIT_DECLARATION(ManagedAttributeSet, bslma::UsesBslmaAllocator)
SetType::const_iterator const_iterator
Definition ball_managedattributeset.h:172
ManagedAttributeSet()
Definition ball_managedattributeset.h:319
int numPredicates() const
Definition ball_managedattributeset.h:400
bool addAttribute(const ManagedAttribute &value)
Definition ball_managedattributeset.h:344
void removeAll()
Remove all attributes from this attribute set.
Definition ball_managedattributeset.h:368
friend bool operator!=(const ManagedAttributeSet &, const ManagedAttributeSet &)
int addPredicate(const ManagedAttribute &value)
Definition ball_managedattributeset.h:350
~ManagedAttributeSet()=default
Destroy this attribute set.
ManagedAttributeSet & operator=(const ManagedAttributeSet &rhs)
int removePredicate(const ManagedAttribute &value)
Definition ball_managedattributeset.h:362
static int hash(const ManagedAttributeSet &set, int size)
bool isMember(const ManagedAttribute &value) const
Definition ball_managedattributeset.h:388
bsl::allocator< char > allocator_type
Definition ball_managedattributeset.h:170
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
void removeAllPredicates()
Definition ball_managedattributeset.h:374
bool evaluate(const AttributeContainerList &containerList) const
Definition ball_managedattribute.h:117
static int hash(const ManagedAttribute &attribute, int size)
Definition ball_managedattribute.h:315
Definition bslma_bslallocator.h:588
Definition bslstl_unorderedset.h:733
void swap(unordered_set &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:1485
pair< iterator, bool > insert(const value_type &value)
Definition bslstl_unorderedset.h:2751
unordered_set &operator=(BloombergLP::bslmf::MovableRef< unordered_set > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:2594
ALLOCATOR get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:2869
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, iterator >::type find(const LOOKUP_KEY &key)
Definition bslstl_unorderedset.h:1500
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:2602
iterator erase(const_iterator position)
Definition bslstl_unorderedset.h:2692
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this set.
Definition bslstl_unorderedset.h:2927
iterator const_iterator
Definition bslstl_unorderedset.h:796
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition ball_administration.h:214
bsl::ostream & operator<<(bsl::ostream &output, const Attribute &attribute)
Definition bdlat_valuetypefunctions.h:939
Definition bslma_usesbslmaallocator.h:344