Exemple #1
0
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));
}
Exemple #2
0
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());
}
Exemple #3
0
void
cURLpp::Easy::reset ()
{
  myCurl->reset();
  OptionList::setOpt(OptionList());
}