| 430 | } |
| 431 | |
| 432 | bool match(const std::string& name) const { |
| 433 | if (!_exact.empty()) { |
| 434 | if (_exact.find(name) != _exact.end()) { |
| 435 | return true; |
| 436 | } |
| 437 | } else if (_wcs.empty()) { |
| 438 | return _on_both_empty; |
| 439 | } |
| 440 | for (size_t i = 0; i < _wcs.size(); ++i) { |
| 441 | if (wildcmp(_wcs[i].c_str(), name.c_str(), _question_mark)) { |
| 442 | return true; |
| 443 | } |
| 444 | } |
| 445 | return false; |
| 446 | } |
| 447 | |
| 448 | const std::vector<std::string>& wildcards() const { return _wcs; } |
| 449 | const std::set<std::string>& exact_names() const { return _exact; } |