mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 07:25:51 +00:00
deploy: 023f5704d0
This commit is contained in:
@@ -98,34 +98,31 @@ $(function() {
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span><a class="code" href="namespacebeast.html">beast</a> {</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">template</span> <<span class="keyword">class</span> AgedContainer, <span class="keyword">class</span> Rep, <span class="keyword">class</span> Period></div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">typename</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/enable_if.html">std::enable_if</a> <</div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  is_aged_container <AgedContainer>::value,</div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> >::type</div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="namespacebeast.html#a5a9b62bcc4646694cbd799ad46a0b149"> 35</a></span> <a class="code" href="namespacebeast.html#a5a9b62bcc4646694cbd799ad46a0b149">expire</a> (AgedContainer& c, <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::duration <Rep, Period></a> <span class="keyword">const</span>& age)</div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> n (0);</div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keyword">auto</span> <span class="keyword">const</span> expired (c.clock().now() - age);</div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter (c.chronological.cbegin());</div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  iter != c.chronological.cend() &&</div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  iter.when() <= expired;)</div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  {</div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  iter = c.erase (iter);</div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  ++n;</div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  }</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">return</span> n;</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> }</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  </div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> }</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  </div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">typename</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/enable_if.html">std::enable_if<is_aged_container<AgedContainer>::value</a>, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a>>::</div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  type</div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="namespacebeast.html#a0d4902fd756aee03082ffc8a6f528792"> 33</a></span>  <a class="code" href="namespacebeast.html#a0d4902fd756aee03082ffc8a6f528792">expire</a>(AgedContainer& c, <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::duration<Rep, Period></a> <span class="keyword">const</span>& age)</div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> n(0);</div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">auto</span> <span class="keyword">const</span> expired(c.clock().now() - age);</div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter(c.chronological.cbegin());</div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  iter != c.chronological.cend() && iter.when() <= expired;)</div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  {</div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  iter = c.erase(iter);</div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  ++n;</div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  }</div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">return</span> n;</div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> }</div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  </div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> } <span class="comment">// namespace beast</span></div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  </div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor">#endif</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="aduration_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::duration</a></div></div>
|
||||
<div class="ttc" id="aenable_if_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/enable_if.html">std::enable_if</a></div></div>
|
||||
<div class="ttc" id="anamespacebeast_html_a5a9b62bcc4646694cbd799ad46a0b149"><div class="ttname"><a href="namespacebeast.html#a5a9b62bcc4646694cbd799ad46a0b149">beast::expire</a></div><div class="ttdeci">std::enable_if< is_aged_container< AgedContainer >::value, std::size_t >::type expire(AgedContainer &c, std::chrono::duration< Rep, Period > const &age)</div><div class="ttdoc">Expire aged container items past the specified age.</div><div class="ttdef"><b>Definition:</b> <a href="aged__container__utility_8h_source.html#l00035">aged_container_utility.h:35</a></div></div>
|
||||
<div class="ttc" id="anamespacebeast_html_a0d4902fd756aee03082ffc8a6f528792"><div class="ttname"><a href="namespacebeast.html#a0d4902fd756aee03082ffc8a6f528792">beast::expire</a></div><div class="ttdeci">std::enable_if< is_aged_container< AgedContainer >::value, std::size_t >::type expire(AgedContainer &c, std::chrono::duration< Rep, Period > const &age)</div><div class="ttdoc">Expire aged container items past the specified age.</div><div class="ttdef"><b>Definition:</b> <a href="aged__container__utility_8h_source.html#l00033">aged_container_utility.h:33</a></div></div>
|
||||
<div class="ttc" id="asize_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div></div>
|
||||
<div class="ttc" id="atype_traits_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/type_traits.html">type_traits</a></div></div>
|
||||
<div class="ttc" id="anamespacebeast_html"><div class="ttname"><a href="namespacebeast.html">beast</a></div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00582">base_uint.h:582</a></div></div>
|
||||
<div class="ttc" id="anamespacebeast_html"><div class="ttname"><a href="namespacebeast.html">beast</a></div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00646">base_uint.h:646</a></div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||
|
||||
Reference in New Issue
Block a user