523 lines
118 KiB
HTML
523 lines
118 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.10.0"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>EnTT: src/entt/entity/snapshot.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>
|
|
<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"> 3.14.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.10.0 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_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">snapshot.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_ENTITY_SNAPSHOT_HPP</span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define ENTT_ENTITY_SNAPSHOT_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 <cstddef></span></div>
|
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <iterator></span></div>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include <tuple></span></div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include <type_traits></span></div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <utility></span></div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include "../config/config.h"</span></div>
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include "../container/dense_map.hpp"</span></div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "../core/type_traits.hpp"</span></div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "entity.hpp"</span></div>
|
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include "fwd.hpp"</span></div>
|
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include "view.hpp"</span></div>
|
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceentt.html">entt</a> {</div>
|
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
|
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keyword">namespace </span>internal {</div>
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="keyword">template</span><<span class="keyword">typename</span> Registry></div>
|
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="keywordtype">void</span> orphans(Registry &registry) {</div>
|
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">auto</span> &<a class="code hl_typedef" href="namespaceentt.html#aff8fd99fc1ff2432dcb0f6b017a9c60e">storage</a> = <a class="code hl_typedef" href="namespaceentt.html#ab8c1f492841aeafa5e75422af3f0cdc4">registry</a>.template storage<typename Registry::entity_type>();</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="keywordflow">for</span>(<span class="keyword">auto</span> <a class="code hl_namespace" href="namespaceentt.html">entt</a>: <a class="code hl_typedef" href="namespaceentt.html#aff8fd99fc1ff2432dcb0f6b017a9c60e">storage</a>) {</div>
|
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">if</span>(<a class="code hl_typedef" href="namespaceentt.html#ab8c1f492841aeafa5e75422af3f0cdc4">registry</a>.orphan(<a class="code hl_namespace" href="namespaceentt.html">entt</a>)) {</div>
|
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_typedef" href="namespaceentt.html#aff8fd99fc1ff2432dcb0f6b017a9c60e">storage</a>.erase(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> }</div>
|
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span>}</div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>} <span class="comment">// namespace internal</span></div>
|
|
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="keyword">template</span><<span class="keyword">typename</span> Registry></div>
|
|
<div class="foldopen" id="foldopen00047" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html"> 47</a></span><span class="keyword">class </span><a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> {</div>
|
|
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keyword">static_assert</span>(!std::is_const_v<Registry>, <span class="stringliteral">"Non-const registry type required"</span>);</div>
|
|
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">using </span><a class="code hl_struct" href="structentt_1_1entt__traits.html">traits_type</a> = <a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits<typename Registry::entity_type></a>;</div>
|
|
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
|
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#a0c9d161ffb8b94259166b432852efbac"> 53</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__snapshot.html#a0c9d161ffb8b94259166b432852efbac">registry_type</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>;</div>
|
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#a052964a4a99d37ab39219bda2372c17b"> 55</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__snapshot.html#a052964a4a99d37ab39219bda2372c17b">entity_type</a> = <span class="keyword">typename</span> registry_type::entity_type;</div>
|
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
|
|
<div class="foldopen" id="foldopen00061" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#a04da73375c3f546f52852aa174a2ab06"> 61</a></span> <a class="code hl_function" href="classentt_1_1basic__snapshot.html#a04da73375c3f546f52852aa174a2ab06">basic_snapshot</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__snapshot.html#a0c9d161ffb8b94259166b432852efbac">registry_type</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">source</a>) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></div>
|
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> : reg{&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">source</a>} {}</div>
|
|
</div>
|
|
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
|
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#a66159be5a4f741e09369831ac59c771a"> 65</a></span> <a class="code hl_function" href="classentt_1_1basic__snapshot.html#a66159be5a4f741e09369831ac59c771a">basic_snapshot</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#ae8d0d610dad9fc00c73c167dc46cba8f"> 68</a></span> <a class="code hl_function" href="classentt_1_1basic__snapshot.html#ae8d0d610dad9fc00c73c167dc46cba8f">basic_snapshot</a>(<a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &&) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#a909db76e0eb7d320d1c65dafe490aa39"> 71</a></span> ~<a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a>() = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
|
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#aa5883b6e7876173f6e2fb25d50e6f021"> 77</a></span> <a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">operator</a>=(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &) = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">delete</a>;</div>
|
|
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
|
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#a149c419863771ff599abd2103647ec6b"> 83</a></span> <a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">operator</a>=(<a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &&) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
|
|
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">template</a><<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Type, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Archive</a>></div>
|
|
<div class="foldopen" id="foldopen00094" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#a6d49e430bdc8a0558c5eca20be7ad382"> 94</a></span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &<a class="code hl_variable" href="namespaceentt.html#a8c24ecc5ab0055f9f2a4725c95afb29e">get</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Archive</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_typedef" href="namespaceentt.html#a7f3ac95ffe482bbd1a70b624ef8bb641">id_type</a> <span class="keywordtype">id</span> = <a class="code hl_struct" href="structentt_1_1type__hash.html">type_hash</a><Type>::value())<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <span class="keyword">auto</span> *<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a> = reg->template <a class="code hl_class" href="classentt_1_1basic__storage.html">storage<Type></a>(<span class="keywordtype">id</span>); <a class="code hl_typedef" href="namespaceentt.html#aff8fd99fc1ff2432dcb0f6b017a9c60e">storage</a>) {</div>
|
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keyword">const</span> <span class="keyword">typename</span> registry_type::common_type &base = *<a class="code hl_typedef" href="namespaceentt.html#aff8fd99fc1ff2432dcb0f6b017a9c60e">storage</a>;</div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<span class="keyword">static_cast<</span><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a><span class="keyword">></span>(<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>-><a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a69ad0662838fd351985a51ee3017fb6c">size</a>()));</div>
|
|
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
|
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<Type, entity_type>) {</div>
|
|
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<span class="keyword">static_cast<</span><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a><span class="keyword">></span>(<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>-><a class="code hl_function" href="classentt_1_1basic__sparse__set.html#abc26c3d5467a929c2b88d7ad915c1fa9">free_list</a>()));</div>
|
|
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
|
|
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> first = base.rbegin(), last = base.rend(); first != last; ++first) {</div>
|
|
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(*first);</div>
|
|
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
|
|
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(registry_type::template storage_for_type<Type>::storage_policy == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>) {</div>
|
|
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = base.rbegin(), last = base.rend(); <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> != last; ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) {</div>
|
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_namespace" href="namespaceentt.html">entt</a> = *<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>; <a class="code hl_namespace" href="namespaceentt.html">entt</a> == <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>) {</div>
|
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__snapshot.html#a052964a4a99d37ab39219bda2372c17b">entity_type</a><span class="keyword">></span>(<a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>));</div>
|
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> std::apply([&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>](<span class="keyword">auto</span> &&...<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>) { (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(std::forward<<span class="keyword">decltype</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)), ...); }, <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>-><a class="code hl_function" href="classentt_1_1basic__storage.html#ad54c710b9ee32ecf963e30760bb06976">get_as_tuple</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> }</div>
|
|
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
|
|
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>: <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>-><a class="code hl_function" href="classentt_1_1basic__storage.html#abaf0ee2aa0eedc73f2783f25a0d0ff73">reach</a>()) {</div>
|
|
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> std::apply([&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>](<span class="keyword">auto</span> &&...<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>) { (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(std::forward<<span class="keyword">decltype</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)), ...); }, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>);</div>
|
|
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
|
|
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
|
|
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a>{});</div>
|
|
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> }</div>
|
|
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
|
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
|
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keyword">template</span><<span class="keyword">typename</span> Type, <span class="keyword">typename</span> Archive, <span class="keyword">typename</span> It></div>
|
|
<div class="foldopen" id="foldopen00140" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot.html#ae4c96723bedd73f8db3789389f933b94"> 140</a></span> <span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &<a class="code hl_function" href="classentt_1_1basic__snapshot.html#ae4c96723bedd73f8db3789389f933b94">get</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Archive</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> first, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">It</a> last, <span class="keyword">const</span> <a class="code hl_typedef" href="namespaceentt.html#a7f3ac95ffe482bbd1a70b624ef8bb641">id_type</a> <span class="keywordtype">id</span> = <a class="code hl_struct" href="structentt_1_1type__hash.html">type_hash<Type>::value</a>())<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keyword">static_assert</span>(!std::is_same_v<Type, entity_type>, <span class="stringliteral">"Entity types not supported"</span>);</div>
|
|
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
|
|
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <span class="keyword">auto</span> *<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a> = reg->template <a class="code hl_class" href="classentt_1_1basic__storage.html">storage<Type></a>(<span class="keywordtype">id</span>); <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a> && !<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>-><a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8936d80c3656449118a7a7a08be6258">empty</a>()) {</div>
|
|
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<span class="keyword">static_cast<</span><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a><span class="keyword">></span>(std::distance(first, last)));</div>
|
|
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
|
|
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">for</span>(; first != last; ++first) {</div>
|
|
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_namespace" href="namespaceentt.html">entt</a> = *first; <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>-><a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a97b47cbaea3fc30442fa3e6366766c86">contains</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>)) {</div>
|
|
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> std::apply([&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>](<span class="keyword">auto</span> &&...<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>) { (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(std::forward<<span class="keyword">decltype</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)), ...); }, <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>-><a class="code hl_function" href="classentt_1_1basic__storage.html#ad54c710b9ee32ecf963e30760bb06976">get_as_tuple</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__snapshot.html#a052964a4a99d37ab39219bda2372c17b">entity_type</a><span class="keyword">></span>(<a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>));</div>
|
|
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> }</div>
|
|
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> }</div>
|
|
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a>{});</div>
|
|
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> }</div>
|
|
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
|
|
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</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="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__snapshot.html#a0c9d161ffb8b94259166b432852efbac">registry_type</a> *reg;</div>
|
|
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
|
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="keyword">template</span><<span class="keyword">typename</span> Registry></div>
|
|
<div class="foldopen" id="foldopen00176" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html"> 176</a></span><span class="keyword">class </span><a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> {</div>
|
|
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keyword">static_assert</span>(!std::is_const_v<Registry>, <span class="stringliteral">"Non-const registry type required"</span>);</div>
|
|
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="keyword">using </span><a class="code hl_struct" href="structentt_1_1entt__traits.html">traits_type</a> = <a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits<typename Registry::entity_type></a>;</div>
|
|
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
|
|
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#ac462fe9061f89d529833bdbc62919bca"> 182</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__snapshot__loader.html#ac462fe9061f89d529833bdbc62919bca">registry_type</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>;</div>
|
|
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#a21dff5a44dc7ee611a39d9517c8af96e"> 184</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__snapshot__loader.html#a21dff5a44dc7ee611a39d9517c8af96e">entity_type</a> = <span class="keyword">typename</span> registry_type::entity_type;</div>
|
|
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
|
|
<div class="foldopen" id="foldopen00190" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#a1a3aa9874823320812d8c75336942623"> 190</a></span> <a class="code hl_function" href="classentt_1_1basic__snapshot__loader.html#a1a3aa9874823320812d8c75336942623">basic_snapshot_loader</a>(<a class="code hl_typedef" href="classentt_1_1basic__snapshot__loader.html#ac462fe9061f89d529833bdbc62919bca">registry_type</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">source</a>) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></div>
|
|
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> : reg{&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">source</a>} {</div>
|
|
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="comment">// restoring a snapshot as a whole requires a clean registry</span></div>
|
|
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> ENTT_ASSERT(reg->template <a class="code hl_class" href="classentt_1_1basic__storage.html">storage<entity_type></a>().<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#abc26c3d5467a929c2b88d7ad915c1fa9">free_list</a>() == 0<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">u</a>, <span class="stringliteral">"Registry must be empty"</span>);</div>
|
|
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
|
|
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#aea03a64bc66d5cb98206c7d15f623f1c"> 197</a></span> <a class="code hl_function" href="classentt_1_1basic__snapshot__loader.html#aea03a64bc66d5cb98206c7d15f623f1c">basic_snapshot_loader</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> </div>
|
|
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#a6f975e36c5ae7e84bedf315201e4e763"> 200</a></span> <a class="code hl_function" href="classentt_1_1basic__snapshot__loader.html#a6f975e36c5ae7e84bedf315201e4e763">basic_snapshot_loader</a>(<a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &&) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
|
|
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#a5e4bdf75e5da11941472f3e389f0427b"> 203</a></span> ~<a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a>() = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> </div>
|
|
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#ab856775274932d343039740b17b6957e"> 209</a></span> <a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">operator</a>=(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &) = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">delete</a>;</div>
|
|
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> </div>
|
|
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#ac7653702c1ae5d81510d3ea338fb5c4a"> 215</a></span> <a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">operator</a>=(<a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &&) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
|
|
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">template</a><<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Type, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Archive</a>></div>
|
|
<div class="foldopen" id="foldopen00226" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#a395cd08d4fe6dca759ae400d5584ef88"> 226</a></span> <a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &<a class="code hl_variable" href="namespaceentt.html#a8c24ecc5ab0055f9f2a4725c95afb29e">get</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Archive</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_typedef" href="namespaceentt.html#a7f3ac95ffe482bbd1a70b624ef8bb641">id_type</a> <span class="keywordtype">id</span> = <a class="code hl_struct" href="structentt_1_1type__hash.html">type_hash</a><Type>::value()) {</div>
|
|
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="keyword">auto</span> &<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a> = reg->template <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">storage<Type></a>(<span class="keywordtype">id</span>);</div>
|
|
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a> length{};</div>
|
|
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> </div>
|
|
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(length);</div>
|
|
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
|
|
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<Type, entity_type>) {</div>
|
|
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a> count{};</div>
|
|
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> </div>
|
|
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad51850043e05582865e5c93fa06421be">reserve</a>(length);</div>
|
|
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(count);</div>
|
|
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> </div>
|
|
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="keywordflow">for</span>(<a class="code hl_typedef" href="classentt_1_1basic__snapshot__loader.html#a21dff5a44dc7ee611a39d9517c8af96e">entity_type</a> <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> = <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>; length; --length) {</div>
|
|
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
|
|
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad53a7224b938b57f633b34af6d6c4621">emplace</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
|
|
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> }</div>
|
|
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> </div>
|
|
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#abc26c3d5467a929c2b88d7ad915c1fa9">free_list</a>(count);</div>
|
|
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="keyword">auto</span> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a> = reg->template <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">storage<entity_type></a>();</div>
|
|
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <a class="code hl_typedef" href="classentt_1_1basic__snapshot__loader.html#a21dff5a44dc7ee611a39d9517c8af96e">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>{<a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>};</div>
|
|
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> </div>
|
|
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <span class="keywordflow">while</span>(length--) {</div>
|
|
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>); <a class="code hl_namespace" href="namespaceentt.html">entt</a> != <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>) {</div>
|
|
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.contains(<a class="code hl_namespace" href="namespaceentt.html">entt</a>) ? <a class="code hl_namespace" href="namespaceentt.html">entt</a> : <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.emplace(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> ENTT_ASSERT(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> == <a class="code hl_namespace" href="namespaceentt.html">entt</a>, <span class="stringliteral">"Entity not available for use"</span>);</div>
|
|
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> </div>
|
|
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::tuple_size_v<<span class="keyword">decltype</span>(<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad54c710b9ee32ecf963e30760bb06976">get_as_tuple</a>({}))> == 0<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">u</a>) {</div>
|
|
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad53a7224b938b57f633b34af6d6c4621">emplace</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
|
|
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> Type <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>{};</div>
|
|
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>);</div>
|
|
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad53a7224b938b57f633b34af6d6c4621">emplace</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>, std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>));</div>
|
|
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> }</div>
|
|
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> }</div>
|
|
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> }</div>
|
|
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> }</div>
|
|
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> </div>
|
|
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> </div>
|
|
<div class="foldopen" id="foldopen00277" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"><a class="line" href="classentt_1_1basic__snapshot__loader.html#ad37932c98a812596d40456bd4610e535"> 277</a></span> <a class="code hl_class" href="classentt_1_1basic__snapshot__loader.html">basic_snapshot_loader</a> &<a class="code hl_function" href="classentt_1_1basic__snapshot__loader.html#ad37932c98a812596d40456bd4610e535">orphans</a>() {</div>
|
|
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> internal::orphans(*reg);</div>
|
|
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> </div>
|
|
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <a class="code hl_typedef" href="classentt_1_1basic__snapshot__loader.html#ac462fe9061f89d529833bdbc62919bca">registry_type</a> *reg;</div>
|
|
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> </div>
|
|
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span><span class="keyword">template</span><<span class="keyword">typename</span> Registry></div>
|
|
<div class="foldopen" id="foldopen00303" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html"> 303</a></span><span class="keyword">class </span><a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> {</div>
|
|
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> <span class="keyword">static_assert</span>(!std::is_const_v<Registry>, <span class="stringliteral">"Non-const registry type required"</span>);</div>
|
|
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <span class="keyword">using </span><a class="code hl_struct" href="structentt_1_1entt__traits.html">traits_type</a> = <a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits<typename Registry::entity_type></a>;</div>
|
|
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> </div>
|
|
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <span class="keywordtype">void</span> restore(<span class="keyword">typename</span> Registry::entity_type <a class="code hl_namespace" href="namespaceentt.html">entt</a>) {</div>
|
|
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> = <a class="code hl_function" href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2">to_entity</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>); remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#a4d884a2b7164b3df97d93dd2804222b0">contains</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>) && remloc[<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>].first == <a class="code hl_namespace" href="namespaceentt.html">entt</a>) {</div>
|
|
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> <span class="keywordflow">if</span>(!reg->valid(remloc[<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>].second)) {</div>
|
|
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> remloc[<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>].second = reg->create();</div>
|
|
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> }</div>
|
|
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#aafff57a203cd3fc561320bad6eeea0c3">insert_or_assign</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>, std::make_pair(<a class="code hl_namespace" href="namespaceentt.html">entt</a>, reg->create()));</div>
|
|
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> }</div>
|
|
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> }</div>
|
|
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> </div>
|
|
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="keyword">auto</span> update(<span class="keywordtype">int</span>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Container</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">container</a>) -> <span class="keyword">decltype</span>(<span class="keyword">typename</span> Container::mapped_type{}, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>()) {</div>
|
|
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> <span class="comment">// map like container</span></div>
|
|
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Container</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>;</div>
|
|
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> </div>
|
|
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> &&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>: <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">container</a>) {</div>
|
|
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> <span class="keyword">using </span>first_type = std::remove_const_t<<span class="keyword">typename</span> std::decay_t<<span class="keyword">decltype</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>)>::first_type>;</div>
|
|
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> <span class="keyword">using </span>second_type = <span class="keyword">typename</span> std::decay_t<<span class="keyword">decltype</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>)>::second_type;</div>
|
|
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> </div>
|
|
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<first_type, entity_type> && std::is_same_v<second_type, entity_type>) {</div>
|
|
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.emplace(<a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>.first), <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>.second));</div>
|
|
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<first_type, entity_type>) {</div>
|
|
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.emplace(<a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>.first), std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>.second));</div>
|
|
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> <span class="keyword">static_assert</span>(std::is_same_v<second_type, entity_type>, <span class="stringliteral">"Neither the key nor the value are of entity type"</span>);</div>
|
|
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.emplace(std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>.first), <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pair</a>.second));</div>
|
|
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> }</div>
|
|
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> }</div>
|
|
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> </div>
|
|
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keyword">using </span>std::swap;</div>
|
|
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <a class="code hl_function" href="namespaceentt.html#a85aff290a542f0f053b993b507410b21">swap</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">container</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>);</div>
|
|
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> }</div>
|
|
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> </div>
|
|
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <span class="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keyword">auto</span> update(<span class="keywordtype">char</span>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Container</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">container</a>) -> <span class="keyword">decltype</span>(<span class="keyword">typename</span> Container::value_type{}, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>()) {</div>
|
|
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <span class="comment">// vector like container</span></div>
|
|
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <span class="keyword">static_assert</span>(std::is_same_v<typename Container::value_type, entity_type>, <span class="stringliteral">"Invalid value type"</span>);</div>
|
|
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> </div>
|
|
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> &&<a class="code hl_namespace" href="namespaceentt.html">entt</a>: <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">container</a>) {</div>
|
|
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> <a class="code hl_namespace" href="namespaceentt.html">entt</a> = <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> }</div>
|
|
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> }</div>
|
|
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> </div>
|
|
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <span class="keyword">template</span><<span class="keyword">typename</span> Component, <span class="keyword">typename</span> Other, <span class="keyword">typename</span> Member></div>
|
|
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> <span class="keywordtype">void</span> update([[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">maybe_unused</a>]] <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Component</a> &instance, [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">maybe_unused</a>]] <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Member</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Other</a>::*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">member</a>) {</div>
|
|
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(!std::is_same_v<Component, Other>) {</div>
|
|
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<Member, entity_type>) {</div>
|
|
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> instance.*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">member</a> = <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(instance.*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">member</a>);</div>
|
|
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> <span class="comment">// maybe a container? let's try...</span></div>
|
|
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> update(0, instance.*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">member</a>);</div>
|
|
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> }</div>
|
|
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> }</div>
|
|
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> </div>
|
|
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#ae51ed38dcfbae0c059aeed260b4d7dee"> 364</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#ae51ed38dcfbae0c059aeed260b4d7dee">registry_type</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>;</div>
|
|
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#a8ec9043a725da1ddb4f16ce6cb635011"> 366</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#a8ec9043a725da1ddb4f16ce6cb635011">entity_type</a> = <span class="keyword">typename</span> registry_type::entity_type;</div>
|
|
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> </div>
|
|
<div class="foldopen" id="foldopen00372" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#a4546c59ad6f12d4c071e99215790873f"> 372</a></span> <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#a4546c59ad6f12d4c071e99215790873f">basic_continuous_loader</a>(<a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#ae51ed38dcfbae0c059aeed260b4d7dee">registry_type</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">source</a>) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></div>
|
|
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> : remloc{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">source</a>.get_allocator()},</div>
|
|
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> reg{&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">source</a>} {}</div>
|
|
</div>
|
|
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> </div>
|
|
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#a251ef8adbb329c667b5fe1857bac0078"> 377</a></span> <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#a251ef8adbb329c667b5fe1857bac0078">basic_continuous_loader</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> </div>
|
|
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#a5e29f22ee49b992ea16d352d3f1041d9"> 380</a></span> <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#a5e29f22ee49b992ea16d352d3f1041d9">basic_continuous_loader</a>(<a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &&) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> </div>
|
|
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#a34d2417a1dc1fe8804ff6bbe184e16a1"> 383</a></span> ~<a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a>() = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> </div>
|
|
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#a55ad0d865e74ea3d53cd67812fe2c4e1"> 389</a></span> <a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">operator</a>=(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &) = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">delete</a>;</div>
|
|
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> </div>
|
|
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#ade392e168f1b045c70608544283ff7cc"> 395</a></span> <a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">operator</a>=(<a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &&) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a>;</div>
|
|
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> </div>
|
|
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">template</a><<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Type, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Archive</a>></div>
|
|
<div class="foldopen" id="foldopen00412" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#ad4962b919dc91a9f6dfc223bcf983376"> 412</a></span> <a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &<a class="code hl_variable" href="namespaceentt.html#a8c24ecc5ab0055f9f2a4725c95afb29e">get</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Archive</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_typedef" href="namespaceentt.html#a7f3ac95ffe482bbd1a70b624ef8bb641">id_type</a> <span class="keywordtype">id</span> = <a class="code hl_struct" href="structentt_1_1type__hash.html">type_hash</a><Type>::value()) {</div>
|
|
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> <span class="keyword">auto</span> &<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a> = reg->template <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">storage<Type></a>(<span class="keywordtype">id</span>);</div>
|
|
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a> length{};</div>
|
|
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#a8ec9043a725da1ddb4f16ce6cb635011">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>{<a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>};</div>
|
|
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> </div>
|
|
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(length);</div>
|
|
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> </div>
|
|
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<Type, entity_type>) {</div>
|
|
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">traits_type::entity_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">in_use</a>{};</div>
|
|
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> </div>
|
|
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad51850043e05582865e5c93fa06421be">reserve</a>(length);</div>
|
|
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">in_use</a>);</div>
|
|
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> </div>
|
|
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> <span class="keywordflow">for</span>(std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>{}; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> < <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">in_use</a>; ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>) {</div>
|
|
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> restore(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> }</div>
|
|
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> </div>
|
|
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> <span class="keywordflow">for</span>(std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">in_use</a>; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> < length; ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>) {</div>
|
|
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> </div>
|
|
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> = <a class="code hl_function" href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2">to_entity</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>); remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#a4d884a2b7164b3df97d93dd2804222b0">contains</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>)) {</div>
|
|
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> <span class="keywordflow">if</span>(reg->valid(remloc[<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>].second)) {</div>
|
|
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> reg->destroy(remloc[<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>].second);</div>
|
|
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> }</div>
|
|
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> </div>
|
|
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#a83036e3f167d28ba9afa943271fb5587">erase</a>(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
|
|
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> }</div>
|
|
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> }</div>
|
|
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> &&<a class="code hl_enumvalue" href="namespaceentt.html#add777bc22ff30abfbf52abd37d4e1549a18389a4a9ad5795744699cff0ba66c15">ref</a>: remloc) {</div>
|
|
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#af02e5833d5edb2450303bd1c029213b8">remove</a>(<a class="code hl_enumvalue" href="namespaceentt.html#add777bc22ff30abfbf52abd37d4e1549a18389a4a9ad5795744699cff0ba66c15">ref</a>.second.second);</div>
|
|
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> }</div>
|
|
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> </div>
|
|
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> <span class="keywordflow">while</span>(length--) {</div>
|
|
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>); <a class="code hl_namespace" href="namespaceentt.html">entt</a> != <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>) {</div>
|
|
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> restore(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> </div>
|
|
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::tuple_size_v<<span class="keyword">decltype</span>(<a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad54c710b9ee32ecf963e30760bb06976">get_as_tuple</a>({}))> == 0<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">u</a>) {</div>
|
|
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad53a7224b938b57f633b34af6d6c4621">emplace</a>(<a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> Type <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>{};</div>
|
|
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">archive</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>);</div>
|
|
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> <a class="code hl_class" href="classentt_1_1basic__storage.html">storage</a>.<a class="code hl_function" href="classentt_1_1basic__storage.html#ad53a7224b938b57f633b34af6d6c4621">emplace</a>(<a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>), std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>));</div>
|
|
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> }</div>
|
|
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> }</div>
|
|
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> }</div>
|
|
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> }</div>
|
|
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> </div>
|
|
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> </div>
|
|
<div class="foldopen" id="foldopen00474" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#ae497e30cd8fa96978a067bb0f4dee5cd"> 474</a></span> <a class="code hl_class" href="classentt_1_1basic__continuous__loader.html">basic_continuous_loader</a> &<a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ae497e30cd8fa96978a067bb0f4dee5cd">orphans</a>() {</div>
|
|
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> internal::orphans(*reg);</div>
|
|
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> </div>
|
|
<div class="foldopen" id="foldopen00484" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#ab682c079d9ddf61f04e121d6fab421d7"> 484</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ab682c079d9ddf61f04e121d6fab421d7">contains</a>(<a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#a8ec9043a725da1ddb4f16ce6cb635011">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#a77aa062268245a84c4c27dcc01839814">find</a>(<a class="code hl_function" href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2">to_entity</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> != remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#a5123c811e7090df1a793e9bc1821d2e5">cend</a>() && <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>->second.first == <a class="code hl_namespace" href="namespaceentt.html">entt</a>;</div>
|
|
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> </div>
|
|
<div class="foldopen" id="foldopen00494" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"><a class="line" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153"> 494</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#a8ec9043a725da1ddb4f16ce6cb635011">entity_type</a> <a class="code hl_function" href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">map</a>(<a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#a8ec9043a725da1ddb4f16ce6cb635011">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#a77aa062268245a84c4c27dcc01839814">find</a>(<a class="code hl_function" href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2">to_entity</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>)); <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> != remloc.<a class="code hl_function" href="classentt_1_1dense__map.html#a5123c811e7090df1a793e9bc1821d2e5">cend</a>() && <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>->second.first == <a class="code hl_namespace" href="namespaceentt.html">entt</a>) {</div>
|
|
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>->second.second;</div>
|
|
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> }</div>
|
|
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> </div>
|
|
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>;</div>
|
|
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> </div>
|
|
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> <a class="code hl_class" href="classentt_1_1dense__map.html">dense_map<typename traits_type::entity_type, std::pair<entity_type, entity_type></a>> remloc;</div>
|
|
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> <a class="code hl_typedef" href="classentt_1_1basic__continuous__loader.html#ae51ed38dcfbae0c059aeed260b4d7dee">registry_type</a> *reg;</div>
|
|
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> </div>
|
|
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span>} <span class="comment">// namespace entt</span></div>
|
|
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> </div>
|
|
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span><span class="preprocessor">#endif</span></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html">entt::basic_continuous_loader</a></div><div class="ttdoc">Utility class for continuous loading.</div><div class="ttdef"><b>Definition</b> <a href="#l00303">snapshot.hpp:303</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_a251ef8adbb329c667b5fe1857bac0078"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#a251ef8adbb329c667b5fe1857bac0078">entt::basic_continuous_loader::basic_continuous_loader</a></div><div class="ttdeci">basic_continuous_loader(const basic_continuous_loader &)=delete</div><div class="ttdoc">Default copy constructor, deleted on purpose.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_a4546c59ad6f12d4c071e99215790873f"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#a4546c59ad6f12d4c071e99215790873f">entt::basic_continuous_loader::basic_continuous_loader</a></div><div class="ttdeci">basic_continuous_loader(registry_type &source) noexcept</div><div class="ttdoc">Constructs an instance that is bound to a given registry.</div><div class="ttdef"><b>Definition</b> <a href="#l00372">snapshot.hpp:372</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_a5e29f22ee49b992ea16d352d3f1041d9"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#a5e29f22ee49b992ea16d352d3f1041d9">entt::basic_continuous_loader::basic_continuous_loader</a></div><div class="ttdeci">basic_continuous_loader(basic_continuous_loader &&) noexcept=default</div><div class="ttdoc">Default move constructor.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_a8ec9043a725da1ddb4f16ce6cb635011"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#a8ec9043a725da1ddb4f16ce6cb635011">entt::basic_continuous_loader::entity_type</a></div><div class="ttdeci">typename registry_type::entity_type entity_type</div><div class="ttdoc">Underlying entity identifier.</div><div class="ttdef"><b>Definition</b> <a href="#l00366">snapshot.hpp:366</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_ab682c079d9ddf61f04e121d6fab421d7"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#ab682c079d9ddf61f04e121d6fab421d7">entt::basic_continuous_loader::contains</a></div><div class="ttdeci">bool contains(entity_type entt) const noexcept</div><div class="ttdoc">Tests if a loader knows about a given entity.</div><div class="ttdef"><b>Definition</b> <a href="#l00484">snapshot.hpp:484</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_ac243f6a783ffe8839fd864d887ea0153"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#ac243f6a783ffe8839fd864d887ea0153">entt::basic_continuous_loader::map</a></div><div class="ttdeci">entity_type map(entity_type entt) const noexcept</div><div class="ttdoc">Returns the identifier to which an entity refers.</div><div class="ttdef"><b>Definition</b> <a href="#l00494">snapshot.hpp:494</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_ae497e30cd8fa96978a067bb0f4dee5cd"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#ae497e30cd8fa96978a067bb0f4dee5cd">entt::basic_continuous_loader::orphans</a></div><div class="ttdeci">basic_continuous_loader & orphans()</div><div class="ttdoc">Destroys those entities that have no elements.</div><div class="ttdef"><b>Definition</b> <a href="#l00474">snapshot.hpp:474</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__continuous__loader_html_ae51ed38dcfbae0c059aeed260b4d7dee"><div class="ttname"><a href="classentt_1_1basic__continuous__loader.html#ae51ed38dcfbae0c059aeed260b4d7dee">entt::basic_continuous_loader::registry_type</a></div><div class="ttdeci">Registry registry_type</div><div class="ttdef"><b>Definition</b> <a href="#l00364">snapshot.hpp:364</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a066f3db5d13496df1e1fbc8659197793"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entt::basic_entt_traits< internal::entt_traits< Type > >::entity_type</a></div><div class="ttdeci">typename Traits::entity_type entity_type</div><div class="ttdoc">Underlying entity type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00071">entity.hpp:71</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot__loader_html"><div class="ttname"><a href="classentt_1_1basic__snapshot__loader.html">entt::basic_snapshot_loader</a></div><div class="ttdoc">Utility class to restore a snapshot as a whole.</div><div class="ttdef"><b>Definition</b> <a href="#l00176">snapshot.hpp:176</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot__loader_html_a1a3aa9874823320812d8c75336942623"><div class="ttname"><a href="classentt_1_1basic__snapshot__loader.html#a1a3aa9874823320812d8c75336942623">entt::basic_snapshot_loader::basic_snapshot_loader</a></div><div class="ttdeci">basic_snapshot_loader(registry_type &source) noexcept</div><div class="ttdoc">Constructs an instance that is bound to a given registry.</div><div class="ttdef"><b>Definition</b> <a href="#l00190">snapshot.hpp:190</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot__loader_html_a21dff5a44dc7ee611a39d9517c8af96e"><div class="ttname"><a href="classentt_1_1basic__snapshot__loader.html#a21dff5a44dc7ee611a39d9517c8af96e">entt::basic_snapshot_loader::entity_type</a></div><div class="ttdeci">typename registry_type::entity_type entity_type</div><div class="ttdoc">Underlying entity identifier.</div><div class="ttdef"><b>Definition</b> <a href="#l00184">snapshot.hpp:184</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot__loader_html_a6f975e36c5ae7e84bedf315201e4e763"><div class="ttname"><a href="classentt_1_1basic__snapshot__loader.html#a6f975e36c5ae7e84bedf315201e4e763">entt::basic_snapshot_loader::basic_snapshot_loader</a></div><div class="ttdeci">basic_snapshot_loader(basic_snapshot_loader &&) noexcept=default</div><div class="ttdoc">Default move constructor.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot__loader_html_ac462fe9061f89d529833bdbc62919bca"><div class="ttname"><a href="classentt_1_1basic__snapshot__loader.html#ac462fe9061f89d529833bdbc62919bca">entt::basic_snapshot_loader::registry_type</a></div><div class="ttdeci">Registry registry_type</div><div class="ttdef"><b>Definition</b> <a href="#l00182">snapshot.hpp:182</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot__loader_html_ad37932c98a812596d40456bd4610e535"><div class="ttname"><a href="classentt_1_1basic__snapshot__loader.html#ad37932c98a812596d40456bd4610e535">entt::basic_snapshot_loader::orphans</a></div><div class="ttdeci">basic_snapshot_loader & orphans()</div><div class="ttdoc">Destroys those entities that have no elements.</div><div class="ttdef"><b>Definition</b> <a href="#l00277">snapshot.hpp:277</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot__loader_html_aea03a64bc66d5cb98206c7d15f623f1c"><div class="ttname"><a href="classentt_1_1basic__snapshot__loader.html#aea03a64bc66d5cb98206c7d15f623f1c">entt::basic_snapshot_loader::basic_snapshot_loader</a></div><div class="ttdeci">basic_snapshot_loader(const basic_snapshot_loader &)=delete</div><div class="ttdoc">Default copy constructor, deleted on purpose.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot_html"><div class="ttname"><a href="classentt_1_1basic__snapshot.html">entt::basic_snapshot</a></div><div class="ttdoc">Utility class to create snapshots from a registry.</div><div class="ttdef"><b>Definition</b> <a href="#l00047">snapshot.hpp:47</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot_html_a04da73375c3f546f52852aa174a2ab06"><div class="ttname"><a href="classentt_1_1basic__snapshot.html#a04da73375c3f546f52852aa174a2ab06">entt::basic_snapshot::basic_snapshot</a></div><div class="ttdeci">basic_snapshot(const registry_type &source) noexcept</div><div class="ttdoc">Constructs an instance that is bound to a given registry.</div><div class="ttdef"><b>Definition</b> <a href="#l00061">snapshot.hpp:61</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot_html_a052964a4a99d37ab39219bda2372c17b"><div class="ttname"><a href="classentt_1_1basic__snapshot.html#a052964a4a99d37ab39219bda2372c17b">entt::basic_snapshot::entity_type</a></div><div class="ttdeci">typename registry_type::entity_type entity_type</div><div class="ttdoc">Underlying entity identifier.</div><div class="ttdef"><b>Definition</b> <a href="#l00055">snapshot.hpp:55</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot_html_a0c9d161ffb8b94259166b432852efbac"><div class="ttname"><a href="classentt_1_1basic__snapshot.html#a0c9d161ffb8b94259166b432852efbac">entt::basic_snapshot::registry_type</a></div><div class="ttdeci">Registry registry_type</div><div class="ttdef"><b>Definition</b> <a href="#l00053">snapshot.hpp:53</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot_html_a66159be5a4f741e09369831ac59c771a"><div class="ttname"><a href="classentt_1_1basic__snapshot.html#a66159be5a4f741e09369831ac59c771a">entt::basic_snapshot::basic_snapshot</a></div><div class="ttdeci">basic_snapshot(const basic_snapshot &)=delete</div><div class="ttdoc">Default copy constructor, deleted on purpose.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot_html_ae4c96723bedd73f8db3789389f933b94"><div class="ttname"><a href="classentt_1_1basic__snapshot.html#ae4c96723bedd73f8db3789389f933b94">entt::basic_snapshot::get</a></div><div class="ttdeci">const basic_snapshot & get(Archive &archive, It first, It last, const id_type id=type_hash< Type >::value()) const</div><div class="ttdoc">Serializes all elements of a type with associated identifiers for the entities in a range.</div><div class="ttdef"><b>Definition</b> <a href="#l00140">snapshot.hpp:140</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__snapshot_html_ae8d0d610dad9fc00c73c167dc46cba8f"><div class="ttname"><a href="classentt_1_1basic__snapshot.html#ae8d0d610dad9fc00c73c167dc46cba8f">entt::basic_snapshot::basic_snapshot</a></div><div class="ttdeci">basic_snapshot(basic_snapshot &&) noexcept=default</div><div class="ttdoc">Default move constructor.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a69ad0662838fd351985a51ee3017fb6c"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a69ad0662838fd351985a51ee3017fb6c">entt::basic_sparse_set::size</a></div><div class="ttdeci">size_type size() const noexcept</div><div class="ttdoc">Returns the number of elements in a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="sparse__set_8hpp_source.html#l00576">sparse_set.hpp:576</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a97b47cbaea3fc30442fa3e6366766c86"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a97b47cbaea3fc30442fa3e6366766c86">entt::basic_sparse_set::contains</a></div><div class="ttdeci">bool contains(const entity_type entt) const noexcept</div><div class="ttdoc">Checks if a sparse set contains an entity.</div><div class="ttdef"><b>Definition</b> <a href="sparse__set_8hpp_source.html#l00683">sparse_set.hpp:683</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_abc26c3d5467a929c2b88d7ad915c1fa9"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#abc26c3d5467a929c2b88d7ad915c1fa9">entt::basic_sparse_set::free_list</a></div><div class="ttdeci">size_type free_list() const noexcept</div><div class="ttdoc">Returns data on the free list whose meaning depends on the mode.</div><div class="ttdef"><b>Definition</b> <a href="sparse__set_8hpp_source.html#l00513">sparse_set.hpp:513</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ad8936d80c3656449118a7a7a08be6258"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ad8936d80c3656449118a7a7a08be6258">entt::basic_sparse_set::empty</a></div><div class="ttdeci">bool empty() const noexcept</div><div class="ttdoc">Checks whether a sparse set is empty.</div><div class="ttdef"><b>Definition</b> <a href="sparse__set_8hpp_source.html#l00584">sparse_set.hpp:584</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_af02e5833d5edb2450303bd1c029213b8"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#af02e5833d5edb2450303bd1c029213b8">entt::basic_sparse_set::remove</a></div><div class="ttdeci">bool remove(const entity_type entt)</div><div class="ttdoc">Removes an entity from a sparse set if it exists.</div><div class="ttdef"><b>Definition</b> <a href="sparse__set_8hpp_source.html#l00844">sparse_set.hpp:844</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__storage_html"><div class="ttname"><a href="classentt_1_1basic__storage.html">entt::basic_storage</a></div><div class="ttdoc">Storage implementation.</div><div class="ttdef"><b>Definition</b> <a href="storage_8hpp_source.html#l00230">storage.hpp:230</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__storage_html_abaf0ee2aa0eedc73f2783f25a0d0ff73"><div class="ttname"><a href="classentt_1_1basic__storage.html#abaf0ee2aa0eedc73f2783f25a0d0ff73">entt::basic_storage::reach</a></div><div class="ttdeci">reverse_iterable reach() noexcept</div><div class="ttdoc">Returns a reverse iterable object to use to visit a storage.</div><div class="ttdef"><b>Definition</b> <a href="storage_8hpp_source.html#l00769">storage.hpp:769</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__storage_html_ad51850043e05582865e5c93fa06421be"><div class="ttname"><a href="classentt_1_1basic__storage.html#ad51850043e05582865e5c93fa06421be">entt::basic_storage::reserve</a></div><div class="ttdeci">void reserve(const size_type cap) override</div><div class="ttdoc">Increases the capacity of a storage.</div><div class="ttdef"><b>Definition</b> <a href="storage_8hpp_source.html#l00512">storage.hpp:512</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__storage_html_ad53a7224b938b57f633b34af6d6c4621"><div class="ttname"><a href="classentt_1_1basic__storage.html#ad53a7224b938b57f633b34af6d6c4621">entt::basic_storage::emplace</a></div><div class="ttdeci">value_type & emplace(const entity_type entt, Args &&...args)</div><div class="ttdoc">Assigns an entity to a storage and constructs its object.</div><div class="ttdef"><b>Definition</b> <a href="storage_8hpp_source.html#l00675">storage.hpp:675</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__storage_html_ad54c710b9ee32ecf963e30760bb06976"><div class="ttname"><a href="classentt_1_1basic__storage.html#ad54c710b9ee32ecf963e30760bb06976">entt::basic_storage::get_as_tuple</a></div><div class="ttdeci">std::tuple< const value_type & > get_as_tuple(const entity_type entt) const noexcept</div><div class="ttdoc">Returns the object assigned to an entity as a tuple.</div><div class="ttdef"><b>Definition</b> <a href="storage_8hpp_source.html#l00653">storage.hpp:653</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1dense__map_html"><div class="ttname"><a href="classentt_1_1dense__map.html">entt::dense_map</a></div><div class="ttdoc">Associative container for key-value pairs with unique keys.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00259">dense_map.hpp:259</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1dense__map_html_a4d884a2b7164b3df97d93dd2804222b0"><div class="ttname"><a href="classentt_1_1dense__map.html#a4d884a2b7164b3df97d93dd2804222b0">entt::dense_map::contains</a></div><div class="ttdeci">bool contains(const key_type &key) const</div><div class="ttdoc">Checks if the container contains an element with a given key.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00845">dense_map.hpp:845</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1dense__map_html_a5123c811e7090df1a793e9bc1821d2e5"><div class="ttname"><a href="classentt_1_1dense__map.html#a5123c811e7090df1a793e9bc1821d2e5">entt::dense_map::cend</a></div><div class="ttdeci">const_iterator cend() const noexcept</div><div class="ttdoc">Returns an iterator to the end.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00488">dense_map.hpp:488</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1dense__map_html_a77aa062268245a84c4c27dcc01839814"><div class="ttname"><a href="classentt_1_1dense__map.html#a77aa062268245a84c4c27dcc01839814">entt::dense_map::find</a></div><div class="ttdeci">iterator find(const key_type &key)</div><div class="ttdoc">Finds an element with a given key.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00770">dense_map.hpp:770</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1dense__map_html_a83036e3f167d28ba9afa943271fb5587"><div class="ttname"><a href="classentt_1_1dense__map.html#a83036e3f167d28ba9afa943271fb5587">entt::dense_map::erase</a></div><div class="ttdeci">iterator erase(const_iterator pos)</div><div class="ttdoc">Removes an element from a given position.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00656">dense_map.hpp:656</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1dense__map_html_aafff57a203cd3fc561320bad6eeea0c3"><div class="ttname"><a href="classentt_1_1dense__map.html#aafff57a203cd3fc561320bad6eeea0c3">entt::dense_map::insert_or_assign</a></div><div class="ttdeci">std::pair< iterator, bool > insert_or_assign(const key_type &key, Arg &&value)</div><div class="ttdoc">Inserts an element into the container or assigns to the current element if the key already exists.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00582">dense_map.hpp:582</a></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_a0b54e231d069e8a231e14b223388808a"><div class="ttname"><a href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entt::entity</a></div><div class="ttdeci">entity</div><div class="ttdoc">Default entity identifier.</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="anamespaceentt_html_a1202b4027d32db124efffdf1f2f8c5a2"><div class="ttname"><a href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2">entt::to_entity</a></div><div class="ttdeci">constexpr entt_traits< Entity >::entity_type to_entity(const Entity value) noexcept</div><div class="ttdoc">Returns the entity part once converted to the underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00188">entity.hpp:188</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_a12e4d0c58f9c4cc6f5513c39c530b9b7"><div class="ttname"><a href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">entt::make_obj_using_allocator</a></div><div class="ttdeci">constexpr Type make_obj_using_allocator(const Allocator &allocator, Args &&...args)</div><div class="ttdoc">Uses-allocator construction utility (waiting for C++20).</div><div class="ttdef"><b>Definition</b> <a href="memory_8hpp_source.html#l00219">memory.hpp:219</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_a2f0c0a1c1d953ea991591748744cdd8b"><div class="ttname"><a href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">entt::null</a></div><div class="ttdeci">constexpr null_t null</div><div class="ttdoc">Compile-time constant for null entities.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00375">entity.hpp:375</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_a674269102fdfe3fd6d7766210a828862"><div class="ttname"><a href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">entt::tombstone</a></div><div class="ttdeci">constexpr tombstone_t tombstone</div><div class="ttdoc">Compile-time constant for tombstone entities.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00384">entity.hpp:384</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_a7f3ac95ffe482bbd1a70b624ef8bb641"><div class="ttname"><a href="namespaceentt.html#a7f3ac95ffe482bbd1a70b624ef8bb641">entt::id_type</a></div><div class="ttdeci">std::uint32_t id_type</div><div class="ttdoc">Alias declaration for type identifiers.</div><div class="ttdef"><b>Definition</b> <a href="core_2fwd_8hpp_source.html#l00014">fwd.hpp:14</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_a85aff290a542f0f053b993b507410b21"><div class="ttname"><a href="namespaceentt.html#a85aff290a542f0f053b993b507410b21">entt::swap</a></div><div class="ttdeci">constexpr void swap(compressed_pair< First, Second > &lhs, compressed_pair< First, Second > &rhs)</div><div class="ttdoc">Swaps two compressed pair objects.</div><div class="ttdef"><b>Definition</b> <a href="compressed__pair_8hpp_source.html#l00243">compressed_pair.hpp:243</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_a8c24ecc5ab0055f9f2a4725c95afb29e"><div class="ttname"><a href="namespaceentt.html#a8c24ecc5ab0055f9f2a4725c95afb29e">entt::get</a></div><div class="ttdeci">constexpr get_t< Type... > get</div><div class="ttdoc">Variable template for lists of observed elements.</div><div class="ttdef"><b>Definition</b> <a href="entity_2fwd_8hpp_source.html#l00168">fwd.hpp:168</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_ab8c1f492841aeafa5e75422af3f0cdc4"><div class="ttname"><a href="namespaceentt.html#ab8c1f492841aeafa5e75422af3f0cdc4">entt::registry</a></div><div class="ttdeci">basic_registry<> registry</div><div class="ttdoc">Alias declaration for the most common use case.</div><div class="ttdef"><b>Definition</b> <a href="entity_2fwd_8hpp_source.html#l00093">fwd.hpp:93</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28"><div class="ttname"><a href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">entt::deletion_policy::in_place</a></div><div class="ttdeci">@ in_place</div><div class="ttdoc">In-place deletion policy.</div></div>
|
|
<div class="ttc" id="anamespaceentt_html_add777bc22ff30abfbf52abd37d4e1549a18389a4a9ad5795744699cff0ba66c15"><div class="ttname"><a href="namespaceentt.html#add777bc22ff30abfbf52abd37d4e1549a18389a4a9ad5795744699cff0ba66c15">entt::any_policy::ref</a></div><div class="ttdeci">@ ref</div><div class="ttdoc">Aliasing mode, the object points to a non-const element.</div></div>
|
|
<div class="ttc" id="anamespaceentt_html_aff8fd99fc1ff2432dcb0f6b017a9c60e"><div class="ttname"><a href="namespaceentt.html#aff8fd99fc1ff2432dcb0f6b017a9c60e">entt::storage</a></div><div class="ttdeci">basic_storage< Type > storage</div><div class="ttdoc">Alias declaration for the most common use case.</div><div class="ttdef"><b>Definition</b> <a href="entity_2fwd_8hpp_source.html#l00076">fwd.hpp:76</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1entt__traits_html"><div class="ttname"><a href="structentt_1_1entt__traits.html">entt::entt_traits</a></div><div class="ttdoc">Entity traits.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00163">entity.hpp:163</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1type__hash_html"><div class="ttname"><a href="structentt_1_1type__hash.html">entt::type_hash</a></div><div class="ttdoc">Type hash.</div><div class="ttdef"><b>Definition</b> <a href="type__info_8hpp_source.html#l00092">type_info.hpp:92</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
|
</small></address>
|
|
</body>
|
|
</html>
|