MCPcopy Create free account
hub / github.com/apache/brpc / match

Method match

src/bvar/variable.cpp:432–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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; }

Callers 2

dump_exposedMethod · 0.80
dumpMethod · 0.80

Calls 6

wildcmpFunction · 0.70
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected