Files
entt/resource_8hpp_source.html
2025-03-19 15:49:42 +01:00

304 lines
42 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.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EnTT: src/entt/resource/resource.hpp 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>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.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-awesome.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">EnTT<span id="projectnumber">&#160;3.15.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<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">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @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',false);
$(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 */
$(function(){ initResizable(false); });
/* @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_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_66e9674e8206a335795995fa32a03c91.html">entt</a></li><li class="navelem"><a class="el" href="dir_85dbee8884f1b3a817fa7eff8dff73ec.html">resource</a></li> </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
<div class="headertitle"><div class="title">resource.hpp</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">#ifndef ENTT_RESOURCE_RESOURCE_HPP</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define ENTT_RESOURCE_RESOURCE_HPP</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;type_traits&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;fwd.hpp&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceentt.html">entt</a> {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Type&gt;</div>
<div class="foldopen" id="foldopen00022" data-start="{" data-end="};">
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html"> 22</a></span><span class="keyword">class </span>resource {</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span>&gt;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">friend</span> <span class="keyword">class </span>resource;</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="keyword">template</span>&lt;<span class="keyword">typename</span> Other&gt;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> is_acceptable = !std::is_same_v&lt;Type, Other&gt; &amp;&amp; std::is_constructible_v&lt;Type &amp;, Other &amp;&gt;;</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">public</span>:</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a26674fadd2d6b8be621375d4b3195836"> 31</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1resource.html#a26674fadd2d6b8be621375d4b3195836">element_type</a> = Type;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#ae7e7cbc1c49a5c8d1c2f9714f7863182"> 33</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1resource.html#ae7e7cbc1c49a5c8d1c2f9714f7863182">handle_type</a> = std::shared_ptr&lt;element_type&gt;;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span></div>
<div class="foldopen" id="foldopen00036" data-start="{" data-end="}">
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#ac4972d8dc6b7bda2b1568bfe2166a4b9"> 36</a></span> <a class="code hl_function" href="classentt_1_1resource.html#ac4972d8dc6b7bda2b1568bfe2166a4b9">resource</a>() noexcept</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> : value{} {}</div>
</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span></div>
<div class="foldopen" id="foldopen00043" data-start="{" data-end="}">
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a936d0b259b7a6c280f87b64332bb50a5"> 43</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classentt_1_1resource.html#a936d0b259b7a6c280f87b64332bb50a5">resource</a>(<a class="code hl_typedef" href="classentt_1_1resource.html#ae7e7cbc1c49a5c8d1c2f9714f7863182">handle_type</a> res) noexcept</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> : value{std::move(res)} {}</div>
</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a2dc2eaa16ff968418e62f882f672ec69"> 47</a></span> <a class="code hl_function" href="classentt_1_1resource.html#a2dc2eaa16ff968418e62f882f672ec69">resource</a>(<span class="keyword">const</span> resource &amp;) <span class="keyword">noexcept</span> = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#afcea4e846c96c313bfcbab0935d5e8db"> 50</a></span> <a class="code hl_function" href="classentt_1_1resource.html#afcea4e846c96c313bfcbab0935d5e8db">resource</a>(resource &amp;&amp;) noexcept = default;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> template&lt;typename Other&gt;</div>
<div class="foldopen" id="foldopen00059" data-start="{" data-end="}">
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a884bb0ae510b8811579b7f0b7120799e"> 59</a></span> resource(const resource&lt;Other&gt; &amp;other, <a class="code hl_typedef" href="classentt_1_1resource.html#a26674fadd2d6b8be621375d4b3195836">element_type</a> &amp;res) noexcept</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> : value{other.value, std::addressof(res)} {}</div>
</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Other, <span class="keyword">typename</span> = std::enable_if_t&lt;is_acceptable&lt;Other&gt;&gt;&gt;</div>
<div class="foldopen" id="foldopen00068" data-start="{" data-end="}">
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a1650c75857ed7d9682ff43d1578ac73b"> 68</a></span> <a class="code hl_function" href="classentt_1_1resource.html#a1650c75857ed7d9682ff43d1578ac73b">resource</a>(<span class="keyword">const</span> resource&lt;Other&gt; &amp;other) noexcept</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> : value{other.value} {}</div>
</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Other, <span class="keyword">typename</span> = std::enable_if_t&lt;is_acceptable&lt;Other&gt;&gt;&gt;</div>
<div class="foldopen" id="foldopen00077" data-start="{" data-end="}">
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#afb2ba4422ecf3564ef14a03fa77d65f8"> 77</a></span> <a class="code hl_function" href="classentt_1_1resource.html#afb2ba4422ecf3564ef14a03fa77d65f8">resource</a>(resource&lt;Other&gt; &amp;&amp;other) noexcept</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> : value{std::move(other.value)} {}</div>
</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#ace158e095d852c0159d66cc8d1548a76"> 81</a></span> <a class="code hl_function" href="classentt_1_1resource.html#ace158e095d852c0159d66cc8d1548a76">~resource</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a712fbb5bb404c4510999ef9383651f5d"> 87</a></span> resource &amp;<a class="code hl_function" href="classentt_1_1resource.html#a712fbb5bb404c4510999ef9383651f5d">operator=</a>(<span class="keyword">const</span> resource &amp;) <span class="keyword">noexcept</span> = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a8b209d227259b38f2a8a90f59b93894c"> 93</a></span> resource &amp;<a class="code hl_function" href="classentt_1_1resource.html#a8b209d227259b38f2a8a90f59b93894c">operator=</a>(resource &amp;&amp;) noexcept = default;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> template&lt;typename Other, typename = std::enable_if_t&lt;is_acceptable&lt;Other&gt;&gt;&gt;</div>
<div class="foldopen" id="foldopen00102" data-start="{" data-end="}">
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a4f265832bcfbe190b85cacd9c3f439b2"> 102</a></span> resource &amp;operator=(const resource&lt;Other&gt; &amp;other) noexcept {</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> value = other.value;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Other, <span class="keyword">typename</span> = std::enable_if_t&lt;is_acceptable&lt;Other&gt;&gt;&gt;</div>
<div class="foldopen" id="foldopen00114" data-start="{" data-end="}">
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a3d5ead24b83945b4fbed0aaca5a9c7e8"> 114</a></span> resource &amp;<a class="code hl_function" href="classentt_1_1resource.html#a3d5ead24b83945b4fbed0aaca5a9c7e8">operator=</a>(resource&lt;Other&gt; &amp;&amp;other) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> value = std::move(other.value);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span></div>
<div class="foldopen" id="foldopen00123" data-start="{" data-end="}">
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a9e96e84b8f36937266087163cfe09aaf"> 123</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1resource.html#a9e96e84b8f36937266087163cfe09aaf">swap</a>(resource &amp;other) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keyword">using </span>std::swap;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_function" href="classentt_1_1resource.html#a9e96e84b8f36937266087163cfe09aaf">swap</a>(value, other.value);</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span></div>
<div class="foldopen" id="foldopen00136" data-start="{" data-end="}">
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a3e7db8eefa9359ac9988d834b3962207"> 136</a></span> [[nodiscard]] <a class="code hl_typedef" href="classentt_1_1resource.html#a26674fadd2d6b8be621375d4b3195836">element_type</a> &amp;<a class="code hl_function" href="classentt_1_1resource.html#a3e7db8eefa9359ac9988d834b3962207">operator*</a>() const noexcept {</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">return</span> *value;</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span></div>
<div class="foldopen" id="foldopen00141" data-start="{" data-end="}">
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#ab4ab5d954d3603d3080e5434691f81b9"> 141</a></span> [[nodiscard]] <span class="keyword">operator</span> <a class="code hl_typedef" href="classentt_1_1resource.html#a26674fadd2d6b8be621375d4b3195836">element_type</a> &amp;() <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">return</span> *value;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> }</div>
</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span></div>
<div class="foldopen" id="foldopen00149" data-start="{" data-end="}">
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a7b38d4c222cb67f5576872dcb8fe1d13"> 149</a></span> [[nodiscard]] <a class="code hl_typedef" href="classentt_1_1resource.html#a26674fadd2d6b8be621375d4b3195836">element_type</a> *<a class="code hl_function" href="classentt_1_1resource.html#a7b38d4c222cb67f5576872dcb8fe1d13">operator-&gt;</a>() const noexcept {</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">return</span> value.get();</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> }</div>
</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span></div>
<div class="foldopen" id="foldopen00157" data-start="{" data-end="}">
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a45e0fc4a3de1153c781729a79a7d5314"> 157</a></span> [[nodiscard]] <span class="keyword">explicit</span> <span class="keyword">operator</span> bool() const noexcept {</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">bool</span><span class="keyword">&gt;</span>(value);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> }</div>
</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span></div>
<div class="foldopen" id="foldopen00162" data-start="{" data-end="}">
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a883d62138c381c76896b516ddc5b5391"> 162</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1resource.html#a883d62138c381c76896b516ddc5b5391">reset</a>() {</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> value.reset();</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> }</div>
</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span></div>
<div class="foldopen" id="foldopen00170" data-start="{" data-end="}">
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a80722fe49df8f2e2d4ede7437797500b"> 170</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1resource.html#a80722fe49df8f2e2d4ede7437797500b">reset</a>(<a class="code hl_typedef" href="classentt_1_1resource.html#ae7e7cbc1c49a5c8d1c2f9714f7863182">handle_type</a> other) {</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> value = std::move(other);</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> }</div>
</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span></div>
<div class="foldopen" id="foldopen00178" data-start="{" data-end="}">
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="classentt_1_1resource.html#a54b9a81a75cae1cba84c940e653a9f19"> 178</a></span> [[nodiscard]] <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1resource.html#ae7e7cbc1c49a5c8d1c2f9714f7863182">handle_type</a> &amp;<a class="code hl_function" href="classentt_1_1resource.html#a54b9a81a75cae1cba84c940e653a9f19">handle</a>() const noexcept {</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordflow">return</span> value;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> }</div>
</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> </div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <a class="code hl_typedef" href="classentt_1_1resource.html#ae7e7cbc1c49a5c8d1c2f9714f7863182">handle_type</a> value;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span>};</div>
</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;</div>
<div class="foldopen" id="foldopen00195" data-start="{" data-end="}">
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="namespaceentt.html#a59c12ec665a2bdc1a99e6a6298772adf"> 195</a></span>[[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#af7c61951b721a1e3612cf536bd707501">operator==</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Lhs&gt;</a> &amp;lhs, <span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Rhs&gt;</a> &amp;rhs) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordflow">return</span> (std::addressof(*lhs) == std::addressof(*rhs));</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span>}</div>
</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;</div>
<div class="foldopen" id="foldopen00208" data-start="{" data-end="}">
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"><a class="line" href="namespaceentt.html#a73315d70b75d683d36c09fce559fd6d6"> 208</a></span>[[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#ad9accc71a383509ada028f7fa2b767bf">operator!=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Lhs&gt;</a> &amp;lhs, <span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Rhs&gt;</a> &amp;rhs) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keywordflow">return</span> !(lhs == rhs);</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span>}</div>
</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;</div>
<div class="foldopen" id="foldopen00221" data-start="{" data-end="}">
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="namespaceentt.html#a514ed3fdf758d9d0cb616424d570e68d"> 221</a></span>[[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#aa88e297d57dd5547afcde8dd291c4b8f">operator&lt;</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Lhs&gt;</a> &amp;lhs, <span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Rhs&gt;</a> &amp;rhs) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="keywordflow">return</span> (std::addressof(*lhs) &lt; std::addressof(*rhs));</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span>}</div>
</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;</div>
<div class="foldopen" id="foldopen00234" data-start="{" data-end="}">
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"><a class="line" href="namespaceentt.html#a9cbf699fc7665abc206832e0d70d812a"> 234</a></span>[[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#aec8131af000055ceab85646c14f234ad">operator&gt;</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Lhs&gt;</a> &amp;lhs, <span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Rhs&gt;</a> &amp;rhs) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="keywordflow">return</span> rhs &lt; lhs;</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span>}</div>
</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span></div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;</div>
<div class="foldopen" id="foldopen00248" data-start="{" data-end="}">
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"><a class="line" href="namespaceentt.html#a687a34a8c4a32c0e4018b38dd2041417"> 248</a></span>[[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#a8c763e890bb00479a6a6aeae3b2a75f0">operator&lt;=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Lhs&gt;</a> &amp;lhs, <span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Rhs&gt;</a> &amp;rhs) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordflow">return</span> !(lhs &gt; rhs);</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span>}</div>
</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span></div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;</div>
<div class="foldopen" id="foldopen00262" data-start="{" data-end="}">
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"><a class="line" href="namespaceentt.html#a55ce0b2a8f91b438dba5febd8d79f61c"> 262</a></span>[[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#adadb88dfb4278df554e7ffec5361ece4">operator&gt;=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Lhs&gt;</a> &amp;lhs, <span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1resource.html">resource&lt;Rhs&gt;</a> &amp;rhs) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> <span class="keywordflow">return</span> !(lhs &lt; rhs);</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span>}</div>
</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span>} <span class="comment">// namespace entt</span></div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> </div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassentt_1_1resource_html"><div class="ttname"><a href="classentt_1_1resource.html">entt::resource</a></div><div class="ttdoc">Basic resource handle.</div><div class="ttdef"><b>Definition</b> <a href="#l00022">resource.hpp:22</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a1650c75857ed7d9682ff43d1578ac73b"><div class="ttname"><a href="classentt_1_1resource.html#a1650c75857ed7d9682ff43d1578ac73b">entt::resource::resource</a></div><div class="ttdeci">resource(const resource&lt; Other &gt; &amp;other) noexcept</div><div class="ttdoc">Copy constructs a handle which shares ownership of the resource.</div><div class="ttdef"><b>Definition</b> <a href="#l00068">resource.hpp:68</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a26674fadd2d6b8be621375d4b3195836"><div class="ttname"><a href="classentt_1_1resource.html#a26674fadd2d6b8be621375d4b3195836">entt::resource::element_type</a></div><div class="ttdeci">Type element_type</div><div class="ttdoc">Resource type.</div><div class="ttdef"><b>Definition</b> <a href="#l00031">resource.hpp:31</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a2dc2eaa16ff968418e62f882f672ec69"><div class="ttname"><a href="classentt_1_1resource.html#a2dc2eaa16ff968418e62f882f672ec69">entt::resource::resource</a></div><div class="ttdeci">resource(const resource &amp;) noexcept=default</div><div class="ttdoc">Default copy constructor.</div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a3d5ead24b83945b4fbed0aaca5a9c7e8"><div class="ttname"><a href="classentt_1_1resource.html#a3d5ead24b83945b4fbed0aaca5a9c7e8">entt::resource::operator=</a></div><div class="ttdeci">resource &amp; operator=(resource&lt; Other &gt; &amp;&amp;other) noexcept</div><div class="ttdoc">Move assignment operator from foreign handle.</div><div class="ttdef"><b>Definition</b> <a href="#l00114">resource.hpp:114</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a3e7db8eefa9359ac9988d834b3962207"><div class="ttname"><a href="classentt_1_1resource.html#a3e7db8eefa9359ac9988d834b3962207">entt::resource::operator*</a></div><div class="ttdeci">element_type &amp; operator*() const noexcept</div><div class="ttdoc">Returns a reference to the managed resource.</div><div class="ttdef"><b>Definition</b> <a href="#l00136">resource.hpp:136</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a54b9a81a75cae1cba84c940e653a9f19"><div class="ttname"><a href="classentt_1_1resource.html#a54b9a81a75cae1cba84c940e653a9f19">entt::resource::handle</a></div><div class="ttdeci">const handle_type &amp; handle() const noexcept</div><div class="ttdoc">Returns the underlying resource handle.</div><div class="ttdef"><b>Definition</b> <a href="#l00178">resource.hpp:178</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a712fbb5bb404c4510999ef9383651f5d"><div class="ttname"><a href="classentt_1_1resource.html#a712fbb5bb404c4510999ef9383651f5d">entt::resource::operator=</a></div><div class="ttdeci">resource &amp; operator=(const resource &amp;) noexcept=default</div><div class="ttdoc">Default copy assignment operator.</div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a7b38d4c222cb67f5576872dcb8fe1d13"><div class="ttname"><a href="classentt_1_1resource.html#a7b38d4c222cb67f5576872dcb8fe1d13">entt::resource::operator-&gt;</a></div><div class="ttdeci">element_type * operator-&gt;() const noexcept</div><div class="ttdoc">Returns a pointer to the managed resource.</div><div class="ttdef"><b>Definition</b> <a href="#l00149">resource.hpp:149</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a80722fe49df8f2e2d4ede7437797500b"><div class="ttname"><a href="classentt_1_1resource.html#a80722fe49df8f2e2d4ede7437797500b">entt::resource::reset</a></div><div class="ttdeci">void reset(handle_type other)</div><div class="ttdoc">Replaces the managed resource.</div><div class="ttdef"><b>Definition</b> <a href="#l00170">resource.hpp:170</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a883d62138c381c76896b516ddc5b5391"><div class="ttname"><a href="classentt_1_1resource.html#a883d62138c381c76896b516ddc5b5391">entt::resource::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Releases the ownership of the managed resource.</div><div class="ttdef"><b>Definition</b> <a href="#l00162">resource.hpp:162</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a8b209d227259b38f2a8a90f59b93894c"><div class="ttname"><a href="classentt_1_1resource.html#a8b209d227259b38f2a8a90f59b93894c">entt::resource::operator=</a></div><div class="ttdeci">resource &amp; operator=(resource &amp;&amp;) noexcept=default</div><div class="ttdoc">Default move assignment operator.</div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a936d0b259b7a6c280f87b64332bb50a5"><div class="ttname"><a href="classentt_1_1resource.html#a936d0b259b7a6c280f87b64332bb50a5">entt::resource::resource</a></div><div class="ttdeci">resource(handle_type res) noexcept</div><div class="ttdoc">Creates a new resource handle.</div><div class="ttdef"><b>Definition</b> <a href="#l00043">resource.hpp:43</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_a9e96e84b8f36937266087163cfe09aaf"><div class="ttname"><a href="classentt_1_1resource.html#a9e96e84b8f36937266087163cfe09aaf">entt::resource::swap</a></div><div class="ttdeci">void swap(resource &amp;other) noexcept</div><div class="ttdoc">Exchanges the content with that of a given resource.</div><div class="ttdef"><b>Definition</b> <a href="#l00123">resource.hpp:123</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_ac4972d8dc6b7bda2b1568bfe2166a4b9"><div class="ttname"><a href="classentt_1_1resource.html#ac4972d8dc6b7bda2b1568bfe2166a4b9">entt::resource::resource</a></div><div class="ttdeci">resource() noexcept</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition</b> <a href="#l00036">resource.hpp:36</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_ace158e095d852c0159d66cc8d1548a76"><div class="ttname"><a href="classentt_1_1resource.html#ace158e095d852c0159d66cc8d1548a76">entt::resource::~resource</a></div><div class="ttdeci">~resource()=default</div><div class="ttdoc">Default destructor.</div></div>
<div class="ttc" id="aclassentt_1_1resource_html_ae7e7cbc1c49a5c8d1c2f9714f7863182"><div class="ttname"><a href="classentt_1_1resource.html#ae7e7cbc1c49a5c8d1c2f9714f7863182">entt::resource::handle_type</a></div><div class="ttdeci">std::shared_ptr&lt; element_type &gt; handle_type</div><div class="ttdoc">Handle type.</div><div class="ttdef"><b>Definition</b> <a href="#l00033">resource.hpp:33</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_afb2ba4422ecf3564ef14a03fa77d65f8"><div class="ttname"><a href="classentt_1_1resource.html#afb2ba4422ecf3564ef14a03fa77d65f8">entt::resource::resource</a></div><div class="ttdeci">resource(resource&lt; Other &gt; &amp;&amp;other) noexcept</div><div class="ttdoc">Move constructs a handle which takes ownership of the resource.</div><div class="ttdef"><b>Definition</b> <a href="#l00077">resource.hpp:77</a></div></div>
<div class="ttc" id="aclassentt_1_1resource_html_afcea4e846c96c313bfcbab0935d5e8db"><div class="ttname"><a href="classentt_1_1resource.html#afcea4e846c96c313bfcbab0935d5e8db">entt::resource::resource</a></div><div class="ttdeci">resource(resource &amp;&amp;) noexcept=default</div><div class="ttdoc">Default move constructor.</div></div>
<div class="ttc" id="anamespaceentt_html"><div class="ttname"><a href="namespaceentt.html">entt</a></div><div class="ttdoc">EnTT default namespace.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00022">dense_map.hpp:22</a></div></div>
<div class="ttc" id="anamespaceentt_html_a8c763e890bb00479a6a6aeae3b2a75f0"><div class="ttname"><a href="namespaceentt.html#a8c763e890bb00479a6a6aeae3b2a75f0">entt::operator&lt;=</a></div><div class="ttdeci">constexpr bool operator&lt;=(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00257">hashed_string.hpp:257</a></div></div>
<div class="ttc" id="anamespaceentt_html_aa88e297d57dd5547afcde8dd291c4b8f"><div class="ttname"><a href="namespaceentt.html#aa88e297d57dd5547afcde8dd291c4b8f">entt::operator&lt;</a></div><div class="ttdeci">constexpr bool operator&lt;(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00244">hashed_string.hpp:244</a></div></div>
<div class="ttc" id="anamespaceentt_html_ad9accc71a383509ada028f7fa2b767bf"><div class="ttname"><a href="namespaceentt.html#ad9accc71a383509ada028f7fa2b767bf">entt::operator!=</a></div><div class="ttdeci">constexpr bool operator!=(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00232">hashed_string.hpp:232</a></div></div>
<div class="ttc" id="anamespaceentt_html_adadb88dfb4278df554e7ffec5361ece4"><div class="ttname"><a href="namespaceentt.html#adadb88dfb4278df554e7ffec5361ece4">entt::operator&gt;=</a></div><div class="ttdeci">constexpr bool operator&gt;=(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00283">hashed_string.hpp:283</a></div></div>
<div class="ttc" id="anamespaceentt_html_aec8131af000055ceab85646c14f234ad"><div class="ttname"><a href="namespaceentt.html#aec8131af000055ceab85646c14f234ad">entt::operator&gt;</a></div><div class="ttdeci">constexpr bool operator&gt;(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00270">hashed_string.hpp:270</a></div></div>
<div class="ttc" id="anamespaceentt_html_af7c61951b721a1e3612cf536bd707501"><div class="ttname"><a href="namespaceentt.html#af7c61951b721a1e3612cf536bd707501">entt::operator==</a></div><div class="ttdeci">constexpr bool operator==(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00220">hashed_string.hpp:220</a></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.13.2
</small></address>
</div><!-- doc-content -->
</body>
</html>