146 template<
class T>
void add(CURLoption opt,
const T & val) { element_list[opt] = std::make_unique<mycurl_param_element<T> >(val); reset_read(); }
147 void clear(CURLoption opt);
148 void clear() { element_list.clear(); reset_read(); };
149 U_I size()
const {
return element_list.size(); };
150 void reset_read()
const { cursor = element_list.begin(); };
151 bool read_next(CURLoption & opt);
153 template<
class T>
void read_opt(
const T* & val)
const
155 if(cursor == element_list.end())
156 throw Erange(
"mycurl_param_list::read_opt",
"Cannot read option when no more option is available");
163 val = ptr->get_value_address();
173 template<
class T>
bool get_val(CURLoption opt,
const T* & val)
const
175 std::map<CURLoption, std::unique_ptr<mycurl_param_element_generic> >::const_iterator it = element_list.find(opt);
177 if(it == element_list.end())
185 val = ptr->get_value_address();
212 std::map<CURLoption, std::unique_ptr<mycurl_param_element_generic> > element_list;
213 mutable std::map<CURLoption, std::unique_ptr<mycurl_param_element_generic> >::const_iterator cursor;