134#ifndef LIBCURL_AVAILABLE
151 template<
class T>
void add(CURLoption opt,
const T & val) { element_list[opt] = std::make_unique<mycurl_param_element<T> >(val); reset_read(); }
152 void clear(CURLoption opt);
153 void clear() { element_list.clear(); reset_read(); };
154 U_I size()
const {
return element_list.size(); };
155 void reset_read()
const { cursor = element_list.begin(); };
156 bool read_next(CURLoption & opt);
158 template<
class T>
void read_opt(
const T* & val)
const
160 if(cursor == element_list.end())
161 throw Erange(
"mycurl_param_list::read_opt",
"Cannot read option when no more option is available");
168 val = ptr->get_value_address();
178 template<
class T>
bool get_val(CURLoption opt,
const T* & val)
const
180 std::map<CURLoption, std::unique_ptr<mycurl_param_element_generic> >::const_iterator it = element_list.find(opt);
182 if(it == element_list.end())
190 val = ptr->get_value_address();
217 std::map<CURLoption, std::unique_ptr<mycurl_param_element_generic> > element_list;
218 mutable std::map<CURLoption, std::unique_ptr<mycurl_param_element_generic> >::const_iterator cursor;