This is an implementation type of AttributeContext and should not be used by clients of this package. A rule evaluation cache is a mechanism for evaluating and caching whether a rule is active. A rule is considered active if all of its attributes are satisfied by the collection of attributes held in a AttributeContainerList object (i.e., Rule::evaluate returns true for the AttributeContainerList object). The rules this cache evaluates are contained in a RuleSet object. RuleSet::MaskType is a bit mask for a rule set, where each bit is a boolean value associated with the rule at the corresponding index in a rule set. An AttributeContext determines, using the isDataAvailable method, if a particular set of rules (described using a bit mask) have already been evaluated. A context accesses the current cache of rule evaluations using the knownActiveRules method. Finally, a context updates the cache of rule evaluations using the update method. Note that the isDataAvailable method should be used prior to using knownActiveRules in order to ensure the relevant rules have been evaluated and that those evaluations are up‐to‐date.
Synopsis
Declared in <ball_attributecontext.h>
class AttributeContext_RuleEvaluationCache;
Member Functions
Name |
Description |
|
Create an empty rule evaluation cache having a sequence number of ‐1. |
Clear any currently cached rule evaluation data, restoring this object to its default constructed state (empty). |
|
Return |
|
Return a bit mask indicating those rules, from the set of rules provided in the last call to |
|
Format this object to the specified output |
|
Update, for the specified |
Created with MrDocs