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

This class manages a set of unique rule values&period;

== Synopsis

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

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

== Description

Rules may be added to or removed from the set&semi; however, rules having duplicate values will not be added&period; For the definition of two rules having the same value, please refer to the function&hyphen;level documentation associated with the `Rule&colon;&colon;operator&equals;&equals;` function&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/RuleSet/MaskType.adoc[`MaskType`] 
| `MaskType` is an alias for the fundamental integral type used to indicate rule subsets compactly&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/RuleSet/_04enum.adoc[`Unnamed enum`] 
| Rule count constants&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/RuleSet/2constructor-017.adoc[`RuleSet`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/ball/RuleSet/operator_assign.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs` object&period;
| xref:BloombergLP/ball/RuleSet/addRule.adoc[`addRule`] 
| Create a new `Rule` object having the specified `value`&period;
| xref:BloombergLP/ball/RuleSet/addRules.adoc[`addRules`] 
| Add each rule in the specified `rules` to this rule set&period;
| xref:BloombergLP/ball/RuleSet/getRuleById.adoc[`getRuleById`] 
| Return the address of the rule having the specified `id` if such a rule exists, and 0 otherwise&period;
| xref:BloombergLP/ball/RuleSet/numPredicates.adoc[`numPredicates`] 
| Return the total number of predicates in all rules maintained by this object&period;
| xref:BloombergLP/ball/RuleSet/numRules.adoc[`numRules`] 
| Return the number of unique rules maintained in this `RuleSet` object&period;
| xref:BloombergLP/ball/RuleSet/print.adoc[`print`] 
| Format this object to the specified output stream&period;
| xref:BloombergLP/ball/RuleSet/removeAllRules.adoc[`removeAllRules`] 
| Remove every rule in the rule set maintained by this object&period;
| xref:BloombergLP/ball/RuleSet/removeRule.adoc[`removeRule`] 
| Remove the rule having the specified `value` from this rule set&period;
| xref:BloombergLP/ball/RuleSet/removeRuleById.adoc[`removeRuleById`] 
| Remove from this rule set the rule having the specified `id`&period;
| xref:BloombergLP/ball/RuleSet/removeRules.adoc[`removeRules`] 
| Remove each rule in the specified `rules` from this rule set&period;
| xref:BloombergLP/ball/RuleSet/ruleId.adoc[`ruleId`] 
| Return the id of the rule having the specified `value` if such a rule exists, and a negative value otherwise&period;
| xref:BloombergLP/ball/RuleSet/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;RuleSet, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/RuleSet/maxNumRules.adoc[`maxNumRules`] 
| Return the maximum number of rules that can be simultaneously maintained by this object&period;
| xref:BloombergLP/ball/RuleSet/printMask.adoc[`printMask`] 
| Format the specified `mask` to the specified output stream&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/ball/operator_lshift-0a5.adoc[BloombergLP::ball::operator&lt;&lt;]`
| Write the value of the specified `rules` to the specified `output` stream&period;
| `xref:BloombergLP/ball/operator_not_eq-016.adoc[BloombergLP::ball::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` rule sets do not have the same value, and `false` otherwise&period;
| `xref:BloombergLP/ball/operator_eq-0b0.adoc[BloombergLP::ball::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` rule sets have the same value, and `false` otherwise&period;
|===


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