Mercurial > octave
annotate libinterp/corefcn/url-handle-manager.h @ 33617:ec2635a02328 bytecode-interpreter tip
maint: Merge default to bytecode-interpreter.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 21 May 2024 18:29:03 +0200 |
parents | 2e484f9f1f18 |
children |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
32632
2e484f9f1f18
maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
31837
diff
changeset
|
3 // Copyright (C) 2017-2024 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 // Extracted from urlwrite.cc. |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 #if ! defined (octave_url_handle_manager) |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 #define octave_url_handle_manager 1 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 #include "octave-config.h" |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 #include <cmath> |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 #include <map> |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 #include <set> |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 #include "lo-mappers.h" |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 #include "oct-handle.h" |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 #include "url-transfer.h" |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
43 OCTAVE_BEGIN_NAMESPACE(octave) |
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
44 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
45 typedef octave_handle url_handle; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
47 class OCTINTERP_API url_handle_manager |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
48 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
49 public: |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
50 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31706
diff
changeset
|
51 url_handle_manager () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
52 : m_handle_map (), m_handle_free_list (), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
53 m_next_handle (-1.0 - (rand () + 1.0) / (RAND_MAX + 2.0)) { } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 |
31837
febd82d1a8de
use new macros to consistently delete copy and move member functions
John W. Eaton <jwe@octave.org>
parents:
31771
diff
changeset
|
55 OCTAVE_DISABLE_COPY_MOVE (url_handle_manager) |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31706
diff
changeset
|
57 ~url_handle_manager () = default; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31706
diff
changeset
|
59 url_handle get_handle (); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
60 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
61 void free (const url_handle& h); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
63 url_handle lookup (double val) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
64 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
65 iterator p = (math::isnan (val) ? m_handle_map.end () |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
66 : m_handle_map.find (val)); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
68 return (p != m_handle_map.end ()) ? p->first : url_handle (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
69 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
71 url_handle lookup (const octave_value& val) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
72 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
73 return val.is_real_scalar () ? lookup (val.double_value ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
74 : url_handle (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
75 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
77 url_transfer get_object (double val) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
78 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
79 return get_object (lookup (val)); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
80 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
81 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
82 url_transfer get_object (const octave_value& val) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
83 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
84 return get_object (lookup (val)); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
85 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
86 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
87 url_transfer get_object (const url_handle& h) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
88 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
89 iterator p = (h.ok () ? m_handle_map.find (h) : m_handle_map.end ()); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
90 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
91 return (p != m_handle_map.end ()) ? p->second : url_transfer (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
92 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
93 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
94 url_handle make_url_handle (const std::string& host, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
95 const std::string& user, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
96 const std::string& passwd, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
97 std::ostream& os) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
98 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
99 url_handle h = get_handle (); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
100 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
101 url_transfer obj (host, user, passwd, os); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
102 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
103 if (! obj.is_valid ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
104 error ("support for URL transfers was disabled when Octave was built"); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
105 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
106 m_handle_map[h] = obj; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
107 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
108 return h; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
109 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
110 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31706
diff
changeset
|
111 Matrix handle_list () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
112 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
113 Matrix retval (1, m_handle_map.size ()); |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
114 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
115 octave_idx_type i = 0; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
116 for (const auto& h_obj : m_handle_map) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
117 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
118 url_handle h = h_obj.first; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
119 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
120 retval(i++) = h.value (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
121 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
122 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
123 return retval; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
124 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
126 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
127 private: |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
128 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
129 typedef std::map<url_handle, url_transfer>::iterator iterator; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
130 typedef std::map<url_handle, url_transfer>::const_iterator const_iterator; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
131 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
132 typedef std::set<url_handle>::iterator free_list_iterator; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
133 typedef std::set<url_handle>::const_iterator const_free_list_iterator; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
134 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
135 // A map of handles to curl objects. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
136 std::map<url_handle, url_transfer> m_handle_map; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
137 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
138 // The available curl handles. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
139 std::set<url_handle> m_handle_free_list; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
140 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
141 // The next handle available if handle_free_list is empty. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
142 double m_next_handle; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
143 }; |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
144 |
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
145 OCTAVE_END_NAMESPACE(octave) |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
146 |
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
147 #endif |