| 10 | } |
| 11 | |
| 12 | AndTagExpression::AndTagExpression(const std::string& csvTagNotation) { |
| 13 | const std::shared_ptr<RegexMatch> match(csvTagNotationRegex().findAll(csvTagNotation)); |
| 14 | const RegexMatch::submatches_type submatches = match->getSubmatches(); |
| 15 | orExpressions.reserve(submatches.size()); |
| 16 | for (RegexMatch::submatches_type::const_iterator i = submatches.begin(); i != submatches.end(); |
| 17 | ++i) { |
| 18 | const std::string orCsvTagNotation = i->value; |
| 19 | orExpressions.push_back(OrTagExpression(orCsvTagNotation)); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | bool AndTagExpression::matches(const tag_list& tags) const { |
| 24 | bool match = true; |