mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 05:25:55 +00:00
deploy: afc05659ed
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>rippled: RangeSet.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
@@ -46,6 +46,11 @@ $(function() {
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function() { init_codefold(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
@@ -115,25 +120,30 @@ $(function() {
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><a class="code hl_typedef" href="namespaceripple.html#a79dcedfb918a7b371ab7797ae9d9bf23">ClosedInterval<T></a></div>
|
||||
<div class="foldopen" id="foldopen00054" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="namespaceripple.html#ac1258b27600294cf1c6dc05ce3cf58d3"> 54</a></span><a class="code hl_function" href="namespaceripple.html#ac1258b27600294cf1c6dc05ce3cf58d3">range</a>(T low, T high)</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span>{</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="namespaceripple.html#a79dcedfb918a7b371ab7797ae9d9bf23">ClosedInterval<T></a>(low, high);</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb"> 70</a></span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb">RangeSet</a> = boost::icl::interval_set<T, std::less, ClosedInterval<T>>;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
|
||||
<div class="foldopen" id="foldopen00083" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="namespaceripple.html#ac47b38f7edefd4afd48dbf705d4c7bc6"> 83</a></span><a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(<a class="code hl_typedef" href="namespaceripple.html#a79dcedfb918a7b371ab7797ae9d9bf23">ClosedInterval<T></a> <span class="keyword">const</span>& ci)</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>{</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (ci.first() == ci.last())</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">return</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(ci.first());</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">return</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(ci.first()) + <span class="stringliteral">"-"</span> + <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(ci.last());</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
|
||||
<div class="foldopen" id="foldopen00100" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="namespaceripple.html#a7d24946b15c0dd06b8ddaa12a6946cf8"> 100</a></span><a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(<a class="code hl_typedef" href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb">RangeSet<T></a> <span class="keyword">const</span>& rs)</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>{</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">if</span> (rs.empty())</div>
|
||||
@@ -146,9 +156,11 @@ $(function() {
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">return</span> s;</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span>[[nodiscard]] <span class="keywordtype">bool</span></div>
|
||||
<div class="foldopen" id="foldopen00124" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="namespaceripple.html#a84ef8b46b58f794955c6b2b108aa5dba"> 124</a></span><a class="code hl_function" href="namespaceripple.html#a84ef8b46b58f794955c6b2b108aa5dba">from_string</a>(<a class="code hl_typedef" href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb">RangeSet<T></a>& rs, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& s)</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>{</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> intervals;</div>
|
||||
@@ -197,19 +209,22 @@ $(function() {
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> rs.clear();</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional<T></a></div>
|
||||
<div class="foldopen" id="foldopen00183" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"><a class="line" href="namespaceripple.html#a32ba9fd762aad555e761c775d3bbaf6a"> 183</a></span><a class="code hl_function" href="namespaceripple.html#a32ba9fd762aad555e761c775d3bbaf6a">prevMissing</a>(<a class="code hl_typedef" href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb">RangeSet<T></a> <span class="keyword">const</span>& rs, T t, T minVal = 0)</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span>{</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordflow">if</span> (rs.empty() || t == minVal)</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordflow">return</span> std::nullopt;</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordflow">return</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::nullopt</a>;</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <a class="code hl_typedef" href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb">RangeSet<T></a> tgt{<a class="code hl_typedef" href="namespaceripple.html#a79dcedfb918a7b371ab7797ae9d9bf23">ClosedInterval<T></a>{minVal, t - 1}};</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> tgt -= rs;</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keywordflow">if</span> (tgt.empty())</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordflow">return</span> std::nullopt;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordflow">return</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::nullopt</a>;</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="keywordflow">return</span> boost::icl::last(tgt);</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> </div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span>} <span class="comment">// namespace ripple</span></div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
|
||||
@@ -218,14 +233,15 @@ $(function() {
|
||||
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
|
||||
<div class="ttc" id="aclear_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/clear.html">std::vector::clear</a></div><div class="ttdeci">T clear(T... args)</div></div>
|
||||
<div class="ttc" id="afront_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/front.html">std::vector::front</a></div><div class="ttdeci">T front(T... args)</div></div>
|
||||
<div class="ttc" id="anamespacebeast_html_aeb241ed2f4422ea57283956ca58c5d42"><div class="ttname"><a href="namespacebeast.html#aeb241ed2f4422ea57283956ca58c5d42">beast::lexicalCastChecked</a></div><div class="ttdeci">bool lexicalCastChecked(Out &out, In in)</div><div class="ttdoc">Intelligently convert from one type to another.</div><div class="ttdef"><b>Definition:</b> <a href="LexicalCast_8h_source.html#l00200">LexicalCast.h:200</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32ba9fd762aad555e761c775d3bbaf6a"><div class="ttname"><a href="namespaceripple.html#a32ba9fd762aad555e761c775d3bbaf6a">ripple::prevMissing</a></div><div class="ttdeci">std::optional< T > prevMissing(RangeSet< T > const &rs, T t, T minVal=0)</div><div class="ttdoc">Find the largest value not in the set that is less than a given value.</div><div class="ttdef"><b>Definition:</b> <a href="RangeSet_8h_source.html#l00183">RangeSet.h:183</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a79dcedfb918a7b371ab7797ae9d9bf23"><div class="ttname"><a href="namespaceripple.html#a79dcedfb918a7b371ab7797ae9d9bf23">ripple::ClosedInterval</a></div><div class="ttdeci">boost::icl::closed_interval< T > ClosedInterval</div><div class="ttdoc">A closed interval over the domain T.</div><div class="ttdef"><b>Definition:</b> <a href="RangeSet_8h_source.html#l00045">RangeSet.h:45</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a84ef8b46b58f794955c6b2b108aa5dba"><div class="ttname"><a href="namespaceripple.html#a84ef8b46b58f794955c6b2b108aa5dba">ripple::from_string</a></div><div class="ttdeci">bool from_string(RangeSet< T > &rs, std::string const &s)</div><div class="ttdoc">Convert the given styled string to a RangeSet.</div><div class="ttdef"><b>Definition:</b> <a href="RangeSet_8h_source.html#l00124">RangeSet.h:124</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a8c2adee26b605bf80bdd122435bc40bb"><div class="ttname"><a href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb">ripple::RangeSet</a></div><div class="ttdeci">boost::icl::interval_set< T, std::less, ClosedInterval< T > > RangeSet</div><div class="ttdoc">A set of closed intervals over the domain T.</div><div class="ttdef"><b>Definition:</b> <a href="RangeSet_8h_source.html#l00070">RangeSet.h:70</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ac124fe6744b7fe887dec949b56b16d50"><div class="ttname"><a href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">ripple::to_string</a></div><div class="ttdeci">std::string to_string(base_uint< Bits, Tag > const &a)</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00630">base_uint.h:630</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ac1258b27600294cf1c6dc05ce3cf58d3"><div class="ttname"><a href="namespaceripple.html#ac1258b27600294cf1c6dc05ce3cf58d3">ripple::range</a></div><div class="ttdeci">ClosedInterval< T > range(T low, T high)</div><div class="ttdoc">Create a closed range interval.</div><div class="ttdef"><b>Definition:</b> <a href="RangeSet_8h_source.html#l00054">RangeSet.h:54</a></div></div>
|
||||
<div class="ttc" id="ais_same_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/is_same.html">std::is_same_v</a></div><div class="ttdeci">T is_same_v</div></div>
|
||||
<div class="ttc" id="anamespacebeast_html_aeb241ed2f4422ea57283956ca58c5d42"><div class="ttname"><a href="namespacebeast.html#aeb241ed2f4422ea57283956ca58c5d42">beast::lexicalCastChecked</a></div><div class="ttdeci">bool lexicalCastChecked(Out &out, In in)</div><div class="ttdoc">Intelligently convert from one type to another.</div><div class="ttdef"><b>Definition</b> <a href="LexicalCast_8h_source.html#l00200">LexicalCast.h:200</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32ba9fd762aad555e761c775d3bbaf6a"><div class="ttname"><a href="namespaceripple.html#a32ba9fd762aad555e761c775d3bbaf6a">ripple::prevMissing</a></div><div class="ttdeci">std::optional< T > prevMissing(RangeSet< T > const &rs, T t, T minVal=0)</div><div class="ttdoc">Find the largest value not in the set that is less than a given value.</div><div class="ttdef"><b>Definition</b> <a href="RangeSet_8h_source.html#l00183">RangeSet.h:183</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a79dcedfb918a7b371ab7797ae9d9bf23"><div class="ttname"><a href="namespaceripple.html#a79dcedfb918a7b371ab7797ae9d9bf23">ripple::ClosedInterval</a></div><div class="ttdeci">boost::icl::closed_interval< T > ClosedInterval</div><div class="ttdoc">A closed interval over the domain T.</div><div class="ttdef"><b>Definition</b> <a href="RangeSet_8h_source.html#l00045">RangeSet.h:45</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a84ef8b46b58f794955c6b2b108aa5dba"><div class="ttname"><a href="namespaceripple.html#a84ef8b46b58f794955c6b2b108aa5dba">ripple::from_string</a></div><div class="ttdeci">bool from_string(RangeSet< T > &rs, std::string const &s)</div><div class="ttdoc">Convert the given styled string to a RangeSet.</div><div class="ttdef"><b>Definition</b> <a href="RangeSet_8h_source.html#l00124">RangeSet.h:124</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a8c2adee26b605bf80bdd122435bc40bb"><div class="ttname"><a href="namespaceripple.html#a8c2adee26b605bf80bdd122435bc40bb">ripple::RangeSet</a></div><div class="ttdeci">boost::icl::interval_set< T, std::less, ClosedInterval< T > > RangeSet</div><div class="ttdoc">A set of closed intervals over the domain T.</div><div class="ttdef"><b>Definition</b> <a href="RangeSet_8h_source.html#l00070">RangeSet.h:70</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ac124fe6744b7fe887dec949b56b16d50"><div class="ttname"><a href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">ripple::to_string</a></div><div class="ttdeci">std::string to_string(base_uint< Bits, Tag > const &a)</div><div class="ttdef"><b>Definition</b> <a href="base__uint_8h_source.html#l00630">base_uint.h:630</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ac1258b27600294cf1c6dc05ce3cf58d3"><div class="ttname"><a href="namespaceripple.html#ac1258b27600294cf1c6dc05ce3cf58d3">ripple::range</a></div><div class="ttdeci">ClosedInterval< T > range(T low, T high)</div><div class="ttdoc">Create a closed range interval.</div><div class="ttdef"><b>Definition</b> <a href="RangeSet_8h_source.html#l00054">RangeSet.h:54</a></div></div>
|
||||
<div class="ttc" id="aoptional_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/optional.html">optional</a></div></div>
|
||||
<div class="ttc" id="apop_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/pop_back.html">std::string::pop_back</a></div><div class="ttdeci">T pop_back(T... args)</div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
@@ -235,7 +251,7 @@ $(function() {
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user