| 601 | struct Finder |
| 602 | { |
| 603 | static void Find(const ParamClass& cls, const std::string& prefix, const std::string& name, |
| 604 | std::vector<std::string>& results) |
| 605 | { |
| 606 | std::string nameLower = name; |
| 607 | std::transform(nameLower.begin(), nameLower.end(), nameLower.begin(), ::tolower); |
| 608 | for (int i = 0; i < cls.GetEntryCount(); i++) |
| 609 | { |
| 610 | const ParamEntry& e = cls.GetEntry(i); |
| 611 | std::string en = e.GetName().Data(); |
| 612 | std::string enLower = en; |
| 613 | std::transform(enLower.begin(), enLower.end(), enLower.begin(), ::tolower); |
| 614 | std::string path = prefix.empty() ? en : prefix + " >> " + en; |
| 615 | if (enLower.find(nameLower) != std::string::npos) |
| 616 | results.push_back(path); |
| 617 | if (e.IsClass()) |
| 618 | { |
| 619 | const ParamClass* sub = e.GetClassInterface(); |
| 620 | if (sub) |
| 621 | Find(*sub, path, name, results); |
| 622 | } |
| 623 | } |
| 624 | } |
| 625 | }; |
| 626 | std::vector<std::string> results; |
| 627 | Finder::Find(cfg, "", q, results); |
nothing calls this directly
no test coverage detected