8#ifndef INCLUDED_BALL_RULESET
9#define INCLUDED_BALL_RULESET
125#include <balscm_version.h>
134#include <bsl_unordered_set.h>
135#include <bsl_vector.h>
164#ifndef BDE_OMIT_INTERNAL_DEPRECATED
178 static int s_hashtableSize;
184 int operator()(
const Rule& rule)
const
193 HashtableType d_ruleHashtable;
230 int spacesPerLevel = 0);
327 bsl::ostream&
print(bsl::ostream& stream,
329 int spacesPerLevel = 4)
const;
368 return d_ruleAddresses[id];
374 return static_cast<int>(d_ruleHashtable.
size());
380 return d_numPredicates;
388 return rules.print(output, 0, -1);
Definition ball_ruleset.h:151
static int maxNumRules()
Definition ball_ruleset.h:359
friend bool operator!=(const RuleSet &, const RuleSet &)
int removeRuleById(int id)
static void printMask(bsl::ostream &stream, MaskType mask, int level=0, int spacesPerLevel=0)
RuleSet(const RuleSet &original, bslma::Allocator *basicAllocator=0)
const Rule * getRuleById(int id) const
Definition ball_ruleset.h:366
int addRule(const Rule &value)
int ruleId(const Rule &value) const
int numPredicates() const
Definition ball_ruleset.h:378
friend bool operator==(const RuleSet &, const RuleSet &)
int addRules(const RuleSet &rules)
friend bsl::ostream & operator<<(bsl::ostream &, const RuleSet &)
RuleSet(bslma::Allocator *basicAllocator=0)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
BSLMF_NESTED_TRAIT_DECLARATION(RuleSet, bslma::UsesBslmaAllocator)
@ BAEL_MAX_NUM_RULES
Definition ball_ruleset.h:165
@ e_MAX_NUM_RULES
Definition ball_ruleset.h:161
@ MAX_NUM_RULES
Definition ball_ruleset.h:166
RuleSet & operator=(const RuleSet &rhs)
Assign to this object the value of the specified rhs object.
int removeRules(const RuleSet &rules)
void removeAllRules()
Remove every rule in the rule set maintained by this object.
int removeRule(const Rule &value)
unsigned int MaskType
Definition ball_ruleset.h:158
int numRules() const
Definition ball_ruleset.h:372
~RuleSet()=default
Destroy this object.
Definition ball_rule.h:177
static int hash(const Rule &rule, int size)
Definition bslstl_unorderedset.h:704
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this set.
Definition bslstl_unorderedset.h:2469
Definition bslstl_vector.h:1025
Definition bslma_allocator.h:457
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition ball_administration.h:214
bsl::ostream & operator<<(bsl::ostream &output, const Attribute &attribute)
Definition bslma_usesbslmaallocator.h:343