This class defines a value-semantic object that holds a pattern, four threshold levels, and an attribute set.
Declared in <ball_rule.h>
class Rule;
For each of these fields there is an accessor for obtaining the field value and a manipulator for changing that value. There are a few methods as well for directly adding/removing/searching attributes.
Additionally, this class supports a complete set of value semantic operations, including copy construction, assignment and equality comparison, and ostream printing. A precise operational definition of when two instances have the same value can be found in the description of operator== for the class. This class is exception neutral with no guarantee of rollback: If an exception is thrown during the invocation of a method on a pre-existing instance, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.
| Name | Description |
|---|---|
Rule [constructor] | Constructors |
operator= | Assign to this object the value of the specified rhs object. |
addAttribute | Add an attribute having the specified value to this object. Return 1 on success and 0 if an attribute having the same value already exists in this object. |
addPredicate | Add an attribute having the specified value to this object. Return 1 on success and 0 if an attribute having the same value already exists in this object. |
begin | Return an iterator referring to the first member of the attribute set maintained by this object. |
end | Return an iterator referring to one past the last member of the attribute set maintained by this object. |
evaluate | Return whether every attribute of this object exists in containerList. |
hasAttribute | Return true if an attribute having specified value exists in this object, and false otherwise. |
hasPredicate | Return true if an attribute having specified value exists in this object, and false otherwise. |
isMatch | Return true if the specified inputString matches the pattern of this rule, and false otherwise. |
numAttributes | Return the number of attributes managed by this object. |
numPredicates | DEPRECATED: Use numAttributes instead. |
passLevel | Return the pass level of this object. |
pattern | Return the pattern of this object. |
print | Format this object to the specified output stream. |
recordLevel | Return the record level of this object. |
removeAll | Remove all attributes from this rule. |
removeAllPredicates | DEPRECATED: Use removeAll instead. |
removeAttribute | Remove the attribute having the specified value from this object. |
removePredicate | Remove the attribute having the specified value from this object. |
setLevels | Set the four threshold levels of this object. |
setPattern | Set the pattern of this object to the specified value. |
triggerAllLevel | Return the trigger-all level of this object. |
triggerLevel | Return the trigger level of this object. |
operator BloombergLP::bslmf::NestedTraitDeclaration<Rule, UsesBslmaAllocator> | Declare that this type uses a bslma allocator. |
| Name | Description |
|---|---|
hash | Return a hash value calculated from the specified rule using the specified size as the number of slots. |
| Name | Description |
|---|---|
BloombergLP::ball::operator<< | Write the value of the specified rule to the specified output stream. Return the specified output stream. |
BloombergLP::ball::operator!= | Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. |
BloombergLP::ball::operator== | Return true if the specified lhs and rhs objects have the same value, and false otherwise. |