This commit is contained in:
bthomee
2025-03-12 22:37:33 +00:00
parent 863da5c9e1
commit 7f0acfcddb
1732 changed files with 298086 additions and 297371 deletions

View File

@@ -99,46 +99,47 @@ $(function() {
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#define RIPPLE_APP_LEDGER_BOOKLISTENERS_H_INCLUDED</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &lt;xrpld/net/InfoSub.h&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include &lt;xrpl/protocol/MultiApiJson.h&gt;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/memory.html">memory</a>&gt;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/mutex.html">mutex</a>&gt;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html"> 32</a></span><span class="keyword">class </span><a class="code hl_class" href="classripple_1_1BookListeners.html">BookListeners</a></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>{</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#aa461e7d0d1dddc38cc59e1ded621638d"> 35</a></span> <span class="keyword">using </span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">pointer</a> = <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;BookListeners&gt;</a>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#abef13456e6335190b5d1e814b6838bd4"> 37</a></span> <a class="code hl_function" href="classripple_1_1BookListeners.html#abef13456e6335190b5d1e814b6838bd4">BookListeners</a>()</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> }</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <a class="code hl_function" href="classripple_1_1BookListeners.html#a5d7f4c227a690e895b952472a4202ca1">addSubscriber</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">InfoSub::ref</a> sub);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_function" href="classripple_1_1BookListeners.html#a53dad68c41be892909cfa1d182b54c39">removeSubscriber</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a> sub);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_function" href="classripple_1_1BookListeners.html#ace01ee147e463d71092ec8fc84d07eb8">publish</a>(<a class="code hl_struct" href="structripple_1_1detail_1_1MultiApiJson.html">MultiApiJson</a> <span class="keyword">const</span>&amp; jvObj, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">hash_set&lt;std::uint64_t&gt;</a>&amp; havePublished);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#a18dd8b67ac39506dcf7a980a4b0e250e"> 66</a></span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/recursive_mutex.html">std::recursive_mutex</a> <a class="code hl_variable" href="classripple_1_1BookListeners.html#a18dd8b67ac39506dcf7a980a4b0e250e">mLock</a>;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#a27f5d2654d8ab4b0ed518c81809b6ebc"> 68</a></span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">hash_map&lt;std::uint64_t, InfoSub::wptr&gt;</a> <a class="code hl_variable" href="classripple_1_1BookListeners.html#a27f5d2654d8ab4b0ed518c81809b6ebc">mListeners</a>;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span>};</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>} <span class="comment">// namespace ripple</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html"><div class="ttname"><a href="classripple_1_1BookListeners.html">ripple::BookListeners</a></div><div class="ttdoc">Listen to public/subscribe messages from a book.</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00032">BookListeners.h:33</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_a18dd8b67ac39506dcf7a980a4b0e250e"><div class="ttname"><a href="classripple_1_1BookListeners.html#a18dd8b67ac39506dcf7a980a4b0e250e">ripple::BookListeners::mLock</a></div><div class="ttdeci">std::recursive_mutex mLock</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00066">BookListeners.h:66</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_a27f5d2654d8ab4b0ed518c81809b6ebc"><div class="ttname"><a href="classripple_1_1BookListeners.html#a27f5d2654d8ab4b0ed518c81809b6ebc">ripple::BookListeners::mListeners</a></div><div class="ttdeci">hash_map&lt; std::uint64_t, InfoSub::wptr &gt; mListeners</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00068">BookListeners.h:68</a></div></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#include &lt;xrpl/protocol/MultiApiJson.h&gt;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/memory.html">memory</a>&gt;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/mutex.html">mutex</a>&gt;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html"> 33</a></span><span class="keyword">class </span><a class="code hl_class" href="classripple_1_1BookListeners.html">BookListeners</a></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>{</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#aa461e7d0d1dddc38cc59e1ded621638d"> 36</a></span> <span class="keyword">using </span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">pointer</a> = <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;BookListeners&gt;</a>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#abef13456e6335190b5d1e814b6838bd4"> 38</a></span> <a class="code hl_function" href="classripple_1_1BookListeners.html#abef13456e6335190b5d1e814b6838bd4">BookListeners</a>()</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> }</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <a class="code hl_function" href="classripple_1_1BookListeners.html#a5d7f4c227a690e895b952472a4202ca1">addSubscriber</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">InfoSub::ref</a> sub);</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <a class="code hl_function" href="classripple_1_1BookListeners.html#a53dad68c41be892909cfa1d182b54c39">removeSubscriber</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a> sub);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <a class="code hl_function" href="classripple_1_1BookListeners.html#ace01ee147e463d71092ec8fc84d07eb8">publish</a>(<a class="code hl_struct" href="structripple_1_1detail_1_1MultiApiJson.html">MultiApiJson</a> <span class="keyword">const</span>&amp; jvObj, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">hash_set&lt;std::uint64_t&gt;</a>&amp; havePublished);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#a18dd8b67ac39506dcf7a980a4b0e250e"> 67</a></span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/recursive_mutex.html">std::recursive_mutex</a> <a class="code hl_variable" href="classripple_1_1BookListeners.html#a18dd8b67ac39506dcf7a980a4b0e250e">mLock</a>;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="classripple_1_1BookListeners.html#a27f5d2654d8ab4b0ed518c81809b6ebc"> 69</a></span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">hash_map&lt;std::uint64_t, InfoSub::wptr&gt;</a> <a class="code hl_variable" href="classripple_1_1BookListeners.html#a27f5d2654d8ab4b0ed518c81809b6ebc">mListeners</a>;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>};</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>} <span class="comment">// namespace ripple</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html"><div class="ttname"><a href="classripple_1_1BookListeners.html">ripple::BookListeners</a></div><div class="ttdoc">Listen to public/subscribe messages from a book.</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00033">BookListeners.h:34</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_a18dd8b67ac39506dcf7a980a4b0e250e"><div class="ttname"><a href="classripple_1_1BookListeners.html#a18dd8b67ac39506dcf7a980a4b0e250e">ripple::BookListeners::mLock</a></div><div class="ttdeci">std::recursive_mutex mLock</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00067">BookListeners.h:67</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_a27f5d2654d8ab4b0ed518c81809b6ebc"><div class="ttname"><a href="classripple_1_1BookListeners.html#a27f5d2654d8ab4b0ed518c81809b6ebc">ripple::BookListeners::mListeners</a></div><div class="ttdeci">hash_map&lt; std::uint64_t, InfoSub::wptr &gt; mListeners</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00069">BookListeners.h:69</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_a53dad68c41be892909cfa1d182b54c39"><div class="ttname"><a href="classripple_1_1BookListeners.html#a53dad68c41be892909cfa1d182b54c39">ripple::BookListeners::removeSubscriber</a></div><div class="ttdeci">void removeSubscriber(std::uint64_t sub)</div><div class="ttdoc">Stop publishing to a subscriber.</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8cpp_source.html#l00032">BookListeners.cpp:32</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_a5d7f4c227a690e895b952472a4202ca1"><div class="ttname"><a href="classripple_1_1BookListeners.html#a5d7f4c227a690e895b952472a4202ca1">ripple::BookListeners::addSubscriber</a></div><div class="ttdeci">void addSubscriber(InfoSub::ref sub)</div><div class="ttdoc">Add a new subscription for this book.</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8cpp_source.html#l00025">BookListeners.cpp:25</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_abef13456e6335190b5d1e814b6838bd4"><div class="ttname"><a href="classripple_1_1BookListeners.html#abef13456e6335190b5d1e814b6838bd4">ripple::BookListeners::BookListeners</a></div><div class="ttdeci">BookListeners()</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00037">BookListeners.h:37</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_abef13456e6335190b5d1e814b6838bd4"><div class="ttname"><a href="classripple_1_1BookListeners.html#abef13456e6335190b5d1e814b6838bd4">ripple::BookListeners::BookListeners</a></div><div class="ttdeci">BookListeners()</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8h_source.html#l00038">BookListeners.h:38</a></div></div>
<div class="ttc" id="aclassripple_1_1BookListeners_html_ace01ee147e463d71092ec8fc84d07eb8"><div class="ttname"><a href="classripple_1_1BookListeners.html#ace01ee147e463d71092ec8fc84d07eb8">ripple::BookListeners::publish</a></div><div class="ttdeci">void publish(MultiApiJson const &amp;jvObj, hash_set&lt; std::uint64_t &gt; &amp;havePublished)</div><div class="ttdoc">Publish a transaction to subscribers.</div><div class="ttdef"><b>Definition:</b> <a href="BookListeners_8cpp_source.html#l00039">BookListeners.cpp:39</a></div></div>
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a></div></div>
<div class="ttc" id="amemory_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/memory.html">memory</a></div></div>