28 #if ! defined (octave_url_handle_manager)
29 #define octave_url_handle_manager 1
31 #include "octave-config.h"
52 : handle_map (), handle_free_list (),
53 next_handle (-1.0 - (
rand () + 1.0) / (RAND_MAX + 2.0)) { }
68 : handle_map.find (val));
70 return (p != handle_map.end ()) ? p->first :
url_handle ();
81 return get_object (
lookup (val));
86 return get_object (
lookup (val));
91 iterator p = (h.
ok () ? handle_map.find (h) : handle_map.end ());
93 return (p != handle_map.end ()) ? p->second :
url_transfer ();
97 const std::string& user,
98 const std::string& passwd,
106 error (
"support for URL transfers was disabled when Octave was built");
118 for (
const auto& h_obj : handle_map)
131 typedef std::map<url_handle, url_transfer>::iterator
iterator;
octave_idx_type lookup(const T *x, octave_idx_type n, T y)
std::map< url_handle, url_transfer > handle_map
url_handle lookup(double val)
std::set< url_handle >::iterator free_list_iterator
url_handle lookup(const octave_value &val)
url_transfer get_object(double val)
url_transfer get_object(const url_handle &h)
std::map< url_handle, url_transfer >::iterator iterator
std::set< url_handle > handle_free_list
std::map< url_handle, url_transfer >::const_iterator const_iterator
url_handle make_url_handle(const std::string &host, const std::string &user, const std::string &passwd, std::ostream &os)
url_handle_manager(const url_handle_manager &)=delete
url_transfer get_object(const octave_value &val)
std::set< url_handle >::const_iterator const_free_list_iterator
~url_handle_manager(void)=default
bool is_valid(void) const
bool is_real_scalar(void) const
double double_value(bool frc_str_conv=false) const
void error(const char *fmt,...)
octave_value::octave_value(const Array< char > &chm, char type) return retval