void OptionHandler::addOption(Option& opt, const std::string& section) { assert(names.count(opt.getDashedName()) == 0); names[opt.getDashedName()] = &opt; for(auto& sec : sections) { if(sec.first == section) { sec.second.push_back(&opt); return; } } // Section does not exist yet sections.emplace_back(section, OptionList(1, &opt)); }
OptionHandler::OptionHandler() { // Add the general section without any options before any other sections will be added (to make sure the general section is always shown first) sections.emplace_back(GENERAL_SECTION, OptionList()); }
void cURLpp::Easy::reset () { myCurl->reset(); OptionList::setOpt(OptionList()); }