From aacd8888c13cdceaaf3e869da3cb2e253a991c56 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 1 Sep 2023 16:42:06 -0400 Subject: [PATCH] update api docs --- docs/gen__utils_8h_source.html | 147 ++-- docs/monero__daemon__model_8h_source.html | 255 +++--- docs/monero__utils_8h_source.html | 6 +- docs/monero__wallet_8h_source.html | 32 +- docs/monero__wallet__full_8h_source.html | 240 +++--- docs/monero__wallet__keys_8h_source.html | 8 +- docs/monero__wallet__model_8h_source.html | 797 +++++++++--------- ...ro_1_1monero__rpc__connection-members.html | 13 +- ...ructmonero_1_1monero__rpc__connection.html | 13 +- ...ero_1_1monero__wallet__config-members.html | 40 +- ...tructmonero_1_1monero__wallet__config.html | 18 +- 11 files changed, 786 insertions(+), 783 deletions(-) diff --git a/docs/gen__utils_8h_source.html b/docs/gen__utils_8h_source.html index 99ad4af..ac70daf 100644 --- a/docs/gen__utils_8h_source.html +++ b/docs/gen__utils_8h_source.html @@ -76,75 +76,90 @@ $(function() {
55#define gen_utils_h
56
57#include <boost/lexical_cast.hpp>
-
58#include "include_base_utils.h"
-
59#include "common/util.h"
-
60
-
64namespace gen_utils
-
65{
-
66 // ------------------------- VALUE RECONCILATION ----------------------------
-
67
-
68 // TODO: refactor common template code
-
69 template <class T, typename std::enable_if<std::is_same<T, std::string>::value, T>::type* = nullptr>
-
70 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, boost::optional<bool> resolve_defined, boost::optional<bool> resolve_true, boost::optional<bool> resolve_max, const std::string& err_msg = "") {
-
71
-
72 // check for equality
-
73 if (val1 == val2) return val1;
-
74
-
75 // resolve one value none
-
76 if (val1 == boost::none || val2 == boost::none) {
-
77 if (resolve_defined != boost::none && *resolve_defined == false) return boost::none;
-
78 else return val1 == boost::none ? val2 : val1;
-
79 }
-
80
-
81 throw std::runtime_error(std::string("Cannot reconcile strings: ") + boost::lexical_cast<std::string>(val1) + std::string(" vs ") + boost::lexical_cast<std::string>(val2) + (!err_msg.empty() ? std::string(". ") + err_msg : std::string("")));
-
82 }
-
83 template <class T, typename std::enable_if<std::is_same<T, std::string>::value, T>::type* = nullptr>
-
84 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, const std::string& err_msg = "") {
-
85 return reconcile(val1, val2, boost::none, boost::none, boost::none, err_msg);
-
86 }
-
87
-
88 template <class T, typename std::enable_if<std::is_integral<T>::value, T>::type* = nullptr>
-
89 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, boost::optional<bool> resolve_defined, boost::optional<bool> resolve_true, boost::optional<bool> resolve_max, const std::string& err_msg = "") {
+
58#include <boost/uuid/uuid.hpp>
+
59#include <boost/uuid/uuid_generators.hpp>
+
60#include <boost/uuid/uuid_io.hpp>
+
61#include <chrono>
+
62#include "include_base_utils.h"
+
63#include "common/util.h"
+
64
+
68namespace gen_utils
+
69{
+
70
+
76 static std::string get_uuid() {
+
77 boost::uuids::random_generator generator;
+
78 boost::uuids::uuid uuid = generator();
+
79 return boost::uuids::to_string(uuid);
+
80 }
+
81
+
87 static void wait_for(uint64_t duration_ms) {
+
88 std::this_thread::sleep_for(std::chrono::milliseconds(duration_ms));
+
89 }
90
-
91 // check for equality
-
92 if (val1 == val2) return val1;
-
93
-
94 // resolve one value none
-
95 if (val1 == boost::none || val2 == boost::none) {
-
96 if (resolve_defined != boost::none && *resolve_defined == false) return boost::none;
-
97 else return val1 == boost::none ? val2 : val1;
-
98 }
+
91 // ------------------------- VALUE RECONCILATION ----------------------------
+
92
+
93 // TODO: refactor common template code
+
94 template <class T, typename std::enable_if<std::is_same<T, std::string>::value, T>::type* = nullptr>
+
95 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, boost::optional<bool> resolve_defined, boost::optional<bool> resolve_true, boost::optional<bool> resolve_max, const std::string& err_msg = "") {
+
96
+
97 // check for equality
+
98 if (val1 == val2) return val1;
99
-
100 // resolve different booleans
-
101 if (resolve_true != boost::none) return (bool) val1 == *resolve_true ? val1 : val2; // if resolve true, return true, else return false
-
102
-
103 // resolve different numbers
-
104 if (resolve_max != boost::none) return *resolve_max ? std::max(*val1, *val2) : std::min(*val1, *val2);
+
100 // resolve one value none
+
101 if (val1 == boost::none || val2 == boost::none) {
+
102 if (resolve_defined != boost::none && *resolve_defined == false) return boost::none;
+
103 else return val1 == boost::none ? val2 : val1;
+
104 }
105
-
106 // cannot reconcile
-
107 throw std::runtime_error(std::string("Cannot reconcile integrals: ") + boost::lexical_cast<std::string>(val1) + std::string(" vs ") + boost::lexical_cast<std::string>(val2) + (!err_msg.empty() ? std::string(". ") + err_msg : std::string("")));
-
108 }
-
109 template <class T, typename std::enable_if<std::is_integral<T>::value, T>::type* = nullptr>
-
110 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, const std::string& err_msg = "") {
-
111 return reconcile(val1, val2, boost::none, boost::none, boost::none, err_msg);
-
112 }
-
113
-
114 template <class T>
-
115 std::vector<T> reconcile(const std::vector<T>& v1, const std::vector<T>& v2, const std::string& err_msg = "") {
-
116
-
117 // check for equality
-
118 if (v1 == v2) return v1;
-
119
-
120 // resolve one vector empty
-
121 if (v1.empty()) return v2;
-
122 if (v2.empty()) return v1;
-
123
-
124 // otherwise cannot reconcile
-
125 throw std::runtime_error("Cannot reconcile vectors" + (!err_msg.empty() ? std::string(". ") + err_msg : std::string("")));
-
126 }
-
127}
-
128#endif /* gen_utils_h */
-
Definition: gen_utils.h:65
+
106 throw std::runtime_error(std::string("Cannot reconcile strings: ") + boost::lexical_cast<std::string>(val1) + std::string(" vs ") + boost::lexical_cast<std::string>(val2) + (!err_msg.empty() ? std::string(". ") + err_msg : std::string("")));
+
107 }
+
108 template <class T, typename std::enable_if<std::is_same<T, std::string>::value, T>::type* = nullptr>
+
109 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, const std::string& err_msg = "") {
+
110 return reconcile(val1, val2, boost::none, boost::none, boost::none, err_msg);
+
111 }
+
112
+
113 template <class T, typename std::enable_if<std::is_integral<T>::value, T>::type* = nullptr>
+
114 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, boost::optional<bool> resolve_defined, boost::optional<bool> resolve_true, boost::optional<bool> resolve_max, const std::string& err_msg = "") {
+
115
+
116 // check for equality
+
117 if (val1 == val2) return val1;
+
118
+
119 // resolve one value none
+
120 if (val1 == boost::none || val2 == boost::none) {
+
121 if (resolve_defined != boost::none && *resolve_defined == false) return boost::none;
+
122 else return val1 == boost::none ? val2 : val1;
+
123 }
+
124
+
125 // resolve different booleans
+
126 if (resolve_true != boost::none) return (bool) val1 == *resolve_true ? val1 : val2; // if resolve true, return true, else return false
+
127
+
128 // resolve different numbers
+
129 if (resolve_max != boost::none) return *resolve_max ? std::max(*val1, *val2) : std::min(*val1, *val2);
+
130
+
131 // cannot reconcile
+
132 throw std::runtime_error(std::string("Cannot reconcile integrals: ") + boost::lexical_cast<std::string>(val1) + std::string(" vs ") + boost::lexical_cast<std::string>(val2) + (!err_msg.empty() ? std::string(". ") + err_msg : std::string("")));
+
133 }
+
134 template <class T, typename std::enable_if<std::is_integral<T>::value, T>::type* = nullptr>
+
135 boost::optional<T> reconcile(const boost::optional<T>& val1, const boost::optional<T>& val2, const std::string& err_msg = "") {
+
136 return reconcile(val1, val2, boost::none, boost::none, boost::none, err_msg);
+
137 }
+
138
+
139 template <class T>
+
140 std::vector<T> reconcile(const std::vector<T>& v1, const std::vector<T>& v2, const std::string& err_msg = "") {
+
141
+
142 // check for equality
+
143 if (v1 == v2) return v1;
+
144
+
145 // resolve one vector empty
+
146 if (v1.empty()) return v2;
+
147 if (v2.empty()) return v1;
+
148
+
149 // otherwise cannot reconcile
+
150 throw std::runtime_error("Cannot reconcile vectors" + (!err_msg.empty() ? std::string(". ") + err_msg : std::string("")));
+
151 }
+
152}
+
153#endif /* gen_utils_h */
+
Definition: gen_utils.h:69