Files
rippled/protocol_2Fees_8h_source.html
2026-02-04 06:53:36 -08:00

131 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<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.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: Fees.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">rippled
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_0103a8ad82dcc2c51f5cde661b4b5cb7.html">xrpl</a></li><li class="navelem"><a class="el" href="dir_8d04e3c0b58cad28d7755ed462d1b6c0.html">protocol</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">protocol/Fees.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include &lt;xrpl/protocol/XRPAmount.h&gt;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacexrpl.html">xrpl</a> {</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="foldopen" id="foldopen00012" data-start="{" data-end="};">
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html"> 12</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structxrpl_1_1Fees.html">Fees</a></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span>{</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html#ae14119324de0cc548d66e9f621c23046"> 14</a></span> <a class="code hl_class" href="classxrpl_1_1XRPAmount.html">XRPAmount</a> <a class="code hl_variable" href="structxrpl_1_1Fees.html#ae14119324de0cc548d66e9f621c23046">base</a>{0}; <span class="comment">// Reference tx cost (drops)</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html#a5bc5c85801c3de7986446d8887219767"> 15</a></span> <a class="code hl_class" href="classxrpl_1_1XRPAmount.html">XRPAmount</a> <a class="code hl_variable" href="structxrpl_1_1Fees.html#a5bc5c85801c3de7986446d8887219767">reserve</a>{0}; <span class="comment">// Reserve base (drops)</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html#ad23f2272fc932d0f4aca4f8d9283e2d1"> 16</a></span> <a class="code hl_class" href="classxrpl_1_1XRPAmount.html">XRPAmount</a> <a class="code hl_variable" href="structxrpl_1_1Fees.html#ad23f2272fc932d0f4aca4f8d9283e2d1">increment</a>{0}; <span class="comment">// Reserve increment (drops)</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html#abebb364a1bf0cccceaad27349dc3e923"> 18</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="structxrpl_1_1Fees.html#abebb364a1bf0cccceaad27349dc3e923">Fees</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html#a11b5770e5b49877a9431401ac87ad55a"> 19</a></span> <a class="code hl_function" href="structxrpl_1_1Fees.html#a11b5770e5b49877a9431401ac87ad55a">Fees</a>(<a class="code hl_struct" href="structxrpl_1_1Fees.html">Fees</a> <span class="keyword">const</span>&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <a class="code hl_struct" href="structxrpl_1_1Fees.html">Fees</a>&amp;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html#af2989892d4699dc63221beea4138207b"> 21</a></span> <a class="code hl_function" href="structxrpl_1_1Fees.html#af2989892d4699dc63221beea4138207b">operator=</a>(<a class="code hl_struct" href="structxrpl_1_1Fees.html">Fees</a> <span class="keyword">const</span>&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_class" href="classxrpl_1_1XRPAmount.html">XRPAmount</a></div>
<div class="foldopen" id="foldopen00029" data-start="{" data-end="}">
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="structxrpl_1_1Fees.html#a4ec024b00a23017e5eb38501a874aff6"> 29</a></span> <a class="code hl_function" href="structxrpl_1_1Fees.html#a4ec024b00a23017e5eb38501a874aff6">accountReserve</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> ownerCount)<span class="keyword"> const</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="structxrpl_1_1Fees.html#a5bc5c85801c3de7986446d8887219767">reserve</a> + ownerCount * <a class="code hl_variable" href="structxrpl_1_1Fees.html#ad23f2272fc932d0f4aca4f8d9283e2d1">increment</a>;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> }</div>
</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>};</div>
</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="comment">// namespace xrpl</span></div>
<div class="ttc" id="aclassxrpl_1_1XRPAmount_html"><div class="ttname"><a href="classxrpl_1_1XRPAmount.html">xrpl::XRPAmount</a></div><div class="ttdef"><b>Definition</b> <a href="XRPAmount_8h_source.html#l00019">XRPAmount.h:23</a></div></div>
<div class="ttc" id="anamespacexrpl_html"><div class="ttname"><a href="namespacexrpl.html">xrpl</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#l00005">algorithm.h:5</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="astructxrpl_1_1Fees_html"><div class="ttname"><a href="structxrpl_1_1Fees.html">xrpl::Fees</a></div><div class="ttdoc">Reflects the fee settings for a particular ledger.</div><div class="ttdef"><b>Definition</b> <a href="protocol_2Fees_8h_source.html#l00012">protocol/Fees.h:13</a></div></div>
<div class="ttc" id="astructxrpl_1_1Fees_html_a11b5770e5b49877a9431401ac87ad55a"><div class="ttname"><a href="structxrpl_1_1Fees.html#a11b5770e5b49877a9431401ac87ad55a">xrpl::Fees::Fees</a></div><div class="ttdeci">Fees(Fees const &amp;)=default</div></div>
<div class="ttc" id="astructxrpl_1_1Fees_html_a4ec024b00a23017e5eb38501a874aff6"><div class="ttname"><a href="structxrpl_1_1Fees.html#a4ec024b00a23017e5eb38501a874aff6">xrpl::Fees::accountReserve</a></div><div class="ttdeci">XRPAmount accountReserve(std::size_t ownerCount) const</div><div class="ttdoc">Returns the account reserve given the owner count, in drops.</div><div class="ttdef"><b>Definition</b> <a href="protocol_2Fees_8h_source.html#l00029">protocol/Fees.h:29</a></div></div>
<div class="ttc" id="astructxrpl_1_1Fees_html_a5bc5c85801c3de7986446d8887219767"><div class="ttname"><a href="structxrpl_1_1Fees.html#a5bc5c85801c3de7986446d8887219767">xrpl::Fees::reserve</a></div><div class="ttdeci">XRPAmount reserve</div><div class="ttdef"><b>Definition</b> <a href="protocol_2Fees_8h_source.html#l00015">protocol/Fees.h:15</a></div></div>
<div class="ttc" id="astructxrpl_1_1Fees_html_abebb364a1bf0cccceaad27349dc3e923"><div class="ttname"><a href="structxrpl_1_1Fees.html#abebb364a1bf0cccceaad27349dc3e923">xrpl::Fees::Fees</a></div><div class="ttdeci">Fees()=default</div></div>
<div class="ttc" id="astructxrpl_1_1Fees_html_ad23f2272fc932d0f4aca4f8d9283e2d1"><div class="ttname"><a href="structxrpl_1_1Fees.html#ad23f2272fc932d0f4aca4f8d9283e2d1">xrpl::Fees::increment</a></div><div class="ttdeci">XRPAmount increment</div><div class="ttdef"><b>Definition</b> <a href="protocol_2Fees_8h_source.html#l00016">protocol/Fees.h:16</a></div></div>
<div class="ttc" id="astructxrpl_1_1Fees_html_ae14119324de0cc548d66e9f621c23046"><div class="ttname"><a href="structxrpl_1_1Fees.html#ae14119324de0cc548d66e9f621c23046">xrpl::Fees::base</a></div><div class="ttdeci">XRPAmount base</div><div class="ttdef"><b>Definition</b> <a href="protocol_2Fees_8h_source.html#l00014">protocol/Fees.h:14</a></div></div>
<div class="ttc" id="astructxrpl_1_1Fees_html_af2989892d4699dc63221beea4138207b"><div class="ttname"><a href="structxrpl_1_1Fees.html#af2989892d4699dc63221beea4138207b">xrpl::Fees::operator=</a></div><div class="ttdeci">Fees &amp; operator=(Fees const &amp;)=default</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<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>