Files
entt/prototype_8hpp_source.html
2019-09-05 15:42:26 +02:00

108 lines
52 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EnTT: src/entt/entity/prototype.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>
<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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">EnTT
&#160;<span id="projectnumber">3.1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- 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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</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_e3a7bb56c55e5c2286e2fe96e197d4f5.html">entity</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">prototype.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef ENTT_ENTITY_PROTOTYPE_HPP</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define ENTT_ENTITY_PROTOTYPE_HPP</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;tuple&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;cstddef&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;type_traits&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#include &lt;unordered_map&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &quot;../config/config.h&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &quot;registry.hpp&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#include &quot;entity.hpp&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#include &quot;fwd.hpp&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceentt.html">entt</a> {</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="keyword">class </span>basic_prototype {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">using</span> basic_fn_type = void(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html#acffae325962a54170176025d67d38a80">basic_prototype</a> &amp;, basic_registry&lt;Entity&gt; &amp;, <span class="keyword">const</span> Entity);</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">using</span> component_type = <span class="keyword">typename</span> <a class="code" href="classentt_1_1basic__registry.html#ace85f74fac787b967100f4186860f226">basic_registry&lt;Entity&gt;::component_type</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Component&gt;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keyword">struct </span>component_wrapper { Component component; };</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keyword">struct </span>component_handler {</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; basic_fn_type *<a class="code" href="classentt_1_1basic__prototype.html#ad8cc32084b579a727669e8f0e7b600a9">assign_or_replace</a>;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; basic_fn_type *<a class="code" href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865">assign</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; };</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordtype">void</span> release() {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordflow">if</span>(reg-&gt;valid(entity)) {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; reg-&gt;destroy(entity);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; }</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#aa7b03fff67dee5898849c971bc341962"> 61</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classentt_1_1basic__registry.html">registry_type</a> = <a class="code" href="classentt_1_1basic__registry.html">basic_registry&lt;Entity&gt;</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3"> 63</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> = Entity;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a01d3afe0260e80974f24c1d36b5fbccc"> 65</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classentt_1_1basic__prototype.html#a01d3afe0260e80974f24c1d36b5fbccc">size_type</a> = std::size_t;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#acffae325962a54170176025d67d38a80"> 71</a></span>&#160; <span class="keyword">explicit</span> <a class="code" href="classentt_1_1basic__prototype.html#acffae325962a54170176025d67d38a80">basic_prototype</a>(<a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;ref)</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; : reg{&amp;ref},</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; entity{ref.<a class="code" href="classentt_1_1basic__registry.html#a1bb5d5d0c5af3bd98de3d902406ff372">create</a>()}</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; {}</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a1181e970dc90a33b823210d33af819d5"> 79</a></span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a1181e970dc90a33b823210d33af819d5">~basic_prototype</a>() {</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; release();</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a1592ff421e77a624830cb965c6f52110"> 92</a></span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a1592ff421e77a624830cb965c6f52110">basic_prototype</a>(<a class="code" href="classentt_1_1basic__prototype.html">basic_prototype</a> &amp;&amp;other)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; : handlers{std::move(other.handlers)},</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; reg{other.reg},</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; entity{other.entity}</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; other.entity = <a class="code" href="namespaceentt.html#a588326af8f6f902a6c0b57d3f9fc6c17">null</a>;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a24a5c455ba9368897c959f722496fa54"> 110</a></span>&#160; <a class="code" href="classentt_1_1basic__prototype.html">basic_prototype</a> &amp; <a class="code" href="classentt_1_1basic__prototype.html#a24a5c455ba9368897c959f722496fa54">operator=</a>(<a class="code" href="classentt_1_1basic__prototype.html">basic_prototype</a> &amp;&amp;other) {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">if</span>(<span class="keyword">this</span> != &amp;other) {</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keyword">auto</span> tmp{std::move(other)};</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; handlers.swap(tmp.handlers);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; std::swap(reg, tmp.reg);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; std::swap(entity, tmp.entity);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; }</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Component, <span class="keyword">typename</span>... Args&gt;</div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#afb3ed35c2b2edcca53a618116208ca94"> 129</a></span>&#160; Component &amp; <span class="keyword">set</span>(Args &amp;&amp;... args) {</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; component_handler handler;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; handler.assign_or_replace = [](<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html">basic_prototype</a> &amp;proto, <a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;other, <span class="keyword">const</span> Entity dst) {</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> &amp;wrapper = proto.reg-&gt;template get&lt;component_wrapper&lt;Component&gt;&gt;(proto.entity);</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; other.template assign_or_replace&lt;Component&gt;(dst, wrapper.component);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; };</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; handler.assign = [](<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html">basic_prototype</a> &amp;proto, <a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;other, <span class="keyword">const</span> Entity dst) {</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordflow">if</span>(!other.template has&lt;Component&gt;(dst)) {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> &amp;wrapper = proto.reg-&gt;template get&lt;component_wrapper&lt;Component&gt;&gt;(proto.entity);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; other.template assign&lt;Component&gt;(dst, wrapper.component);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; }</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; };</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; handlers[reg-&gt;template type&lt;Component&gt;()] = handler;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keyword">auto</span> &amp;wrapper = reg-&gt;template assign_or_replace&lt;component_wrapper&lt;Component&gt;&gt;(entity, Component{std::forward&lt;Args&gt;(args)...});</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordflow">return</span> wrapper.component;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Component&gt;</div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a05230038ddbafaca4d5da09dfb247186"> 154</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classentt_1_1basic__prototype.html#a05230038ddbafaca4d5da09dfb247186">unset</a>() ENTT_NOEXCEPT {</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; reg-&gt;template reset&lt;component_wrapper&lt;Component&gt;&gt;(entity);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; handlers.erase(reg-&gt;template type&lt;Component&gt;());</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; }</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... Component&gt;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a6d4f9ce06a07f9b40ec714b13428326c"> 165</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classentt_1_1basic__prototype.html#a6d4f9ce06a07f9b40ec714b13428326c">has</a>() const ENTT_NOEXCEPT {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keywordflow">return</span> reg-&gt;template has&lt;component_wrapper&lt;Component&gt;...&gt;(entity);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; }</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... Component&gt;</div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#ac030e38aaa91c32530493a97a64fe1af"> 182</a></span>&#160; decltype(<span class="keyword">auto</span>) <a class="code" href="classentt_1_1basic__prototype.html#ac030e38aaa91c32530493a97a64fe1af">get</a>() const ENTT_NOEXCEPT {</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keywordflow">if</span> constexpr(<span class="keyword">sizeof</span>...(Component) == 1) {</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="keywordflow">return</span> (std::as_const(*reg).template <span class="keyword">get</span>&lt;component_wrapper&lt;Component...&gt;&gt;(entity).component);</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="keywordflow">return</span> std::tuple&lt;std::add_const_t&lt;Component&gt; &amp;...&gt;{get&lt;Component&gt;()...};</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; }</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; }</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... Component&gt;</div><div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a803649bd8fde6e3adad5c99dd118186a"> 192</a></span>&#160; decltype(<span class="keyword">auto</span>) <a class="code" href="classentt_1_1basic__prototype.html#ac030e38aaa91c32530493a97a64fe1af">get</a>() ENTT_NOEXCEPT {</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="keywordflow">if</span> constexpr(<span class="keyword">sizeof</span>...(Component) == 1) {</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">return</span> (const_cast&lt;Component &amp;&gt;(std::as_const(*this).template get&lt;Component&gt;()), ...);</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keywordflow">return</span> std::tuple&lt;Component &amp;...&gt;{get&lt;Component&gt;()...};</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; }</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; }</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... Component&gt;</div><div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a26c239c2d51cda5c0f5ff398d6a67f8c"> 206</a></span>&#160; <span class="keyword">auto</span> <a class="code" href="classentt_1_1basic__prototype.html#a26c239c2d51cda5c0f5ff398d6a67f8c">try_get</a>() const ENTT_NOEXCEPT {</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="keywordflow">if</span> constexpr(<span class="keyword">sizeof</span>...(Component) == 1) {</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> *wrapper = reg-&gt;template <a class="code" href="classentt_1_1basic__prototype.html#a26c239c2d51cda5c0f5ff398d6a67f8c">try_get</a>&lt;component_wrapper&lt;Component...&gt;&gt;(entity);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="keywordflow">return</span> wrapper ? &amp;wrapper-&gt;component : <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="keywordflow">return</span> std::tuple&lt;std::add_const_t&lt;Component&gt; *...&gt;{try_get&lt;Component&gt;()...};</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; }</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... Component&gt;</div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a59e50d3b0aabb00952322a72bdaa5c69"> 217</a></span>&#160; <span class="keyword">auto</span> <a class="code" href="classentt_1_1basic__prototype.html#a59e50d3b0aabb00952322a72bdaa5c69">try_get</a>() ENTT_NOEXCEPT {</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="keywordflow">if</span> constexpr(<span class="keyword">sizeof</span>...(Component) == 1) {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="keywordflow">return</span> (const_cast&lt;Component *&gt;(std::as_const(*this).template try_get&lt;Component&gt;()), ...);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="keywordflow">return</span> std::tuple&lt;Component *...&gt;{try_get&lt;Component&gt;()...};</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; }</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; }</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;</div><div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a6f96bf09702ed9b2d911c1d08ff5b0b1"> 243</a></span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> <a class="code" href="classentt_1_1basic__prototype.html#a6f96bf09702ed9b2d911c1d08ff5b0b1">create</a>(<a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;other)<span class="keyword"> const </span>{</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code" href="namespaceentt.html">entt</a> = other.<a class="code" href="classentt_1_1basic__registry.html#a1bb5d5d0c5af3bd98de3d902406ff372">create</a>();</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865">assign</a>(other, <a class="code" href="namespaceentt.html">entt</a>);</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespaceentt.html">entt</a>;</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; }</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;</div><div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#adb90842d165a76693de962f2cb7444e4"> 266</a></span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> <a class="code" href="classentt_1_1basic__prototype.html#adb90842d165a76693de962f2cb7444e4">create</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classentt_1_1basic__prototype.html#adb90842d165a76693de962f2cb7444e4">create</a>(*reg);</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; }</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865"> 291</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865">assign</a>(<a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;other, <span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> dst)<span class="keyword"> const </span>{</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">auto</span> &amp;handler: handlers) {</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; handler.second.assign(*<span class="keyword">this</span>, other, dst);</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; }</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; }</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;</div><div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a6062b4ed6fcf6053ea748b235db47807"> 317</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classentt_1_1basic__prototype.html#a6062b4ed6fcf6053ea748b235db47807">assign</a>(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> dst)<span class="keyword"> const </span>{</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865">assign</a>(*reg, dst);</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; }</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160;</div><div class="line"><a name="l00340"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#ad8cc32084b579a727669e8f0e7b600a9"> 340</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classentt_1_1basic__prototype.html#ad8cc32084b579a727669e8f0e7b600a9">assign_or_replace</a>(<a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;other, <span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> dst)<span class="keyword"> const </span>{</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">auto</span> &amp;handler: handlers) {</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; handler.second.assign_or_replace(*<span class="keyword">this</span>, other, dst);</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; }</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; }</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;</div><div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a2884b160480a2e26acefd0d47316c26d"> 364</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classentt_1_1basic__prototype.html#a2884b160480a2e26acefd0d47316c26d">assign_or_replace</a>(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> dst)<span class="keyword"> const </span>{</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#ad8cc32084b579a727669e8f0e7b600a9">assign_or_replace</a>(*reg, dst);</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; }</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160;</div><div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a463e0d4a93ce396a069bd181c59ba6e2"> 389</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classentt_1_1basic__prototype.html#a463e0d4a93ce396a069bd181c59ba6e2">operator()</a>(<a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;other, <span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> dst) <span class="keyword">const</span> ENTT_NOEXCEPT {</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865">assign</a>(other, dst);</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160; }</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160;</div><div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a081d19f1dbb870c85f2bb215422700c1"> 413</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classentt_1_1basic__prototype.html#a081d19f1dbb870c85f2bb215422700c1">operator()</a>(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> dst) <span class="keyword">const</span> ENTT_NOEXCEPT {</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865">assign</a>(*reg, dst);</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160; }</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160;</div><div class="line"><a name="l00435"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a8e47d98dbba3929f3edfe682975db846"> 435</a></span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> <a class="code" href="classentt_1_1basic__prototype.html#a8e47d98dbba3929f3edfe682975db846">operator()</a>(<a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;other) <span class="keyword">const</span> ENTT_NOEXCEPT {</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classentt_1_1basic__prototype.html#adb90842d165a76693de962f2cb7444e4">create</a>(other);</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160; }</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160;</div><div class="line"><a name="l00456"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#afa55befc754adbf67d25ebae7aed6a75"> 456</a></span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> <a class="code" href="classentt_1_1basic__prototype.html#afa55befc754adbf67d25ebae7aed6a75">operator()</a>() const ENTT_NOEXCEPT {</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classentt_1_1basic__prototype.html#adb90842d165a76693de962f2cb7444e4">create</a>(*reg);</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>&#160; }</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160;</div><div class="line"><a name="l00464"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#a3eca09d9203b3ad97d6663e0bf5bb2f8"> 464</a></span>&#160; <span class="keyword">const</span> <a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp; <a class="code" href="classentt_1_1basic__prototype.html#a3eca09d9203b3ad97d6663e0bf5bb2f8">backend</a>() const ENTT_NOEXCEPT {</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; <span class="keywordflow">return</span> *reg;</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; }</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160;</div><div class="line"><a name="l00469"></a><span class="lineno"><a class="line" href="classentt_1_1basic__prototype.html#ac6cdd27694a8e9e2bdb576ffca098e1b"> 469</a></span>&#160; <a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp; <a class="code" href="classentt_1_1basic__prototype.html#ac6cdd27694a8e9e2bdb576ffca098e1b">backend</a>() ENTT_NOEXCEPT {</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span><a class="code" href="classentt_1_1basic__registry.html">registry_type</a> &amp;<span class="keyword">&gt;</span>(std::as_const(*this).backend());</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160; }</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160;</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160; std::unordered_map&lt;component_type, component_handler&gt; handlers;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; <a class="code" href="classentt_1_1basic__registry.html">registry_type</a> *reg;</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160; <a class="code" href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entity_type</a> entity;</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160;};</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160;</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160;</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160;}</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160;</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160;<span class="preprocessor">#endif // ENTT_ENTITY_PROTOTYPE_HPP</span></div><div class="ttc" id="classentt_1_1basic__prototype_html_a1592ff421e77a624830cb965c6f52110"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a1592ff421e77a624830cb965c6f52110">entt::basic_prototype::basic_prototype</a></div><div class="ttdeci">basic_prototype(basic_prototype &amp;&amp;other)</div><div class="ttdoc">Move constructor. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00092">prototype.hpp:92</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a2884b160480a2e26acefd0d47316c26d"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a2884b160480a2e26acefd0d47316c26d">entt::basic_prototype::assign_or_replace</a></div><div class="ttdeci">void assign_or_replace(const entity_type dst) const</div><div class="ttdoc">Assigns or replaces the components of a prototype for an entity. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00364">prototype.hpp:364</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a6f96bf09702ed9b2d911c1d08ff5b0b1"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a6f96bf09702ed9b2d911c1d08ff5b0b1">entt::basic_prototype::create</a></div><div class="ttdeci">entity_type create(registry_type &amp;other) const</div><div class="ttdoc">Creates a new entity using a given prototype. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00243">prototype.hpp:243</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a0a8606dc36496d42f6188acdad4906f3"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a0a8606dc36496d42f6188acdad4906f3">entt::basic_prototype::entity_type</a></div><div class="ttdeci">Entity entity_type</div><div class="ttdoc">Underlying entity identifier. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00063">prototype.hpp:63</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a01d3afe0260e80974f24c1d36b5fbccc"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a01d3afe0260e80974f24c1d36b5fbccc">entt::basic_prototype::size_type</a></div><div class="ttdeci">std::size_t size_type</div><div class="ttdoc">Unsigned integer type. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00065">prototype.hpp:65</a></div></div>
<div class="ttc" id="namespaceentt_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="algorithm_8hpp_source.html#l00010">algorithm.hpp:10</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a1181e970dc90a33b823210d33af819d5"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a1181e970dc90a33b823210d33af819d5">entt::basic_prototype::~basic_prototype</a></div><div class="ttdeci">~basic_prototype()</div><div class="ttdoc">Releases all its resources. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00079">prototype.hpp:79</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a081d19f1dbb870c85f2bb215422700c1"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a081d19f1dbb870c85f2bb215422700c1">entt::basic_prototype::operator()</a></div><div class="ttdeci">void operator()(const entity_type dst) const ENTT_NOEXCEPT</div><div class="ttdoc">Assigns the components of a prototype to an entity. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00413">prototype.hpp:413</a></div></div>
<div class="ttc" id="classentt_1_1basic__registry_html_a1bb5d5d0c5af3bd98de3d902406ff372"><div class="ttname"><a href="classentt_1_1basic__registry.html#a1bb5d5d0c5af3bd98de3d902406ff372">entt::basic_registry::create</a></div><div class="ttdeci">decltype(auto) create()</div><div class="ttdoc">Creates a new entity and returns it. </div><div class="ttdef"><b>Definition:</b> <a href="registry_8hpp_source.html#l00559">registry.hpp:559</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a6062b4ed6fcf6053ea748b235db47807"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a6062b4ed6fcf6053ea748b235db47807">entt::basic_prototype::assign</a></div><div class="ttdeci">void assign(const entity_type dst) const</div><div class="ttdoc">Assigns the components of a prototype to a given entity. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00317">prototype.hpp:317</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_acffae325962a54170176025d67d38a80"><div class="ttname"><a href="classentt_1_1basic__prototype.html#acffae325962a54170176025d67d38a80">entt::basic_prototype::basic_prototype</a></div><div class="ttdeci">basic_prototype(registry_type &amp;ref)</div><div class="ttdoc">Constructs a prototype that is bound to a given registry. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00071">prototype.hpp:71</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a463e0d4a93ce396a069bd181c59ba6e2"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a463e0d4a93ce396a069bd181c59ba6e2">entt::basic_prototype::operator()</a></div><div class="ttdeci">void operator()(registry_type &amp;other, const entity_type dst) const ENTT_NOEXCEPT</div><div class="ttdoc">Assigns the components of a prototype to an entity. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00389">prototype.hpp:389</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_adb90842d165a76693de962f2cb7444e4"><div class="ttname"><a href="classentt_1_1basic__prototype.html#adb90842d165a76693de962f2cb7444e4">entt::basic_prototype::create</a></div><div class="ttdeci">entity_type create() const</div><div class="ttdoc">Creates a new entity using a given prototype. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00266">prototype.hpp:266</a></div></div>
<div class="ttc" id="namespaceentt_html_a588326af8f6f902a6c0b57d3f9fc6c17"><div class="ttname"><a href="namespaceentt.html#a588326af8f6f902a6c0b57d3f9fc6c17">entt::null</a></div><div class="ttdeci">constexpr auto null</div><div class="ttdoc">Null entity. </div><div class="ttdef"><b>Definition:</b> <a href="entity_8hpp_source.html#l00165">entity.hpp:165</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_afa55befc754adbf67d25ebae7aed6a75"><div class="ttname"><a href="classentt_1_1basic__prototype.html#afa55befc754adbf67d25ebae7aed6a75">entt::basic_prototype::operator()</a></div><div class="ttdeci">entity_type operator()() const ENTT_NOEXCEPT</div><div class="ttdoc">Creates a new entity using a given prototype. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00456">prototype.hpp:456</a></div></div>
<div class="ttc" id="classentt_1_1basic__registry_html_ace85f74fac787b967100f4186860f226"><div class="ttname"><a href="classentt_1_1basic__registry.html#ace85f74fac787b967100f4186860f226">entt::basic_registry::component_type</a></div><div class="ttdeci">ENTT_ID_TYPE component_type</div><div class="ttdoc">Unsigned integer type. </div><div class="ttdef"><b>Definition:</b> <a href="registry_8hpp_source.html#l00312">registry.hpp:312</a></div></div>
<div class="ttc" id="classentt_1_1basic__registry_html"><div class="ttname"><a href="classentt_1_1basic__registry.html">entt::basic_registry</a></div><div class="ttdoc">Fast and reliable entity-component system. </div><div class="ttdef"><b>Definition:</b> <a href="entity_2fwd_8hpp_source.html#l00014">fwd.hpp:14</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a59e50d3b0aabb00952322a72bdaa5c69"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a59e50d3b0aabb00952322a72bdaa5c69">entt::basic_prototype::try_get</a></div><div class="ttdeci">auto try_get() ENTT_NOEXCEPT</div><div class="ttdoc">Returns pointers to the given components. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00217">prototype.hpp:217</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a05230038ddbafaca4d5da09dfb247186"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a05230038ddbafaca4d5da09dfb247186">entt::basic_prototype::unset</a></div><div class="ttdeci">void unset() ENTT_NOEXCEPT</div><div class="ttdoc">Removes the given component from a prototype. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00154">prototype.hpp:154</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_ad8cc32084b579a727669e8f0e7b600a9"><div class="ttname"><a href="classentt_1_1basic__prototype.html#ad8cc32084b579a727669e8f0e7b600a9">entt::basic_prototype::assign_or_replace</a></div><div class="ttdeci">void assign_or_replace(registry_type &amp;other, const entity_type dst) const</div><div class="ttdoc">Assigns or replaces the components of a prototype for an entity. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00340">prototype.hpp:340</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a0a5c5313d46f5f52977e7fc3fe93d865"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a0a5c5313d46f5f52977e7fc3fe93d865">entt::basic_prototype::assign</a></div><div class="ttdeci">void assign(registry_type &amp;other, const entity_type dst) const</div><div class="ttdoc">Assigns the components of a prototype to a given entity. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00291">prototype.hpp:291</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html"><div class="ttname"><a href="classentt_1_1basic__prototype.html">entt::basic_prototype</a></div><div class="ttdoc">Prototype container for concepts. </div><div class="ttdef"><b>Definition:</b> <a href="entity_2fwd_8hpp_source.html#l00038">fwd.hpp:38</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a3eca09d9203b3ad97d6663e0bf5bb2f8"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a3eca09d9203b3ad97d6663e0bf5bb2f8">entt::basic_prototype::backend</a></div><div class="ttdeci">const registry_type &amp; backend() const ENTT_NOEXCEPT</div><div class="ttdoc">Returns a reference to the underlying registry. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00464">prototype.hpp:464</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_ac6cdd27694a8e9e2bdb576ffca098e1b"><div class="ttname"><a href="classentt_1_1basic__prototype.html#ac6cdd27694a8e9e2bdb576ffca098e1b">entt::basic_prototype::backend</a></div><div class="ttdeci">registry_type &amp; backend() ENTT_NOEXCEPT</div><div class="ttdoc">Returns a reference to the underlying registry. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00469">prototype.hpp:469</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a8e47d98dbba3929f3edfe682975db846"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a8e47d98dbba3929f3edfe682975db846">entt::basic_prototype::operator()</a></div><div class="ttdeci">entity_type operator()(registry_type &amp;other) const ENTT_NOEXCEPT</div><div class="ttdoc">Creates a new entity using a given prototype. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00435">prototype.hpp:435</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_ac030e38aaa91c32530493a97a64fe1af"><div class="ttname"><a href="classentt_1_1basic__prototype.html#ac030e38aaa91c32530493a97a64fe1af">entt::basic_prototype::get</a></div><div class="ttdeci">decltype(auto) get() const ENTT_NOEXCEPT</div><div class="ttdoc">Returns references to the given components. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00182">prototype.hpp:182</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a26c239c2d51cda5c0f5ff398d6a67f8c"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a26c239c2d51cda5c0f5ff398d6a67f8c">entt::basic_prototype::try_get</a></div><div class="ttdeci">auto try_get() const ENTT_NOEXCEPT</div><div class="ttdoc">Returns pointers to the given components. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00206">prototype.hpp:206</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a6d4f9ce06a07f9b40ec714b13428326c"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a6d4f9ce06a07f9b40ec714b13428326c">entt::basic_prototype::has</a></div><div class="ttdeci">bool has() const ENTT_NOEXCEPT</div><div class="ttdoc">Checks if a prototype owns all the given components. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00165">prototype.hpp:165</a></div></div>
<div class="ttc" id="classentt_1_1basic__prototype_html_a24a5c455ba9368897c959f722496fa54"><div class="ttname"><a href="classentt_1_1basic__prototype.html#a24a5c455ba9368897c959f722496fa54">entt::basic_prototype::operator=</a></div><div class="ttdeci">basic_prototype &amp; operator=(basic_prototype &amp;&amp;other)</div><div class="ttdoc">Move assignment operator. </div><div class="ttdef"><b>Definition:</b> <a href="prototype_8hpp_source.html#l00110">prototype.hpp:110</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>