Ejemplo n.º 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));
}
Ejemplo n.º 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());
}
Ejemplo n.º 3
0
void
cURLpp::Easy::reset ()
{
  myCurl->reset();
  OptionList::setOpt(OptionList());
}