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;
132 struct AttributeHash {
136 static int s_hashtableSize;
153 static int s_initialSize;
276 bsl::ostream&
print(bsl::ostream& stream,
278 int spacesPerLevel = 4)
const;
314: d_attributeSet(s_initialSize,
322: d_attributeSet(s_initialSize,
325 allocator.mechanism())
332: d_attributeSet(original.d_attributeSet, allocator)
340 return d_attributeSet.
insert(value).second;
352 return !!d_attributeSet.
erase(value);
358 return static_cast<int>(d_attributeSet.
erase(value));
364 d_attributeSet.
clear();
384 return d_attributeSet.
find(value) != d_attributeSet.
end();
390 return static_cast<int>(d_attributeSet.
size());
402 return d_attributeSet.
begin();
408 return d_attributeSet.
end();
416 const ManagedAttributeSet& attributeSet)
418 attributeSet.print(output, 0, -1);
Definition ball_attributecontainerlist.h:267
Definition ball_managedattributeset.h:127
allocator_type get_allocator() const
Definition ball_managedattributeset.h:376
friend bsl::ostream & operator<<(bsl::ostream &, const ManagedAttributeSet &)
int numAttributes() const
Return the number of attributes managed by this object.
Definition ball_managedattributeset.h:388
friend bool operator==(const ManagedAttributeSet &, const ManagedAttributeSet &)
bool removeAttribute(const ManagedAttribute &value)
Definition ball_managedattributeset.h:350
const_iterator end() const
Definition ball_managedattributeset.h:406
const_iterator begin() const
Definition ball_managedattributeset.h:400
BSLMF_NESTED_TRAIT_DECLARATION(ManagedAttributeSet, bslma::UsesBslmaAllocator)
SetType::const_iterator const_iterator
Definition ball_managedattributeset.h:169
ManagedAttributeSet()
Definition ball_managedattributeset.h:313
int numPredicates() const
Definition ball_managedattributeset.h:394
bool addAttribute(const ManagedAttribute &value)
Definition ball_managedattributeset.h:338
void removeAll()
Remove all attributes from this attribute set.
Definition ball_managedattributeset.h:362
friend bool operator!=(const ManagedAttributeSet &, const ManagedAttributeSet &)
int addPredicate(const ManagedAttribute &value)
Definition ball_managedattributeset.h:344
~ManagedAttributeSet()=default
Destroy this attribute set.
ManagedAttributeSet & operator=(const ManagedAttributeSet &rhs)
int removePredicate(const ManagedAttribute &value)
Definition ball_managedattributeset.h:356
static int hash(const ManagedAttributeSet &set, int size)
bool isMember(const ManagedAttribute &value) const
Definition ball_managedattributeset.h:382
bsl::allocator< char > allocator_type
Definition ball_managedattributeset.h:167
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
void removeAllPredicates()
Definition ball_managedattributeset.h:368
bool evaluate(const AttributeContainerList &containerList) const
Definition ball_managedattribute.h:117
static int hash(const ManagedAttribute &attribute, int size)
Definition ball_managedattribute.h:312
Definition bslma_bslallocator.h:580
Definition bslstl_unorderedset.h:704
void swap(unordered_set &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:1219
pair< iterator, bool > insert(const value_type &value)
Definition bslstl_unorderedset.h:2283
unordered_set &operator=(BloombergLP::bslmf::MovableRef< unordered_set > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:2126
ALLOCATOR get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:2411
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:1231
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedset.h:2134
iterator erase(const_iterator position)
Definition bslstl_unorderedset.h:2224
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this set.
Definition bslstl_unorderedset.h:2469
iterator const_iterator
Definition bslstl_unorderedset.h:767
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition ball_administration.h:214
bsl::ostream & operator<<(bsl::ostream &output, const Attribute &attribute)
Definition bdlb_printmethods.h:283
Definition bslma_usesbslmaallocator.h:343