Update the cache of rule evaluations for the specified sequence number and rules.

Synopsis

Declared in <ball_attributecontext.h>

RuleSet::MaskType
update(
    bsls::Types::Int64 sequenceNumber,
    RuleSet::MaskType relevantRulesMask,
    RuleSet const& rules,
    AttributeContainerList const& attributes);

Description

Update, for the specified sequenceNumber, the cache for those rules indicated by the specified relevantRulesMask bit mask in the specified set of rules, by evaluating those rules for the specified attributes; return the bit mask indicating those rules that are known to be active. If a bit in the returned bit mask value is set to 1, the rule at the corresponding index in rules is "active"; however, if a bit is set to 0, the corresponding rule is either not active or has not been evaluated. This operation does, however, guarantee that all the rules indicated by the relevantRulesMask will be evaluated. A particular rule is considered "active" if all of its attributes are satisfied by attributes (i.e., if Rule::evaluate returns true for attributes). The behavior is undefined unless rules is not modified during this operation (i.e., any lock associated with rules must be locked during this operation).

Return Value

bit mask of rules known to be active

Parameters

Name

Description

sequenceNumber

rule‐set sequence number for this update

relevantRulesMask

bit mask of rules to evaluate and cache

rules

set of rules to evaluate

attributes

attribute containers used to evaluate the rules

Created with MrDocs