#include <Expression.h>
Collaboration diagram for Tagcoll::TagexprContext:

Public Member Functions | |
| TagexprContext (const OpSet< std::string > &tags, const std::map< std::string, Expression > &derivedTags) | |
| Create a context for recursive tagset evaluation. | |
| bool | eval (const std::string &tag) const |
| Evaluates the input tags on the contents to see if they contain the given tag, or if they match its associated tag expression if tag is a derived tag. | |
Protected Attributes | |
| const OpSet< std::string > & | tags |
| const std::map< std::string, Expression > & | derivedTags |
| OpSet< std::string > | seen |
A derived tag is a tag which is automatically inferred when a tag expression is matched on a tagset.
TagexprContext allows the inference engine to distinguish between a normal tag or a derived tag.
This class is mainly used to support DerivedTags and has probably little applications elsewhere.
| Tagcoll::TagexprContext::TagexprContext | ( | const OpSet< std::string > & | tags, | |
| const std::map< std::string, Expression > & | derivedTags | |||
| ) | [inline] |
Create a context for recursive tagset evaluation.
Evaluation happens using a derivation table, which can list a tag as an alias for another tag expression. Whenever a tag is matched for equality with a derived tag, the match is performed with the derived tag expression instead.
| tags | The tags to evaluate | |
| derivedTags | The table of derived tags to use in the evaluation |
| bool Tagcoll::TagexprContext::eval | ( | const std::string & | tag | ) | const |
Evaluates the input tags on the contents to see if they contain the given tag, or if they match its associated tag expression if tag is a derived tag.
const OpSet<std::string>& Tagcoll::TagexprContext::tags [protected] |
const std::map<std::string, Expression>& Tagcoll::TagexprContext::derivedTags [protected] |
OpSet<std::string> Tagcoll::TagexprContext::seen [mutable, protected] |
1.5.1