| 709 | // ============================================================================================================== |
| 710 | |
| 711 | std::string Parser::getStr(const std::string &name) const |
| 712 | { |
| 713 | for (auto &opt : iter->options) { |
| 714 | if (opt.name != name) continue;// linear search |
| 715 | std::string str = opt.value;// deep copy since it might get modified by map |
| 716 | processor(str); |
| 717 | return str; |
| 718 | } |
| 719 | throw std::invalid_argument(iter->name+": Parser::getStr: no option named \""+name+"\""); |
| 720 | }// Parser::getStr |
| 721 | |
| 722 | // ============================================================================================================== |
| 723 | |