28 #if ! defined (octave_url_handle_manager)
29 #define octave_url_handle_manager 1
31 #include "octave-config.h"
52 : m_handle_map (), m_handle_free_list (),
53 m_next_handle (-1.0 - (
rand () + 1.0) / (RAND_MAX + 2.0)) { }
68 : m_handle_map.find (val));
70 return (p != m_handle_map.end ()) ? p->first :
url_handle ();
81 return get_object (
lookup (val));
86 return get_object (
lookup (val));
91 iterator p = (h.
ok () ? m_handle_map.find (h) : m_handle_map.end ());
93 return (p != m_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");
108 m_handle_map[h] = obj;
115 Matrix retval (1, m_handle_map.size ());
118 for (
const auto& h_obj : m_handle_map)
122 retval(i++) = h.
value ();
131 typedef std::map<url_handle, url_transfer>::iterator
iterator;
octave_idx_type lookup(const T *x, octave_idx_type n, T y)
bool is_real_scalar(void) const
double double_value(bool frc_str_conv=false) const
std::map< url_handle, url_transfer > m_handle_map
~url_handle_manager(void)=default
url_handle_manager(const url_handle_manager &)=delete
url_handle lookup(const octave_value &val)
std::set< url_handle >::const_iterator const_free_list_iterator
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 lookup(double val)
url_transfer get_object(double val)
std::set< url_handle >::iterator free_list_iterator
url_transfer get_object(const url_handle &h)
std::map< url_handle, url_transfer >::iterator iterator
std::set< url_handle > m_handle_free_list
url_transfer get_object(const octave_value &val)
bool is_valid(void) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void error(const char *fmt,...)