1018 lines
239 KiB
HTML
1018 lines
239 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/sparse_set.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">sparse_set.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_SPARSE_SET_HPP</span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define ENTT_ENTITY_SPARSE_SET_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 <memory></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 "../core/algorithm.hpp"</span></div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "../core/any.hpp"</span></div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "../core/bit.hpp"</span></div>
|
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include "../core/type_info.hpp"</span></div>
|
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include "entity.hpp"</span></div>
|
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include "fwd.hpp"</span></div>
|
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceentt.html">entt</a> {</div>
|
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">namespace </span>internal {</div>
|
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
|
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">struct </span>sparse_set_iterator final {</div>
|
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">using </span>value_type = <span class="keyword">typename</span> Container::value_type;</div>
|
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">using </span>pointer = <span class="keyword">typename</span> Container::const_pointer;</div>
|
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">using </span>reference = <span class="keyword">typename</span> Container::const_reference;</div>
|
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">using </span>difference_type = <span class="keyword">typename</span> Container::difference_type;</div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">using </span>iterator_category = std::random_access_iterator_tag;</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> <span class="keyword">constexpr</span> sparse_set_iterator() noexcept</div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> : packed{},</div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> offset{} {}</div>
|
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">constexpr</span> sparse_set_iterator(<span class="keyword">const</span> Container &ref, <span class="keyword">const</span> difference_type idx) noexcept</div>
|
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> : packed{&<a class="code hl_enumvalue" href="namespaceentt.html#add777bc22ff30abfbf52abd37d4e1549a18389a4a9ad5795744699cff0ba66c15">ref</a>},</div>
|
|
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> offset{idx} {}</div>
|
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">constexpr</span> sparse_set_iterator &operator++() noexcept {</div>
|
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> --offset, *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div>
|
|
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
|
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">constexpr</span> sparse_set_iterator operator++(<span class="keywordtype">int</span>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> sparse_set_iterator orig = *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">return</span> ++(*this), orig;</div>
|
|
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> }</div>
|
|
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
|
|
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keyword">constexpr</span> sparse_set_iterator &operator--() noexcept {</div>
|
|
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> ++offset, *<span class="keyword">this</span>;</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> </div>
|
|
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">constexpr</span> sparse_set_iterator operator--(<span class="keywordtype">int</span>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> sparse_set_iterator orig = *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">return</span> operator--(), orig;</div>
|
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> }</div>
|
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
|
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">constexpr</span> sparse_set_iterator &operator+=(<span class="keyword">const</span> difference_type value) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> offset -= value;</div>
|
|
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
|
|
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
|
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">constexpr</span> sparse_set_iterator <a class="code hl_function" href="namespaceentt.html#ab36ceb26049f62c07817a385e35395f6">operator+</a>(<span class="keyword">const</span> difference_type value) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> sparse_set_iterator copy = *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">return</span> (copy += value);</div>
|
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
|
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">constexpr</span> sparse_set_iterator &operator-=(<span class="keyword">const</span> difference_type value) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> (*<span class="keyword">this</span> += -value);</div>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
|
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">constexpr</span> sparse_set_iterator operator-(<span class="keyword">const</span> difference_type value) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">return</span> (*<span class="keyword">this</span> + -value);</div>
|
|
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
|
|
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
|
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> [[nodiscard]] <span class="keyword">constexpr</span> reference operator[](<span class="keyword">const</span> difference_type value) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">return</span> (*packed)[index() - value];</div>
|
|
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> }</div>
|
|
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
|
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> [[nodiscard]] <span class="keyword">constexpr</span> pointer operator->() const noexcept {</div>
|
|
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">return</span> std::addressof(<span class="keyword">operator</span>[](0));</div>
|
|
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
|
|
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
|
|
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> [[nodiscard]] <span class="keyword">constexpr</span> reference operator*() const noexcept {</div>
|
|
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">return</span> operator[](0);</div>
|
|
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
|
|
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
|
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> [[nodiscard]] <span class="keyword">constexpr</span> pointer data() const noexcept {</div>
|
|
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">return</span> packed ? packed->data() : <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div>
|
|
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
|
|
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> [[nodiscard]] <span class="keyword">constexpr</span> difference_type index() const noexcept {</div>
|
|
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">return</span> offset - 1;</div>
|
|
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> }</div>
|
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
|
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keyword">const</span> Container *packed;</div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> difference_type offset;</div>
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>};</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="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>[[nodiscard]] <span class="keyword">constexpr</span> std::ptrdiff_t operator-(<span class="keyword">const</span> sparse_set_iterator<Container> &lhs, <span class="keyword">const</span> sparse_set_iterator<Container> &rhs) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">return</span> rhs.index() - lhs.index();</div>
|
|
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span>}</div>
|
|
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
|
|
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#af7c61951b721a1e3612cf536bd707501">operator==</a>(<span class="keyword">const</span> sparse_set_iterator<Container> &lhs, <span class="keyword">const</span> sparse_set_iterator<Container> &rhs) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">return</span> lhs.index() == rhs.index();</div>
|
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>}</div>
|
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#ad9accc71a383509ada028f7fa2b767bf">operator!=</a>(<span class="keyword">const</span> sparse_set_iterator<Container> &lhs, <span class="keyword">const</span> sparse_set_iterator<Container> &rhs) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">return</span> !(lhs == rhs);</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="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#aa88e297d57dd5547afcde8dd291c4b8f">operator<</a>(<span class="keyword">const</span> sparse_set_iterator<Container> &lhs, <span class="keyword">const</span> sparse_set_iterator<Container> &rhs) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">return</span> lhs.index() > rhs.index();</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="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#aec8131af000055ceab85646c14f234ad">operator></a>(<span class="keyword">const</span> sparse_set_iterator<Container> &lhs, <span class="keyword">const</span> sparse_set_iterator<Container> &rhs) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">return</span> rhs < lhs;</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> </div>
|
|
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#a8c763e890bb00479a6a6aeae3b2a75f0">operator<=</a>(<span class="keyword">const</span> sparse_set_iterator<Container> &lhs, <span class="keyword">const</span> sparse_set_iterator<Container> &rhs) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">return</span> !(lhs > rhs);</div>
|
|
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
|
|
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
|
|
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="keyword">template</span><<span class="keyword">typename</span> Container></div>
|
|
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#adadb88dfb4278df554e7ffec5361ece4">operator>=</a>(<span class="keyword">const</span> sparse_set_iterator<Container> &lhs, <span class="keyword">const</span> sparse_set_iterator<Container> &rhs) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> !(lhs < rhs);</div>
|
|
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>}</div>
|
|
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
|
|
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span>} <span class="comment">// namespace internal</span></div>
|
|
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="keyword">template</span><<span class="keyword">typename</span> Entity, <span class="keyword">typename</span> Allocator></div>
|
|
<div class="foldopen" id="foldopen00158" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html"> 158</a></span><span class="keyword">class </span><a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> {</div>
|
|
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keyword">using </span>alloc_traits = std::allocator_traits<Allocator>;</div>
|
|
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keyword">static_assert</span>(std::is_same_v<typename alloc_traits::value_type, Entity>, <span class="stringliteral">"Invalid value type"</span>);</div>
|
|
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keyword">using </span>sparse_container_type = std::vector<typename alloc_traits::pointer, typename alloc_traits::template rebind_alloc<typename alloc_traits::pointer>>;</div>
|
|
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keyword">using </span>packed_container_type = std::vector<Entity, Allocator>;</div>
|
|
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</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<Entity></a>;</div>
|
|
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
|
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> max_size = <span class="keyword">static_cast<</span>std::size_t<span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>));</div>
|
|
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
|
|
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">auto</span> policy_to_head() <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(max_size * <span class="keyword">static_cast<</span><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">decltype</a>(max_size)<span class="keyword">></span>(mode != <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>));</div>
|
|
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> }</div>
|
|
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
|
|
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">auto</span> sparse_ptr(<span class="keyword">const</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Entity</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>)<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> / <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>;</div>
|
|
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordflow">return</span> (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> < sparse.size() && sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>]) ? (sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>] + <a class="code hl_function" href="namespaceentt.html#a1ae98eeee0b0cb3e94d97d08a74a06f0">fast_mod</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>, <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>)) : <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> }</div>
|
|
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
|
|
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">auto</span> &sparse_ref(<span class="keyword">const</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Entity</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>)<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> ENTT_ASSERT(sparse_ptr(<a class="code hl_namespace" href="namespaceentt.html">entt</a>), <span class="stringliteral">"Invalid element"</span>);</div>
|
|
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">return</span> sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> / <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>][<a class="code hl_function" href="namespaceentt.html#a1ae98eeee0b0cb3e94d97d08a74a06f0">fast_mod</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>, <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>)];</div>
|
|
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> }</div>
|
|
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
|
|
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">auto</span> to_iterator(<span class="keyword">const</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Entity</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>)<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">return</span> --(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>() - <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> }</div>
|
|
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> </div>
|
|
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">auto</span> &assure_at_least(<span class="keyword">const</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Entity</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>) {</div>
|
|
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> / <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>;</div>
|
|
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> </div>
|
|
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="keywordflow">if</span>(!(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> < sparse.size())) {</div>
|
|
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> sparse.resize(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> + 1u, <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> }</div>
|
|
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
|
|
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keywordflow">if</span>(!sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>]) {</div>
|
|
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">init</a> = <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>;</div>
|
|
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page_allocator</a>{packed.get_allocator()};</div>
|
|
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>] = alloc_traits::allocate(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page_allocator</a>, <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>);</div>
|
|
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> std::uninitialized_fill(sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>], sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>] + <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">init</a>);</div>
|
|
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> }</div>
|
|
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
|
|
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">return</span> sparse[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>][<a class="code hl_function" href="namespaceentt.html#a1ae98eeee0b0cb3e94d97d08a74a06f0">fast_mod</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>, <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>)];</div>
|
|
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> }</div>
|
|
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> </div>
|
|
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordtype">void</span> release_sparse_pages() {</div>
|
|
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page_allocator</a>{packed.get_allocator()};</div>
|
|
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
|
|
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> &&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>: sparse) {</div>
|
|
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> != <span class="keyword">nullptr</span>) {</div>
|
|
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> std::destroy(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> + <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>);</div>
|
|
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> alloc_traits::deallocate(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page_allocator</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a>, <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>);</div>
|
|
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">page</a> = <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> }</div>
|
|
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> }</div>
|
|
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> }</div>
|
|
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
|
|
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordtype">void</span> swap_at(<span class="keyword">const</span> std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">lhs</a>, <span class="keyword">const</span> std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">rhs</a>) {</div>
|
|
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keyword">auto</span> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a> = packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">lhs</a>];</div>
|
|
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keyword">auto</span> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a> = packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">rhs</a>];</div>
|
|
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> </div>
|
|
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> sparse_ref(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>) = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</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_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">rhs</a>), <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>));</div>
|
|
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> sparse_ref(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>) = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</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_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">lhs</a>), <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>));</div>
|
|
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> </div>
|
|
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> std::swap(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>);</div>
|
|
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> }</div>
|
|
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> </div>
|
|
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">void</span> *get_at(<span class="keyword">const</span> std::size_t)<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> }</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="keyword">virtual</span> <span class="keywordtype">void</span> swap_or_move([[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">maybe_unused</a>]] <span class="keyword">const</span> std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">lhs</a>, [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">maybe_unused</a>]] <span class="keyword">const</span> std::size_t <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">rhs</a>) {</div>
|
|
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> ENTT_ASSERT((mode != <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>) || ((<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">lhs</a> < head) == (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">rhs</a> < head)), <span class="stringliteral">"Cross swapping is not supported"</span>);</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> </div>
|
|
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span><span class="keyword">protected</span>:</div>
|
|
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a"> 238</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a> = internal::sparse_set_iterator<packed_container_type>;</div>
|
|
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> </div>
|
|
<div class="foldopen" id="foldopen00244" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#abde0af92d2d8eade7b5acf5ab02f8038"> 244</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#abde0af92d2d8eade7b5acf5ab02f8038">swap_only</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) {</div>
|
|
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> ENTT_ASSERT(mode == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>, <span class="stringliteral">"Deletion policy mismatch"</span>);</div>
|
|
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>);</div>
|
|
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a777ecee811e5fa5567bc462dba476771">bump</a>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a42a94cfb5923165804979505731ad7c6">traits_type::next</a>(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>));</div>
|
|
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> swap_at(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>, head -= (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> < head));</div>
|
|
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> </div>
|
|
<div class="foldopen" id="foldopen00255" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a2b95c0acd8af718e712362d1177dbc1e"> 255</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a2b95c0acd8af718e712362d1177dbc1e">swap_and_pop</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) {</div>
|
|
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> ENTT_ASSERT(mode == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">deletion_policy::swap_and_pop</a>, <span class="stringliteral">"Deletion policy mismatch"</span>);</div>
|
|
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <span class="keyword">auto</span> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">self</a> = sparse_ref(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>);</div>
|
|
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</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="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">self</a>);</div>
|
|
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> sparse_ref(packed.back()) = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>, <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(packed.back()));</div>
|
|
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> packed[<span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>)] = packed.back();</div>
|
|
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="comment">// unnecessary but it helps to detect nasty bugs</span></div>
|
|
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> ENTT_ASSERT((packed.back() = <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>, <span class="keyword">true</span>), <span class="stringliteral">""</span>);</div>
|
|
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> <span class="comment">// lazy self-assignment guard</span></div>
|
|
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">self</a> = <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>;</div>
|
|
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> packed.pop_back();</div>
|
|
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> </div>
|
|
<div class="foldopen" id="foldopen00272" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#aa45b7ab945ade01c286a35cba5376d7f"> 272</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#aa45b7ab945ade01c286a35cba5376d7f">in_place_pop</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>) {</div>
|
|
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> ENTT_ASSERT(mode == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>, <span class="stringliteral">"Deletion policy mismatch"</span>);</div>
|
|
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(std::exchange(sparse_ref(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>), <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>)));</div>
|
|
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>] = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</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::exchange(head, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>)), <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>);</div>
|
|
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> </div>
|
|
<div class="foldopen" id="foldopen00283" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a8f66cbcaa360286d296dcb7a33c7e1ce"> 283</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a8f66cbcaa360286d296dcb7a33c7e1ce">pop</a>(<a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a> first, <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a> last) {</div>
|
|
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="keywordflow">switch</span>(mode) {</div>
|
|
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">deletion_policy::swap_and_pop</a>:</div>
|
|
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keywordflow">for</span>(; first != last; ++first) {</div>
|
|
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">swap_and_pop</a>(first);</div>
|
|
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> }</div>
|
|
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>:</div>
|
|
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="keywordflow">for</span>(; first != last; ++first) {</div>
|
|
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#aa45b7ab945ade01c286a35cba5376d7f">in_place_pop</a>(first);</div>
|
|
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> }</div>
|
|
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>:</div>
|
|
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <span class="keywordflow">for</span>(; first != last; ++first) {</div>
|
|
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">swap_only</a>(first);</div>
|
|
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> }</div>
|
|
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> }</div>
|
|
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> </div>
|
|
<div class="foldopen" id="foldopen00304" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a1e8e00e8bfa75311482f2fa071e244e6"> 304</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1e8e00e8bfa75311482f2fa071e244e6">pop_all</a>() {</div>
|
|
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <span class="keywordflow">switch</span>(mode) {</div>
|
|
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>:</div>
|
|
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <span class="keywordflow">if</span>(head != max_size) {</div>
|
|
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> first = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a11b72852c0ae4f7f0dc5f27ba6001f42">begin</a>(); !(first.index() < 0); ++first) {</div>
|
|
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> <span class="keywordflow">if</span>(*first != <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>) {</div>
|
|
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> sparse_ref(*first) = <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>;</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> }</div>
|
|
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <span class="keywordflow">break</span>;</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> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">fallthrough</a>]];</div>
|
|
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>:</div>
|
|
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">deletion_policy::swap_and_pop</a>:</div>
|
|
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> first = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a11b72852c0ae4f7f0dc5f27ba6001f42">begin</a>(); !(first.index() < 0); ++first) {</div>
|
|
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> sparse_ref(*first) = <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>;</div>
|
|
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> }</div>
|
|
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> }</div>
|
|
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> </div>
|
|
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> head = policy_to_head();</div>
|
|
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> packed.clear();</div>
|
|
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> </div>
|
|
<div class="foldopen" id="foldopen00334" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a1c62d9615acde55f57fcca92e44c747c"> 334</a></span> <span class="keyword">virtual</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1c62d9615acde55f57fcca92e44c747c">try_emplace</a>(<span class="keyword">const</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Entity</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>, <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">force_back</a>, <span class="keyword">const</span> <span class="keywordtype">void</span> * = <span class="keyword">nullptr</span>) {</div>
|
|
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> ENTT_ASSERT(<a class="code hl_namespace" href="namespaceentt.html">entt</a> != <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a> && <a class="code hl_namespace" href="namespaceentt.html">entt</a> != <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>, <span class="stringliteral">"Invalid element"</span>);</div>
|
|
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keyword">auto</span> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = assure_at_least(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a69ad0662838fd351985a51ee3017fb6c">size</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> <span class="keywordflow">switch</span>(mode) {</div>
|
|
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>:</div>
|
|
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keywordflow">if</span>(head != max_size && !<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">force_back</a>) {</div>
|
|
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = head;</div>
|
|
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> ENTT_ASSERT(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> == <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>, <span class="stringliteral">"Slot not available"</span>);</div>
|
|
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</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>(head), <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> head = <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(std::exchange(packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>], <a class="code hl_namespace" href="namespaceentt.html">entt</a>)));</div>
|
|
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> <span class="keywordflow">break</span>;</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> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">fallthrough</a>]];</div>
|
|
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">deletion_policy::swap_and_pop</a>:</div>
|
|
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> packed.push_back(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> ENTT_ASSERT(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> == <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>, <span class="stringliteral">"Slot not available"</span>);</div>
|
|
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</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>(packed.size() - 1u), <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>:</div>
|
|
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> == <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>) {</div>
|
|
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> packed.push_back(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</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>(packed.size() - 1u), <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> ENTT_ASSERT(!(<span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>)) < head), <span class="stringliteral">"Slot not available"</span>);</div>
|
|
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a777ecee811e5fa5567bc462dba476771">bump</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</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> </div>
|
|
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = head++;</div>
|
|
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> swap_at(<span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>)), <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>);</div>
|
|
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> }</div>
|
|
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> </div>
|
|
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <span class="keywordflow">return</span> --(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>() - <span class="keyword">static_cast<</span><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> iterator::difference_type<span class="keyword">></span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>));</div>
|
|
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> </div>
|
|
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> <span class="comment">// NOLINTNEXTLINE(performance-unnecessary-value-param)</span></div>
|
|
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a94662470540e38b7933b23b2ab2249f7"> 373</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a94662470540e38b7933b23b2ab2249f7">bind_any</a>(<a class="code hl_class" href="classentt_1_1basic__any.html">any</a>) <span class="keyword">noexcept</span> {}</div>
|
|
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> </div>
|
|
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069"> 377</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069">allocator_type</a> = Allocator;</div>
|
|
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0"> 379</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> = <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">traits_type::value_type</a>;</div>
|
|
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a14e627591924feaaad4f04d13c4f4b2d"> 381</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a14e627591924feaaad4f04d13c4f4b2d">version_type</a> = <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">traits_type::version_type</a>;</div>
|
|
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb"> 383</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> = std::size_t;</div>
|
|
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a8b18963e68d4f003e19389fd342f90cc"> 385</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a8b18963e68d4f003e19389fd342f90cc">pointer</a> = <span class="keyword">typename</span> packed_container_type::const_pointer;</div>
|
|
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0"> 387</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a> = <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">basic_iterator</a>;</div>
|
|
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a3688979d568f2450725d69aa89571f4f"> 389</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a3688979d568f2450725d69aa89571f4f">const_iterator</a> = <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a>;</div>
|
|
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#afe62c143e816cf5e12078a607966c003"> 391</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#afe62c143e816cf5e12078a607966c003">reverse_iterator</a> = std::reverse_iterator<iterator>;</div>
|
|
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a27d66fda0fba1587a5f61e9c16f742f7"> 393</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a27d66fda0fba1587a5f61e9c16f742f7">const_reverse_iterator</a> = std::reverse_iterator<const_iterator>;</div>
|
|
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> </div>
|
|
<div class="foldopen" id="foldopen00396" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#afc504894fc2c20ea25b7fc2864bd22e3"> 396</a></span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#afc504894fc2c20ea25b7fc2864bd22e3">basic_sparse_set</a>()</div>
|
|
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> : <a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a>{<a class="code hl_function" href="namespaceentt.html#adb9682d476edbbe4434680363f9c0eb3">type_id</a><<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>>()} {}</div>
|
|
</div>
|
|
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> </div>
|
|
<div class="foldopen" id="foldopen00403" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a1b636566df9e6f3f36ff62d2bdde8d10"> 403</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1b636566df9e6f3f36ff62d2bdde8d10">basic_sparse_set</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069">allocator_type</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>)</div>
|
|
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> : <a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a>{<a class="code hl_enumeration" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581">deletion_policy</a>::<a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">swap_and_pop</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>} {}</div>
|
|
</div>
|
|
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> </div>
|
|
<div class="foldopen" id="foldopen00411" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a8e264ab5a7e2d97a204004d25b14238b"> 411</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a8e264ab5a7e2d97a204004d25b14238b">basic_sparse_set</a>(<a class="code hl_enumeration" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581">deletion_policy</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pol</a>, <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069">allocator_type</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a> = {})</div>
|
|
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> : <a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a>{<a class="code hl_function" href="namespaceentt.html#adb9682d476edbbe4434680363f9c0eb3">type_id</a><<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>>(), <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pol</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>} {}</div>
|
|
</div>
|
|
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> </div>
|
|
<div class="foldopen" id="foldopen00421" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#af5d35aae661fb35e485ac733969c84d9"> 421</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#af5d35aae661fb35e485ac733969c84d9">basic_sparse_set</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1type__info.html">type_info</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>, <a class="code hl_enumeration" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581">deletion_policy</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pol</a> = <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">deletion_policy::swap_and_pop</a>, <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069">allocator_type</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a> = {})</div>
|
|
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> : sparse{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>},</div>
|
|
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> packed{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>},</div>
|
|
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> info{&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>},</div>
|
|
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> mode{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pol</a>},</div>
|
|
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> head{policy_to_head()} {</div>
|
|
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> ENTT_ASSERT(<a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">traits_type::version_mask</a> || mode != <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>, <span class="stringliteral">"Policy does not support zero-sized versions"</span>);</div>
|
|
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> </div>
|
|
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#acfbfbfe9f6967ff54f06c210d787f4ad"> 431</a></span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#acfbfbfe9f6967ff54f06c210d787f4ad">basic_sparse_set</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> </div>
|
|
<div class="foldopen" id="foldopen00437" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#aaf4d881833f592ed21079e2a0fac8d2a"> 437</a></span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#aaf4d881833f592ed21079e2a0fac8d2a">basic_sparse_set</a>(<a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>) <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></div>
|
|
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> : sparse{std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.sparse)},</div>
|
|
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> packed{std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.packed)},</div>
|
|
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> info{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.info},</div>
|
|
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> mode{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.mode},</div>
|
|
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> head{std::exchange(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.head, policy_to_head())} {}</div>
|
|
</div>
|
|
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> </div>
|
|
<div class="foldopen" id="foldopen00449" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a9d6e25d1435a6216c60b42babd64085d"> 449</a></span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a9d6e25d1435a6216c60b42babd64085d">basic_sparse_set</a>(<a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>, <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069">allocator_type</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>)</div>
|
|
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> : sparse{std::<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">move</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.sparse), <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>},</div>
|
|
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> packed{std::<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">move</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.packed), <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>},</div>
|
|
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> info{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.info},</div>
|
|
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> mode{<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.mode},</div>
|
|
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> head{std::<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">exchange</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.head, policy_to_head())} {</div>
|
|
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> ENTT_ASSERT(alloc_traits::is_always_equal::value || <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab292b60dd8782739701906aec8f381ab">get_allocator</a>() == <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.get_allocator(), <span class="stringliteral">"Copying a sparse set is not allowed"</span>);</div>
|
|
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> </div>
|
|
<div class="foldopen" id="foldopen00459" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ac56f048f614c38f14b19ba9cb27faa94"> 459</a></span> <span class="keyword">virtual</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ac56f048f614c38f14b19ba9cb27faa94">~basic_sparse_set</a>() {</div>
|
|
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> release_sparse_pages();</div>
|
|
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> </div>
|
|
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a71e7865957db2ed2243c77eac979c8ee"> 467</a></span> <a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a71e7865957db2ed2243c77eac979c8ee">operator=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</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__sparse__set.html#a53f8aad7f89c040a3ef0e79ad9e814fb"> 474</a></span> <a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a53f8aad7f89c040a3ef0e79ad9e814fb">operator=</a>(<a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &&<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> ENTT_ASSERT(alloc_traits::is_always_equal::value || <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab292b60dd8782739701906aec8f381ab">get_allocator</a>() == <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.get_allocator(), <span class="stringliteral">"Copying a sparse set is not allowed"</span>);</div>
|
|
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">swap</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>);</div>
|
|
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</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__sparse__set.html#a85505b5556cc61ab5557cd311442ad42"> 484</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">swap</a>(<a class="code hl_class" href="classentt_1_1basic__sparse__set.html">basic_sparse_set</a> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <span class="keyword">using </span>std::swap;</div>
|
|
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">swap</a>(sparse, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.sparse);</div>
|
|
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">swap</a>(packed, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.packed);</div>
|
|
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">swap</a>(info, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.info);</div>
|
|
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">swap</a>(mode, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.mode);</div>
|
|
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">swap</a>(head, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>.head);</div>
|
|
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> </div>
|
|
<div class="foldopen" id="foldopen00497" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ab292b60dd8782739701906aec8f381ab"> 497</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069">allocator_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab292b60dd8782739701906aec8f381ab">get_allocator</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> <span class="keywordflow">return</span> packed.get_allocator();</div>
|
|
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
|
|
<div class="foldopen" id="foldopen00505" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a91f80e4333c16c6c3786b041c8a7e8a2"> 505</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_enumeration" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581">deletion_policy</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a91f80e4333c16c6c3786b041c8a7e8a2">policy</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> <span class="keywordflow">return</span> mode;</div>
|
|
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> </div>
|
|
<div class="foldopen" id="foldopen00513" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#abc26c3d5467a929c2b88d7ad915c1fa9"> 513</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#abc26c3d5467a929c2b88d7ad915c1fa9">free_list</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> <span class="keywordflow">return</span> head;</div>
|
|
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> </div>
|
|
<div class="foldopen" id="foldopen00521" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#acd0d917af2718dcc8f3dc71d3086e013"> 521</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#acd0d917af2718dcc8f3dc71d3086e013">free_list</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> ENTT_ASSERT((mode == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>) && !(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a> > packed.size()), <span class="stringliteral">"Invalid value"</span>);</div>
|
|
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> head = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a>;</div>
|
|
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> </div>
|
|
<div class="foldopen" id="foldopen00534" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a58d49df52ee3133a1347dc01131a4f1a"> 534</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a58d49df52ee3133a1347dc01131a4f1a">reserve</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">cap</a>) {</div>
|
|
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> packed.reserve(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">cap</a>);</div>
|
|
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> </div>
|
|
<div class="foldopen" id="foldopen00543" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a17b25baaceb061cd93da56f1ec24ee98"> 543</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">virtual</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a17b25baaceb061cd93da56f1ec24ee98">capacity</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> <span class="keywordflow">return</span> packed.capacity();</div>
|
|
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> </div>
|
|
<div class="foldopen" id="foldopen00548" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a7e10cc6ddc7ef9c733aabdec849c5b79"> 548</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a7e10cc6ddc7ef9c733aabdec849c5b79">shrink_to_fit</a>() {</div>
|
|
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> packed.shrink_to_fit();</div>
|
|
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> </div>
|
|
<div class="foldopen" id="foldopen00562" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a7e51c3904b0581866f8791a04435fc5f"> 562</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a7e51c3904b0581866f8791a04435fc5f">extent</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> <span class="keywordflow">return</span> sparse.size() * <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">traits_type::page_size</a>;</div>
|
|
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> </div>
|
|
<div class="foldopen" id="foldopen00576" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a69ad0662838fd351985a51ee3017fb6c"> 576</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a69ad0662838fd351985a51ee3017fb6c">size</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> <span class="keywordflow">return</span> packed.size();</div>
|
|
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> </div>
|
|
<div class="foldopen" id="foldopen00584" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ad8936d80c3656449118a7a7a08be6258"> 584</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__sparse__set.html#ad8936d80c3656449118a7a7a08be6258">empty</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> <span class="keywordflow">return</span> packed.empty();</div>
|
|
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> </div>
|
|
<div class="foldopen" id="foldopen00592" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a736ba15d734ea65f18e3c1fd5d748e5e"> 592</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__sparse__set.html#a736ba15d734ea65f18e3c1fd5d748e5e">contiguous</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> <span class="keywordflow">return</span> (mode != <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>) || (head == max_size);</div>
|
|
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> </div>
|
|
<div class="foldopen" id="foldopen00600" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a4c540ff32bca204b1adbd9e4f4a0240b"> 600</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a8b18963e68d4f003e19389fd342f90cc">pointer</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a4c540ff32bca204b1adbd9e4f4a0240b">data</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno"> 601</span> <span class="keywordflow">return</span> packed.data();</div>
|
|
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"> 602</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"> 603</span> </div>
|
|
<div class="foldopen" id="foldopen00612" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a11b72852c0ae4f7f0dc5f27ba6001f42"> 612</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a11b72852c0ae4f7f0dc5f27ba6001f42">begin</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno"> 613</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = <span class="keyword">static_cast<</span><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> iterator::difference_type<span class="keyword">></span>(packed.size());</div>
|
|
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno"> 614</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a>{packed, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>};</div>
|
|
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"> 615</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00616" name="l00616"></a><span class="lineno"> 616</span> </div>
|
|
<div class="foldopen" id="foldopen00618" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00618" name="l00618"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a1934fc85ed01c3528c45ab9a76712fa7"> 618</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a3688979d568f2450725d69aa89571f4f">const_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1934fc85ed01c3528c45ab9a76712fa7">cbegin</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00619" name="l00619"></a><span class="lineno"> 619</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a11b72852c0ae4f7f0dc5f27ba6001f42">begin</a>();</div>
|
|
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"> 620</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno"> 621</span> </div>
|
|
<div class="foldopen" id="foldopen00627" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7"> 627</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00628" name="l00628"></a><span class="lineno"> 628</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a>{packed, {}};</div>
|
|
<div class="line"><a id="l00629" name="l00629"></a><span class="lineno"> 629</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00630" name="l00630"></a><span class="lineno"> 630</span> </div>
|
|
<div class="foldopen" id="foldopen00632" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00632" name="l00632"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a9f0cc6e746fd49b0c7a0b8e5d8504fef"> 632</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a3688979d568f2450725d69aa89571f4f">const_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a9f0cc6e746fd49b0c7a0b8e5d8504fef">cend</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00633" name="l00633"></a><span class="lineno"> 633</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>();</div>
|
|
<div class="line"><a id="l00634" name="l00634"></a><span class="lineno"> 634</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno"> 635</span> </div>
|
|
<div class="foldopen" id="foldopen00645" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00645" name="l00645"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#aba067d644dcb69d8d11f6d5dc48b9c9b"> 645</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#afe62c143e816cf5e12078a607966c003">reverse_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#aba067d644dcb69d8d11f6d5dc48b9c9b">rbegin</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00646" name="l00646"></a><span class="lineno"> 646</span> <span class="keywordflow">return</span> std::make_reverse_iterator(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>());</div>
|
|
<div class="line"><a id="l00647" name="l00647"></a><span class="lineno"> 647</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00648" name="l00648"></a><span class="lineno"> 648</span> </div>
|
|
<div class="foldopen" id="foldopen00650" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ad57b82c12d92837a14d8904e82eb49a9"> 650</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a27d66fda0fba1587a5f61e9c16f742f7">const_reverse_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad57b82c12d92837a14d8904e82eb49a9">crbegin</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00651" name="l00651"></a><span class="lineno"> 651</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#aba067d644dcb69d8d11f6d5dc48b9c9b">rbegin</a>();</div>
|
|
<div class="line"><a id="l00652" name="l00652"></a><span class="lineno"> 652</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00653" name="l00653"></a><span class="lineno"> 653</span> </div>
|
|
<div class="foldopen" id="foldopen00659" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00659" name="l00659"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a408ae201025279196f63ef32cf58da9a"> 659</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#afe62c143e816cf5e12078a607966c003">reverse_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a408ae201025279196f63ef32cf58da9a">rend</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00660" name="l00660"></a><span class="lineno"> 660</span> <span class="keywordflow">return</span> std::make_reverse_iterator(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a11b72852c0ae4f7f0dc5f27ba6001f42">begin</a>());</div>
|
|
<div class="line"><a id="l00661" name="l00661"></a><span class="lineno"> 661</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00662" name="l00662"></a><span class="lineno"> 662</span> </div>
|
|
<div class="foldopen" id="foldopen00664" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00664" name="l00664"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ab28f2f1c7bbf2861f4a3e7602a317b96"> 664</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a27d66fda0fba1587a5f61e9c16f742f7">const_reverse_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab28f2f1c7bbf2861f4a3e7602a317b96">crend</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l00665" name="l00665"></a><span class="lineno"> 665</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a408ae201025279196f63ef32cf58da9a">rend</a>();</div>
|
|
<div class="line"><a id="l00666" name="l00666"></a><span class="lineno"> 666</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00667" name="l00667"></a><span class="lineno"> 667</span> </div>
|
|
<div class="foldopen" id="foldopen00674" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00674" name="l00674"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a8b9656b9f037aede492f66e87e57a6ca"> 674</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a3688979d568f2450725d69aa89571f4f">const_iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a8b9656b9f037aede492f66e87e57a6ca">find</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">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="l00675" name="l00675"></a><span class="lineno"> 675</span> <span class="keywordflow">return</span> <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>) ? to_iterator(<a class="code hl_namespace" href="namespaceentt.html">entt</a>) : <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>();</div>
|
|
<div class="line"><a id="l00676" name="l00676"></a><span class="lineno"> 676</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00677" name="l00677"></a><span class="lineno"> 677</span> </div>
|
|
<div class="foldopen" id="foldopen00683" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00683" name="l00683"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a97b47cbaea3fc30442fa3e6366766c86"> 683</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__sparse__set.html#a97b47cbaea3fc30442fa3e6366766c86">contains</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">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="l00684" name="l00684"></a><span class="lineno"> 684</span> <span class="keyword">const</span> <span class="keyword">auto</span> *<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = sparse_ptr(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00685" name="l00685"></a><span class="lineno"> 685</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">cap</a> = <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec">traits_type::entity_mask</a>;</div>
|
|
<div class="line"><a id="l00686" name="l00686"></a><span class="lineno"> 686</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">mask</a> = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>) & <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">~cap</a>;</div>
|
|
<div class="line"><a id="l00687" name="l00687"></a><span class="lineno"> 687</span> <span class="comment">// testing versions permits to avoid accessing the packed array</span></div>
|
|
<div class="line"><a id="l00688" name="l00688"></a><span class="lineno"> 688</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> && (((<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">mask</a> & <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>)) ^ <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>)) < <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">cap</a>);</div>
|
|
<div class="line"><a id="l00689" name="l00689"></a><span class="lineno"> 689</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00690" name="l00690"></a><span class="lineno"> 690</span> </div>
|
|
<div class="foldopen" id="foldopen00697" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00697" name="l00697"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a96cf0ed9f37ededbd40f6a8c38c1940b"> 697</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a14e627591924feaaad4f04d13c4f4b2d">version_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a96cf0ed9f37ededbd40f6a8c38c1940b">current</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">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="l00698" name="l00698"></a><span class="lineno"> 698</span> <span class="keyword">const</span> <span class="keyword">auto</span> *<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = sparse_ptr(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00699" name="l00699"></a><span class="lineno"> 699</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">fallback</a> = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">traits_type::to_version</a>(<a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>);</div>
|
|
<div class="line"><a id="l00700" name="l00700"></a><span class="lineno"> 700</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> ? <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">traits_type::to_version</a>(*<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>) : <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">fallback</a>;</div>
|
|
<div class="line"><a id="l00701" name="l00701"></a><span class="lineno"> 701</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00702" name="l00702"></a><span class="lineno"> 702</span> </div>
|
|
<div class="foldopen" id="foldopen00713" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00713" name="l00713"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa"> 713</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">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="l00714" name="l00714"></a><span class="lineno"> 714</span> ENTT_ASSERT(<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>), <span class="stringliteral">"Set does not contain entity"</span>);</div>
|
|
<div class="line"><a id="l00715" name="l00715"></a><span class="lineno"> 715</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(sparse_ref(<a class="code hl_namespace" href="namespaceentt.html">entt</a>)));</div>
|
|
<div class="line"><a id="l00716" name="l00716"></a><span class="lineno"> 716</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00717" name="l00717"></a><span class="lineno"> 717</span> </div>
|
|
<div class="foldopen" id="foldopen00723" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00723" name="l00723"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#aba848e5d30f1f8fadce544d7bba7296a"> 723</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#aba848e5d30f1f8fadce544d7bba7296a">operator[]</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00724" name="l00724"></a><span class="lineno"> 724</span> ENTT_ASSERT(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> < packed.size(), <span class="stringliteral">"Index out of bounds"</span>);</div>
|
|
<div class="line"><a id="l00725" name="l00725"></a><span class="lineno"> 725</span> <span class="keywordflow">return</span> packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>];</div>
|
|
<div class="line"><a id="l00726" name="l00726"></a><span class="lineno"> 726</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00727" name="l00727"></a><span class="lineno"> 727</span> </div>
|
|
<div class="foldopen" id="foldopen00738" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00738" name="l00738"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680"> 738</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">const</span> <span class="keywordtype">void</span> *<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">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="l00739" name="l00739"></a><span class="lineno"> 739</span> <span class="keywordflow">return</span> get_at(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00740" name="l00740"></a><span class="lineno"> 740</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00741" name="l00741"></a><span class="lineno"> 741</span> </div>
|
|
<div class="foldopen" id="foldopen00743" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00743" name="l00743"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a319f3827fb68d33cddbdb5519723ea6f"> 743</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keywordtype">void</span> *<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a319f3827fb68d33cddbdb5519723ea6f">value</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l00744" name="l00744"></a><span class="lineno"> 744</span> <span class="keywordflow">return</span> <span class="keyword">const_cast<</span><span class="keywordtype">void</span> *<span class="keyword">></span>(std::as_const(*this).value(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00745" name="l00745"></a><span class="lineno"> 745</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00746" name="l00746"></a><span class="lineno"> 746</span> </div>
|
|
<div class="foldopen" id="foldopen00759" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00759" name="l00759"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a8cf01b2a8d20329ec1c1d5d3b5708969"> 759</a></span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a8cf01b2a8d20329ec1c1d5d3b5708969">push</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>, <span class="keyword">const</span> <span class="keywordtype">void</span> *<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = <span class="keyword">nullptr</span>) {</div>
|
|
<div class="line"><a id="l00760" name="l00760"></a><span class="lineno"> 760</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1c62d9615acde55f57fcca92e44c747c">try_emplace</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>, <span class="keyword">false</span>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>);</div>
|
|
<div class="line"><a id="l00761" name="l00761"></a><span class="lineno"> 761</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00762" name="l00762"></a><span class="lineno"> 762</span> </div>
|
|
<div class="line"><a id="l00776" name="l00776"></a><span class="lineno"> 776</span> <span class="keyword">template</span><<span class="keyword">typename</span> It></div>
|
|
<div class="foldopen" id="foldopen00777" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00777" name="l00777"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a43205b128298f90d1255cf4ce768297c"> 777</a></span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a43205b128298f90d1255cf4ce768297c">push</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) {</div>
|
|
<div class="line"><a id="l00778" name="l00778"></a><span class="lineno"> 778</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>();</div>
|
|
<div class="line"><a id="l00779" name="l00779"></a><span class="lineno"> 779</span> </div>
|
|
<div class="line"><a id="l00780" name="l00780"></a><span class="lineno"> 780</span> <span class="keywordflow">for</span>(; first != last; ++first) {</div>
|
|
<div class="line"><a id="l00781" name="l00781"></a><span class="lineno"> 781</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1c62d9615acde55f57fcca92e44c747c">try_emplace</a>(*first, <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00782" name="l00782"></a><span class="lineno"> 782</span> }</div>
|
|
<div class="line"><a id="l00783" name="l00783"></a><span class="lineno"> 783</span> </div>
|
|
<div class="line"><a id="l00784" name="l00784"></a><span class="lineno"> 784</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>;</div>
|
|
<div class="line"><a id="l00785" name="l00785"></a><span class="lineno"> 785</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00786" name="l00786"></a><span class="lineno"> 786</span> </div>
|
|
<div class="foldopen" id="foldopen00797" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00797" name="l00797"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a777ecee811e5fa5567bc462dba476771"> 797</a></span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a14e627591924feaaad4f04d13c4f4b2d">version_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a777ecee811e5fa5567bc462dba476771">bump</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>) {</div>
|
|
<div class="line"><a id="l00798" name="l00798"></a><span class="lineno"> 798</span> <span class="keyword">auto</span> &<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = sparse_ref(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00799" name="l00799"></a><span class="lineno"> 799</span> ENTT_ASSERT(<a class="code hl_namespace" href="namespaceentt.html">entt</a> != <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a> && <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> != <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>, <span class="stringliteral">"Cannot set the required version"</span>);</div>
|
|
<div class="line"><a id="l00800" name="l00800"></a><span class="lineno"> 800</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a> = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</a>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>), <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>));</div>
|
|
<div class="line"><a id="l00801" name="l00801"></a><span class="lineno"> 801</span> packed[<span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>))] = <a class="code hl_namespace" href="namespaceentt.html">entt</a>;</div>
|
|
<div class="line"><a id="l00802" name="l00802"></a><span class="lineno"> 802</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">traits_type::to_version</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00803" name="l00803"></a><span class="lineno"> 803</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00804" name="l00804"></a><span class="lineno"> 804</span> </div>
|
|
<div class="foldopen" id="foldopen00814" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00814" name="l00814"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a0a41589e81003ca86b8a6104842680cb"> 814</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a0a41589e81003ca86b8a6104842680cb">erase</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>) {</div>
|
|
<div class="line"><a id="l00815" name="l00815"></a><span class="lineno"> 815</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = to_iterator(<a class="code hl_namespace" href="namespaceentt.html">entt</a>);</div>
|
|
<div class="line"><a id="l00816" name="l00816"></a><span class="lineno"> 816</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a8f66cbcaa360286d296dcb7a33c7e1ce">pop</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> + 1u);</div>
|
|
<div class="line"><a id="l00817" name="l00817"></a><span class="lineno"> 817</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00818" name="l00818"></a><span class="lineno"> 818</span> </div>
|
|
<div class="line"><a id="l00828" name="l00828"></a><span class="lineno"> 828</span> <span class="keyword">template</span><<span class="keyword">typename</span> It></div>
|
|
<div class="foldopen" id="foldopen00829" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00829" name="l00829"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a1f3bad1bb267d515e61fd717f4dbb011"> 829</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1f3bad1bb267d515e61fd717f4dbb011">erase</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) {</div>
|
|
<div class="line"><a id="l00830" name="l00830"></a><span class="lineno"> 830</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<It, basic_iterator>) {</div>
|
|
<div class="line"><a id="l00831" name="l00831"></a><span class="lineno"> 831</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a8f66cbcaa360286d296dcb7a33c7e1ce">pop</a>(first, last);</div>
|
|
<div class="line"><a id="l00832" name="l00832"></a><span class="lineno"> 832</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00833" name="l00833"></a><span class="lineno"> 833</span> <span class="keywordflow">for</span>(; first != last; ++first) {</div>
|
|
<div class="line"><a id="l00834" name="l00834"></a><span class="lineno"> 834</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a0a41589e81003ca86b8a6104842680cb">erase</a>(*first);</div>
|
|
<div class="line"><a id="l00835" name="l00835"></a><span class="lineno"> 835</span> }</div>
|
|
<div class="line"><a id="l00836" name="l00836"></a><span class="lineno"> 836</span> }</div>
|
|
<div class="line"><a id="l00837" name="l00837"></a><span class="lineno"> 837</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00838" name="l00838"></a><span class="lineno"> 838</span> </div>
|
|
<div class="foldopen" id="foldopen00844" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00844" name="l00844"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#af02e5833d5edb2450303bd1c029213b8"> 844</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#af02e5833d5edb2450303bd1c029213b8">remove</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_namespace" href="namespaceentt.html">entt</a>) {</div>
|
|
<div class="line"><a id="l00845" name="l00845"></a><span class="lineno"> 845</span> <span class="keywordflow">return</span> <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>) && (<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a0a41589e81003ca86b8a6104842680cb">erase</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>), <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00846" name="l00846"></a><span class="lineno"> 846</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00847" name="l00847"></a><span class="lineno"> 847</span> </div>
|
|
<div class="line"><a id="l00855" name="l00855"></a><span class="lineno"> 855</span> <span class="keyword">template</span><<span class="keyword">typename</span> It></div>
|
|
<div class="foldopen" id="foldopen00856" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00856" name="l00856"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ab2b4ee6c81e845f332c35c89acb8f436"> 856</a></span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab2b4ee6c81e845f332c35c89acb8f436">remove</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) {</div>
|
|
<div class="line"><a id="l00857" name="l00857"></a><span class="lineno"> 857</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> count{};</div>
|
|
<div class="line"><a id="l00858" name="l00858"></a><span class="lineno"> 858</span> </div>
|
|
<div class="line"><a id="l00859" name="l00859"></a><span class="lineno"> 859</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>(std::is_same_v<It, basic_iterator>) {</div>
|
|
<div class="line"><a id="l00860" name="l00860"></a><span class="lineno"> 860</span> <span class="keywordflow">while</span>(first != last) {</div>
|
|
<div class="line"><a id="l00861" name="l00861"></a><span class="lineno"> 861</span> <span class="keywordflow">while</span>(first != last && !<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a97b47cbaea3fc30442fa3e6366766c86">contains</a>(*first)) {</div>
|
|
<div class="line"><a id="l00862" name="l00862"></a><span class="lineno"> 862</span> ++first;</div>
|
|
<div class="line"><a id="l00863" name="l00863"></a><span class="lineno"> 863</span> }</div>
|
|
<div class="line"><a id="l00864" name="l00864"></a><span class="lineno"> 864</span> </div>
|
|
<div class="line"><a id="l00865" name="l00865"></a><span class="lineno"> 865</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = first;</div>
|
|
<div class="line"><a id="l00866" name="l00866"></a><span class="lineno"> 866</span> </div>
|
|
<div class="line"><a id="l00867" name="l00867"></a><span class="lineno"> 867</span> <span class="keywordflow">while</span>(first != last && <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a97b47cbaea3fc30442fa3e6366766c86">contains</a>(*first)) {</div>
|
|
<div class="line"><a id="l00868" name="l00868"></a><span class="lineno"> 868</span> ++first;</div>
|
|
<div class="line"><a id="l00869" name="l00869"></a><span class="lineno"> 869</span> }</div>
|
|
<div class="line"><a id="l00870" name="l00870"></a><span class="lineno"> 870</span> </div>
|
|
<div class="line"><a id="l00871" name="l00871"></a><span class="lineno"> 871</span> count += std::distance(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>, first);</div>
|
|
<div class="line"><a id="l00872" name="l00872"></a><span class="lineno"> 872</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a0a41589e81003ca86b8a6104842680cb">erase</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>, first);</div>
|
|
<div class="line"><a id="l00873" name="l00873"></a><span class="lineno"> 873</span> }</div>
|
|
<div class="line"><a id="l00874" name="l00874"></a><span class="lineno"> 874</span> } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a id="l00875" name="l00875"></a><span class="lineno"> 875</span> <span class="keywordflow">for</span>(; first != last; ++first) {</div>
|
|
<div class="line"><a id="l00876" name="l00876"></a><span class="lineno"> 876</span> count += <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#af02e5833d5edb2450303bd1c029213b8">remove</a>(*first);</div>
|
|
<div class="line"><a id="l00877" name="l00877"></a><span class="lineno"> 877</span> }</div>
|
|
<div class="line"><a id="l00878" name="l00878"></a><span class="lineno"> 878</span> }</div>
|
|
<div class="line"><a id="l00879" name="l00879"></a><span class="lineno"> 879</span> </div>
|
|
<div class="line"><a id="l00880" name="l00880"></a><span class="lineno"> 880</span> <span class="keywordflow">return</span> count;</div>
|
|
<div class="line"><a id="l00881" name="l00881"></a><span class="lineno"> 881</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00882" name="l00882"></a><span class="lineno"> 882</span> </div>
|
|
<div class="foldopen" id="foldopen00884" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00884" name="l00884"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#af4979ce48546cfcc705c4d23654faef2"> 884</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#af4979ce48546cfcc705c4d23654faef2">compact</a>() {</div>
|
|
<div class="line"><a id="l00885" name="l00885"></a><span class="lineno"> 885</span> <span class="keywordflow">if</span>(mode == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>) {</div>
|
|
<div class="line"><a id="l00886" name="l00886"></a><span class="lineno"> 886</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a> = packed.size();</div>
|
|
<div class="line"><a id="l00887" name="l00887"></a><span class="lineno"> 887</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> = std::exchange(head, max_size);</div>
|
|
<div class="line"><a id="l00888" name="l00888"></a><span class="lineno"> 888</span> </div>
|
|
<div class="line"><a id="l00889" name="l00889"></a><span class="lineno"> 889</span> <span class="keywordflow">for</span>(; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a> && packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a> - 1u] == <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>; --<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>) {}</div>
|
|
<div class="line"><a id="l00890" name="l00890"></a><span class="lineno"> 890</span> </div>
|
|
<div class="line"><a id="l00891" name="l00891"></a><span class="lineno"> 891</span> <span class="keywordflow">while</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a> != max_size) {</div>
|
|
<div class="line"><a id="l00892" name="l00892"></a><span class="lineno"> 892</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">to</a> = std::exchange(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>, <span class="keyword">static_cast<</span><a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a><span class="keyword">></span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">traits_type::to_entity</a>(packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>]))); <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a> < <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>) {</div>
|
|
<div class="line"><a id="l00893" name="l00893"></a><span class="lineno"> 893</span> --<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>;</div>
|
|
<div class="line"><a id="l00894" name="l00894"></a><span class="lineno"> 894</span> swap_or_move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>);</div>
|
|
<div class="line"><a id="l00895" name="l00895"></a><span class="lineno"> 895</span> </div>
|
|
<div class="line"><a id="l00896" name="l00896"></a><span class="lineno"> 896</span> packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>] = packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>];</div>
|
|
<div class="line"><a id="l00897" name="l00897"></a><span class="lineno"> 897</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</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_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>);</div>
|
|
<div class="line"><a id="l00898" name="l00898"></a><span class="lineno"> 898</span> sparse_ref(packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>]) = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>, <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>]));</div>
|
|
<div class="line"><a id="l00899" name="l00899"></a><span class="lineno"> 899</span> </div>
|
|
<div class="line"><a id="l00900" name="l00900"></a><span class="lineno"> 900</span> <span class="keywordflow">for</span>(; <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a> && packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a> - 1u] == <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>; --<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>) {}</div>
|
|
<div class="line"><a id="l00901" name="l00901"></a><span class="lineno"> 901</span> }</div>
|
|
<div class="line"><a id="l00902" name="l00902"></a><span class="lineno"> 902</span> }</div>
|
|
<div class="line"><a id="l00903" name="l00903"></a><span class="lineno"> 903</span> </div>
|
|
<div class="line"><a id="l00904" name="l00904"></a><span class="lineno"> 904</span> packed.erase(packed.begin() + <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>, packed.end());</div>
|
|
<div class="line"><a id="l00905" name="l00905"></a><span class="lineno"> 905</span> }</div>
|
|
<div class="line"><a id="l00906" name="l00906"></a><span class="lineno"> 906</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00907" name="l00907"></a><span class="lineno"> 907</span> </div>
|
|
<div class="foldopen" id="foldopen00921" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00921" name="l00921"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a2b82af720eca37261f3230c654d7fe1f"> 921</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a2b82af720eca37261f3230c654d7fe1f">swap_elements</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">lhs</a>, <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entity_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">rhs</a>) {</div>
|
|
<div class="line"><a id="l00922" name="l00922"></a><span class="lineno"> 922</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">lhs</a>);</div>
|
|
<div class="line"><a id="l00923" name="l00923"></a><span class="lineno"> 923</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">rhs</a>);</div>
|
|
<div class="line"><a id="l00924" name="l00924"></a><span class="lineno"> 924</span> </div>
|
|
<div class="line"><a id="l00925" name="l00925"></a><span class="lineno"> 925</span> <span class="comment">// basic no-leak guarantee if swapping throws</span></div>
|
|
<div class="line"><a id="l00926" name="l00926"></a><span class="lineno"> 926</span> swap_or_move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>);</div>
|
|
<div class="line"><a id="l00927" name="l00927"></a><span class="lineno"> 927</span> swap_at(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">from</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">to</a>);</div>
|
|
<div class="line"><a id="l00928" name="l00928"></a><span class="lineno"> 928</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00929" name="l00929"></a><span class="lineno"> 929</span> </div>
|
|
<div class="line"><a id="l00960" name="l00960"></a><span class="lineno"> 960</span> <span class="keyword">template</span><<span class="keyword">typename</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a>, <span class="keyword">typename</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Sort</a> = <a class="code hl_struct" href="structentt_1_1std__sort.html">std_sort</a>, <span class="keyword">typename</span>... <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Args</a>></div>
|
|
<div class="foldopen" id="foldopen00961" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00961" name="l00961"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a43c1c0aa0fa525e12cee0791cd945915"> 961</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a43c1c0aa0fa525e12cee0791cd945915">sort_n</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> length, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Sort</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">algo</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Sort</a>{}, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Args</a> &&...args) {</div>
|
|
<div class="line"><a id="l00962" name="l00962"></a><span class="lineno"> 962</span> ENTT_ASSERT((mode != <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>) || (head == max_size), <span class="stringliteral">"Sorting with tombstones not allowed"</span>);</div>
|
|
<div class="line"><a id="l00963" name="l00963"></a><span class="lineno"> 963</span> ENTT_ASSERT(!(length > packed.size()), <span class="stringliteral">"Length exceeds the number of elements"</span>);</div>
|
|
<div class="line"><a id="l00964" name="l00964"></a><span class="lineno"> 964</span> </div>
|
|
<div class="line"><a id="l00965" name="l00965"></a><span class="lineno"> 965</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">algo</a>(packed.rend() - length, packed.rend(), std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a>), std::forward<Args>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)...);</div>
|
|
<div class="line"><a id="l00966" name="l00966"></a><span class="lineno"> 966</span> </div>
|
|
<div class="line"><a id="l00967" name="l00967"></a><span class="lineno"> 967</span> <span class="keywordflow">for</span>(<a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</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="l00968" name="l00968"></a><span class="lineno"> 968</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">pos</a>;</div>
|
|
<div class="line"><a id="l00969" name="l00969"></a><span class="lineno"> 969</span> <span class="keyword">auto</span> next = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>]);</div>
|
|
<div class="line"><a id="l00970" name="l00970"></a><span class="lineno"> 970</span> </div>
|
|
<div class="line"><a id="l00971" name="l00971"></a><span class="lineno"> 971</span> <span class="keywordflow">while</span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a> != next) {</div>
|
|
<div class="line"><a id="l00972" name="l00972"></a><span class="lineno"> 972</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">idx</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">index</a>(packed[next]);</div>
|
|
<div class="line"><a id="l00973" name="l00973"></a><span class="lineno"> 973</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_namespace" href="namespaceentt.html">entt</a> = packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>];</div>
|
|
<div class="line"><a id="l00974" name="l00974"></a><span class="lineno"> 974</span> </div>
|
|
<div class="line"><a id="l00975" name="l00975"></a><span class="lineno"> 975</span> swap_or_move(next, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">idx</a>);</div>
|
|
<div class="line"><a id="l00976" name="l00976"></a><span class="lineno"> 976</span> <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</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_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>);</div>
|
|
<div class="line"><a id="l00977" name="l00977"></a><span class="lineno"> 977</span> sparse_ref(<a class="code hl_namespace" href="namespaceentt.html">entt</a>) = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">traits_type::combine</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">elem</a>, <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">traits_type::to_integral</a>(packed[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>]));</div>
|
|
<div class="line"><a id="l00978" name="l00978"></a><span class="lineno"> 978</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a> = std::exchange(next, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">idx</a>);</div>
|
|
<div class="line"><a id="l00979" name="l00979"></a><span class="lineno"> 979</span> }</div>
|
|
<div class="line"><a id="l00980" name="l00980"></a><span class="lineno"> 980</span> }</div>
|
|
<div class="line"><a id="l00981" name="l00981"></a><span class="lineno"> 981</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00982" name="l00982"></a><span class="lineno"> 982</span> </div>
|
|
<div class="line"><a id="l00995" name="l00995"></a><span class="lineno"> 995</span> <span class="keyword">template</span><<span class="keyword">typename</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a>, <span class="keyword">typename</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Sort</a> = std_sort, <span class="keyword">typename</span>... <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Args</a>></div>
|
|
<div class="foldopen" id="foldopen00996" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00996" name="l00996"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ae7ceed81905adc0d65291eb9f4072f08"> 996</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ae7ceed81905adc0d65291eb9f4072f08">sort</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Compare</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Sort</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">algo</a> = <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Sort</a>{}, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Args</a> &&...args) {</div>
|
|
<div class="line"><a id="l00997" name="l00997"></a><span class="lineno"> 997</span> <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">len</a> = (mode == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>) ? head : packed.<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a69ad0662838fd351985a51ee3017fb6c">size</a>();</div>
|
|
<div class="line"><a id="l00998" name="l00998"></a><span class="lineno"> 998</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a43c1c0aa0fa525e12cee0791cd945915">sort_n</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">len</a>, std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">compare</a>), std::move(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">algo</a>), std::forward<Args>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">args</a>)...);</div>
|
|
<div class="line"><a id="l00999" name="l00999"></a><span class="lineno"> 999</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l01000" name="l01000"></a><span class="lineno"> 1000</span> </div>
|
|
<div class="line"><a id="l01014" name="l01014"></a><span class="lineno"> 1014</span> <span class="keyword">template</span><<span class="keyword">typename</span> It></div>
|
|
<div class="foldopen" id="foldopen01015" data-start="{" data-end="}">
|
|
<div class="line"><a id="l01015" name="l01015"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a9e5bf6f1953740446496b834099c3de1"> 1015</a></span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">iterator</a> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a9e5bf6f1953740446496b834099c3de1">sort_as</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) {</div>
|
|
<div class="line"><a id="l01016" name="l01016"></a><span class="lineno"> 1016</span> ENTT_ASSERT((mode != <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581aa49f99ae99ae9daddd1fb79b73d2db28">deletion_policy::in_place</a>) || (head == max_size), <span class="stringliteral">"Sorting with tombstones not allowed"</span>);</div>
|
|
<div class="line"><a id="l01017" name="l01017"></a><span class="lineno"> 1017</span> <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">len</a> = (mode == <a class="code hl_enumvalue" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">deletion_policy::swap_only</a>) ? head : packed.size();</div>
|
|
<div class="line"><a id="l01018" name="l01018"></a><span class="lineno"> 1018</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>() - <span class="keyword">static_cast<</span><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> iterator::difference_type<span class="keyword">></span>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">len</a>);</div>
|
|
<div class="line"><a id="l01019" name="l01019"></a><span class="lineno"> 1019</span> </div>
|
|
<div class="line"><a id="l01020" name="l01020"></a><span class="lineno"> 1020</span> <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a> = <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">end</a>(); (<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a> != <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">other</a>) && (first != last); ++first) {</div>
|
|
<div class="line"><a id="l01021" name="l01021"></a><span class="lineno"> 1021</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">curr</a> = *first; <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a97b47cbaea3fc30442fa3e6366766c86">contains</a>(<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>)) {</div>
|
|
<div class="line"><a id="l01022" name="l01022"></a><span class="lineno"> 1022</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_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>) {</div>
|
|
<div class="line"><a id="l01023" name="l01023"></a><span class="lineno"> 1023</span> <span class="comment">// basic no-leak guarantee (with invalid state) if swapping throws</span></div>
|
|
<div class="line"><a id="l01024" name="l01024"></a><span class="lineno"> 1024</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a2b82af720eca37261f3230c654d7fe1f">swap_elements</a>(<a class="code hl_namespace" href="namespaceentt.html">entt</a>, <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">curr</a>);</div>
|
|
<div class="line"><a id="l01025" name="l01025"></a><span class="lineno"> 1025</span> }</div>
|
|
<div class="line"><a id="l01026" name="l01026"></a><span class="lineno"> 1026</span> </div>
|
|
<div class="line"><a id="l01027" name="l01027"></a><span class="lineno"> 1027</span> ++<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>;</div>
|
|
<div class="line"><a id="l01028" name="l01028"></a><span class="lineno"> 1028</span> }</div>
|
|
<div class="line"><a id="l01029" name="l01029"></a><span class="lineno"> 1029</span> }</div>
|
|
<div class="line"><a id="l01030" name="l01030"></a><span class="lineno"> 1030</span> </div>
|
|
<div class="line"><a id="l01031" name="l01031"></a><span class="lineno"> 1031</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">it</a>;</div>
|
|
<div class="line"><a id="l01032" name="l01032"></a><span class="lineno"> 1032</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l01033" name="l01033"></a><span class="lineno"> 1033</span> </div>
|
|
<div class="foldopen" id="foldopen01035" data-start="{" data-end="}">
|
|
<div class="line"><a id="l01035" name="l01035"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a6560773b887906122d50a413aea1faad"> 1035</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a6560773b887906122d50a413aea1faad">clear</a>() {</div>
|
|
<div class="line"><a id="l01036" name="l01036"></a><span class="lineno"> 1036</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a1e8e00e8bfa75311482f2fa071e244e6">pop_all</a>();</div>
|
|
<div class="line"><a id="l01037" name="l01037"></a><span class="lineno"> 1037</span> <span class="comment">// sanity check to avoid subtle issues due to storage classes</span></div>
|
|
<div class="line"><a id="l01038" name="l01038"></a><span class="lineno"> 1038</span> ENTT_ASSERT((<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#af4979ce48546cfcc705c4d23654faef2">compact</a>(), <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a69ad0662838fd351985a51ee3017fb6c">size</a>()) == 0<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">u</a>, <span class="stringliteral">"Non-empty set"</span>);</div>
|
|
<div class="line"><a id="l01039" name="l01039"></a><span class="lineno"> 1039</span> head = policy_to_head();</div>
|
|
<div class="line"><a id="l01040" name="l01040"></a><span class="lineno"> 1040</span> packed.clear();</div>
|
|
<div class="line"><a id="l01041" name="l01041"></a><span class="lineno"> 1041</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l01042" name="l01042"></a><span class="lineno"> 1042</span> </div>
|
|
<div class="foldopen" id="foldopen01047" data-start="{" data-end="}">
|
|
<div class="line"><a id="l01047" name="l01047"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#ae37830b84f2801670927b8ae881d72b7"> 1047</a></span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">nodiscard</a>]] <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1type__info.html">type_info</a> &<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ae37830b84f2801670927b8ae881d72b7">type</a>() <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a> {</div>
|
|
<div class="line"><a id="l01048" name="l01048"></a><span class="lineno"> 1048</span> <span class="keywordflow">return</span> *info;</div>
|
|
<div class="line"><a id="l01049" name="l01049"></a><span class="lineno"> 1049</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l01050" name="l01050"></a><span class="lineno"> 1050</span> </div>
|
|
<div class="line"><a id="l01057" name="l01057"></a><span class="lineno"> 1057</span> <span class="keyword">template</span><<span class="keyword">typename</span> Type></div>
|
|
<div class="line"><a id="l01058" name="l01058"></a><span class="lineno"> 1058</span> [[<a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">deprecated</a>(<span class="stringliteral">"avoid wrapping elements with basic_any"</span>)]] std::enable_if_t<std::is_same_v<std::remove_const_t<std::remove_reference_t<Type>>, <a class="code hl_class" href="classentt_1_1basic__any.html">basic_any<></a>>></div>
|
|
<div class="foldopen" id="foldopen01059" data-start="{" data-end="}">
|
|
<div class="line"><a id="l01059" name="l01059"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a0e5a5e8d34afe0471d8c9d1c1fb6df2f"> 1059</a></span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a0e5a5e8d34afe0471d8c9d1c1fb6df2f">bind</a>(Type &&<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l01060" name="l01060"></a><span class="lineno"> 1060</span> <span class="comment">// backward compatibility</span></div>
|
|
<div class="line"><a id="l01061" name="l01061"></a><span class="lineno"> 1061</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a94662470540e38b7933b23b2ab2249f7">bind_any</a>(std::forward<Type>(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a>));</div>
|
|
<div class="line"><a id="l01062" name="l01062"></a><span class="lineno"> 1062</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l01063" name="l01063"></a><span class="lineno"> 1063</span> </div>
|
|
<div class="line"><a id="l01070" name="l01070"></a><span class="lineno"> 1070</span> <span class="keyword">template</span><<span class="keyword">typename</span> Type></div>
|
|
<div class="line"><a id="l01071" name="l01071"></a><span class="lineno"> 1071</span> std::enable_if_t<!std::is_same_v<std::remove_const_t<std::remove_reference_t<Type>>, <a class="code hl_class" href="classentt_1_1basic__any.html">basic_any<></a>>></div>
|
|
<div class="foldopen" id="foldopen01072" data-start="{" data-end="}">
|
|
<div class="line"><a id="l01072" name="l01072"></a><span class="lineno"><a class="line" href="classentt_1_1basic__sparse__set.html#a11348154765ab6661b04dbac72be0272"> 1072</a></span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a11348154765ab6661b04dbac72be0272">bind</a>(Type &&<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a>) <span class="keyword">noexcept</span> {</div>
|
|
<div class="line"><a id="l01073" name="l01073"></a><span class="lineno"> 1073</span> <a class="code hl_function" href="classentt_1_1basic__sparse__set.html#a94662470540e38b7933b23b2ab2249f7">bind_any</a>(<a class="code hl_function" href="namespaceentt.html#af02fa96c663a6706416e47a3a6658328">forward_as_any</a>(std::forward<Type>(<a class="code hl_function" href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">value</a>)));</div>
|
|
<div class="line"><a id="l01074" name="l01074"></a><span class="lineno"> 1074</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l01075" name="l01075"></a><span class="lineno"> 1075</span> </div>
|
|
<div class="line"><a id="l01076" name="l01076"></a><span class="lineno"> 1076</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l01077" name="l01077"></a><span class="lineno"> 1077</span> sparse_container_type sparse;</div>
|
|
<div class="line"><a id="l01078" name="l01078"></a><span class="lineno"> 1078</span> packed_container_type packed;</div>
|
|
<div class="line"><a id="l01079" name="l01079"></a><span class="lineno"> 1079</span> <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1type__info.html">type_info</a> *info;</div>
|
|
<div class="line"><a id="l01080" name="l01080"></a><span class="lineno"> 1080</span> <a class="code hl_enumeration" href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581">deletion_policy</a> mode;</div>
|
|
<div class="line"><a id="l01081" name="l01081"></a><span class="lineno"> 1081</span> <a class="code hl_typedef" href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">size_type</a> head;</div>
|
|
<div class="line"><a id="l01082" name="l01082"></a><span class="lineno"> 1082</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l01083" name="l01083"></a><span class="lineno"> 1083</span> </div>
|
|
<div class="line"><a id="l01084" name="l01084"></a><span class="lineno"> 1084</span>} <span class="comment">// namespace entt</span></div>
|
|
<div class="line"><a id="l01085" name="l01085"></a><span class="lineno"> 1085</span> </div>
|
|
<div class="line"><a id="l01086" name="l01086"></a><span class="lineno"> 1086</span><span class="preprocessor">#endif</span></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__any_html"><div class="ttname"><a href="classentt_1_1basic__any.html">entt::basic_any<></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__entt__traits_html_a0bd49c229b049ac5dc0fb21195b4bcc3"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">entt::basic_entt_traits< internal::entt_traits< Type > >::version_mask</a></div><div class="ttdeci">static constexpr entity_type version_mask</div><div class="ttdoc">Version mask size.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00078">entity.hpp:78</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a42a94cfb5923165804979505731ad7c6"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a42a94cfb5923165804979505731ad7c6">entt::basic_entt_traits< internal::entt_traits< Type > >::next</a></div><div class="ttdeci">static constexpr value_type next(const value_type value) noexcept</div><div class="ttdoc">Returns the successor of a given identifier.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00116">entity.hpp:116</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a4eb435084cf47d4fbc840654f2e8c9e0"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">entt::basic_entt_traits< internal::entt_traits< Type > >::to_integral</a></div><div class="ttdeci">static constexpr entity_type to_integral(const value_type value) noexcept</div><div class="ttdoc">Converts an entity to its underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00085">entity.hpp:85</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a6b93920c3b3347171c485fdbdead14ec"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec">entt::basic_entt_traits< internal::entt_traits< Type > >::entity_mask</a></div><div class="ttdeci">static constexpr entity_type entity_mask</div><div class="ttdoc">Entity mask size.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00076">entity.hpp:76</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a8c02bc8db33817ec509b7d32773fa463"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">entt::basic_entt_traits< internal::entt_traits< Type > >::to_entity</a></div><div class="ttdeci">static constexpr entity_type to_entity(const value_type 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#l00094">entity.hpp:94</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a8d3ccdc302fc7dc567541fa12eca6b4e"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">entt::basic_entt_traits< internal::entt_traits< Type > >::value_type</a></div><div class="ttdeci">typename Traits::value_type value_type</div><div class="ttdoc">Value type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00069">entity.hpp:69</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_aa3fe33d19b228d07c5560b907f910c10"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">entt::basic_entt_traits< internal::entt_traits< Type > >::version_type</a></div><div class="ttdeci">typename Traits::version_type version_type</div><div class="ttdoc">Underlying version type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00073">entity.hpp:73</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_ad00358aea03a19c59efae2f8c005ae9b"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">entt::basic_entt_traits< internal::entt_traits< Type > >::combine</a></div><div class="ttdeci">static constexpr value_type combine(const entity_type lhs, const entity_type rhs) noexcept</div><div class="ttdoc">Combines two identifiers in a single one.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00149">entity.hpp:149</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_af1e3c418f09660a761fab21078df6700"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">entt::basic_entt_traits< internal::entt_traits< Type > >::to_version</a></div><div class="ttdeci">static constexpr version_type to_version(const value_type value) noexcept</div><div class="ttdoc">Returns the version part once converted to the underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00103">entity.hpp:103</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html">entt::basic_sparse_set</a></div><div class="ttdoc">Sparse set implementation.</div><div class="ttdef"><b>Definition</b> <a href="#l00158">sparse_set.hpp:158</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a0a41589e81003ca86b8a6104842680cb"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a0a41589e81003ca86b8a6104842680cb">entt::basic_sparse_set::erase</a></div><div class="ttdeci">void erase(const entity_type entt)</div><div class="ttdoc">Erases an entity from a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00814">sparse_set.hpp:814</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a0e5a5e8d34afe0471d8c9d1c1fb6df2f"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a0e5a5e8d34afe0471d8c9d1c1fb6df2f">entt::basic_sparse_set::bind</a></div><div class="ttdeci">std::enable_if_t< std::is_same_v< std::remove_const_t< std::remove_reference_t< Type > >, basic_any<> > > bind(Type &&value) noexcept</div><div class="ttdoc">Forwards variables to derived classes, if any.</div><div class="ttdef"><b>Definition</b> <a href="#l01059">sparse_set.hpp:1059</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a11348154765ab6661b04dbac72be0272"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a11348154765ab6661b04dbac72be0272">entt::basic_sparse_set::bind</a></div><div class="ttdeci">std::enable_if_t<!std::is_same_v< std::remove_const_t< std::remove_reference_t< Type > >, basic_any<> > > bind(Type &&value) noexcept</div><div class="ttdoc">Forwards variables to derived classes, if any.</div><div class="ttdef"><b>Definition</b> <a href="#l01072">sparse_set.hpp:1072</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a11b72852c0ae4f7f0dc5f27ba6001f42"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a11b72852c0ae4f7f0dc5f27ba6001f42">entt::basic_sparse_set::begin</a></div><div class="ttdeci">iterator begin() const noexcept</div><div class="ttdoc">Returns an iterator to the beginning.</div><div class="ttdef"><b>Definition</b> <a href="#l00612">sparse_set.hpp:612</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a14e627591924feaaad4f04d13c4f4b2d"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a14e627591924feaaad4f04d13c4f4b2d">entt::basic_sparse_set::version_type</a></div><div class="ttdeci">typename traits_type::version_type version_type</div><div class="ttdoc">Underlying version type.</div><div class="ttdef"><b>Definition</b> <a href="#l00381">sparse_set.hpp:381</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a17b25baaceb061cd93da56f1ec24ee98"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a17b25baaceb061cd93da56f1ec24ee98">entt::basic_sparse_set::capacity</a></div><div class="ttdeci">virtual size_type capacity() const noexcept</div><div class="ttdoc">Returns the number of elements that a sparse set has currently allocated space for.</div><div class="ttdef"><b>Definition</b> <a href="#l00543">sparse_set.hpp:543</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a1934fc85ed01c3528c45ab9a76712fa7"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a1934fc85ed01c3528c45ab9a76712fa7">entt::basic_sparse_set::cbegin</a></div><div class="ttdeci">const_iterator cbegin() const noexcept</div><div class="ttdoc">Returns an iterator to the beginning.</div><div class="ttdef"><b>Definition</b> <a href="#l00618">sparse_set.hpp:618</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a1b636566df9e6f3f36ff62d2bdde8d10"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a1b636566df9e6f3f36ff62d2bdde8d10">entt::basic_sparse_set::basic_sparse_set</a></div><div class="ttdeci">basic_sparse_set(const allocator_type &allocator)</div><div class="ttdoc">Constructs an empty container with a given allocator.</div><div class="ttdef"><b>Definition</b> <a href="#l00403">sparse_set.hpp:403</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a1c62d9615acde55f57fcca92e44c747c"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a1c62d9615acde55f57fcca92e44c747c">entt::basic_sparse_set::try_emplace</a></div><div class="ttdeci">virtual basic_iterator try_emplace(const Entity entt, const bool force_back, const void *=nullptr)</div><div class="ttdoc">Assigns an entity to a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00334">sparse_set.hpp:334</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a1e8e00e8bfa75311482f2fa071e244e6"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a1e8e00e8bfa75311482f2fa071e244e6">entt::basic_sparse_set::pop_all</a></div><div class="ttdeci">virtual void pop_all()</div><div class="ttdoc">Erases all entities of a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00304">sparse_set.hpp:304</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a1f3bad1bb267d515e61fd717f4dbb011"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a1f3bad1bb267d515e61fd717f4dbb011">entt::basic_sparse_set::erase</a></div><div class="ttdeci">void erase(It first, It last)</div><div class="ttdoc">Erases entities from a set.</div><div class="ttdef"><b>Definition</b> <a href="#l00829">sparse_set.hpp:829</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a27d66fda0fba1587a5f61e9c16f742f7"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a27d66fda0fba1587a5f61e9c16f742f7">entt::basic_sparse_set::const_reverse_iterator</a></div><div class="ttdeci">std::reverse_iterator< const_iterator > const_reverse_iterator</div><div class="ttdoc">Constant reverse iterator type.</div><div class="ttdef"><b>Definition</b> <a href="#l00393">sparse_set.hpp:393</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a2b82af720eca37261f3230c654d7fe1f"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a2b82af720eca37261f3230c654d7fe1f">entt::basic_sparse_set::swap_elements</a></div><div class="ttdeci">void swap_elements(const entity_type lhs, const entity_type rhs)</div><div class="ttdoc">Swaps two entities in a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00921">sparse_set.hpp:921</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a2b95c0acd8af718e712362d1177dbc1e"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a2b95c0acd8af718e712362d1177dbc1e">entt::basic_sparse_set::swap_and_pop</a></div><div class="ttdeci">void swap_and_pop(const basic_iterator it)</div><div class="ttdoc">Erases an entity from a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00255">sparse_set.hpp:255</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a2ec9530d8aa9ac94d421b27eb6998edb"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a2ec9530d8aa9ac94d421b27eb6998edb">entt::basic_sparse_set::size_type</a></div><div class="ttdeci">std::size_t size_type</div><div class="ttdoc">Unsigned integer type.</div><div class="ttdef"><b>Definition</b> <a href="#l00383">sparse_set.hpp:383</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a3187a76bdb963346a715e0ebd833bfd7"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a3187a76bdb963346a715e0ebd833bfd7">entt::basic_sparse_set::end</a></div><div class="ttdeci">iterator end() const noexcept</div><div class="ttdoc">Returns an iterator to the end.</div><div class="ttdef"><b>Definition</b> <a href="#l00627">sparse_set.hpp:627</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a319f3827fb68d33cddbdb5519723ea6f"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a319f3827fb68d33cddbdb5519723ea6f">entt::basic_sparse_set::value</a></div><div class="ttdeci">void * value(const entity_type entt) noexcept</div><div class="ttdoc">Returns the element assigned to an entity, if any.</div><div class="ttdef"><b>Definition</b> <a href="#l00743">sparse_set.hpp:743</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a3688979d568f2450725d69aa89571f4f"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a3688979d568f2450725d69aa89571f4f">entt::basic_sparse_set::const_iterator</a></div><div class="ttdeci">iterator const_iterator</div><div class="ttdoc">Constant random access iterator type.</div><div class="ttdef"><b>Definition</b> <a href="#l00389">sparse_set.hpp:389</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a408ae201025279196f63ef32cf58da9a"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a408ae201025279196f63ef32cf58da9a">entt::basic_sparse_set::rend</a></div><div class="ttdeci">reverse_iterator rend() const noexcept</div><div class="ttdoc">Returns a reverse iterator to the end.</div><div class="ttdef"><b>Definition</b> <a href="#l00659">sparse_set.hpp:659</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a43205b128298f90d1255cf4ce768297c"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a43205b128298f90d1255cf4ce768297c">entt::basic_sparse_set::push</a></div><div class="ttdeci">iterator push(It first, It last)</div><div class="ttdoc">Assigns one or more entities to a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00777">sparse_set.hpp:777</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a43c1c0aa0fa525e12cee0791cd945915"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a43c1c0aa0fa525e12cee0791cd945915">entt::basic_sparse_set::sort_n</a></div><div class="ttdeci">void sort_n(const size_type length, Compare compare, Sort algo=Sort{}, Args &&...args)</div><div class="ttdoc">Sort the first count elements according to the given comparison function.</div><div class="ttdef"><b>Definition</b> <a href="#l00961">sparse_set.hpp:961</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a4c540ff32bca204b1adbd9e4f4a0240b"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a4c540ff32bca204b1adbd9e4f4a0240b">entt::basic_sparse_set::data</a></div><div class="ttdeci">pointer data() const noexcept</div><div class="ttdoc">Direct access to the internal packed array.</div><div class="ttdef"><b>Definition</b> <a href="#l00600">sparse_set.hpp:600</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a53f8aad7f89c040a3ef0e79ad9e814fb"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a53f8aad7f89c040a3ef0e79ad9e814fb">entt::basic_sparse_set::operator=</a></div><div class="ttdeci">basic_sparse_set & operator=(basic_sparse_set &&other) noexcept</div><div class="ttdoc">Move assignment operator.</div><div class="ttdef"><b>Definition</b> <a href="#l00474">sparse_set.hpp:474</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a58d49df52ee3133a1347dc01131a4f1a"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a58d49df52ee3133a1347dc01131a4f1a">entt::basic_sparse_set::reserve</a></div><div class="ttdeci">virtual void reserve(const size_type cap)</div><div class="ttdoc">Increases the capacity of a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00534">sparse_set.hpp:534</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a6560773b887906122d50a413aea1faad"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a6560773b887906122d50a413aea1faad">entt::basic_sparse_set::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Clears a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l01035">sparse_set.hpp:1035</a></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="#l00576">sparse_set.hpp:576</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a6cea231ae7386a12487164d918f632b0"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a6cea231ae7386a12487164d918f632b0">entt::basic_sparse_set::iterator</a></div><div class="ttdeci">basic_iterator iterator</div><div class="ttdoc">Random access iterator type.</div><div class="ttdef"><b>Definition</b> <a href="#l00387">sparse_set.hpp:387</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a71e7865957db2ed2243c77eac979c8ee"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a71e7865957db2ed2243c77eac979c8ee">entt::basic_sparse_set::operator=</a></div><div class="ttdeci">basic_sparse_set & operator=(const basic_sparse_set &)=delete</div><div class="ttdoc">Default copy assignment operator, deleted on purpose.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a736ba15d734ea65f18e3c1fd5d748e5e"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a736ba15d734ea65f18e3c1fd5d748e5e">entt::basic_sparse_set::contiguous</a></div><div class="ttdeci">bool contiguous() const noexcept</div><div class="ttdoc">Checks whether a sparse set is fully packed.</div><div class="ttdef"><b>Definition</b> <a href="#l00592">sparse_set.hpp:592</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a777ecee811e5fa5567bc462dba476771"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a777ecee811e5fa5567bc462dba476771">entt::basic_sparse_set::bump</a></div><div class="ttdeci">version_type bump(const entity_type entt)</div><div class="ttdoc">Bump the version number of an entity.</div><div class="ttdef"><b>Definition</b> <a href="#l00797">sparse_set.hpp:797</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a7e10cc6ddc7ef9c733aabdec849c5b79"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a7e10cc6ddc7ef9c733aabdec849c5b79">entt::basic_sparse_set::shrink_to_fit</a></div><div class="ttdeci">virtual void shrink_to_fit()</div><div class="ttdoc">Requests the removal of unused capacity.</div><div class="ttdef"><b>Definition</b> <a href="#l00548">sparse_set.hpp:548</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a7e51c3904b0581866f8791a04435fc5f"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a7e51c3904b0581866f8791a04435fc5f">entt::basic_sparse_set::extent</a></div><div class="ttdeci">size_type extent() const noexcept</div><div class="ttdoc">Returns the extent of a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00562">sparse_set.hpp:562</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a85505b5556cc61ab5557cd311442ad42"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a85505b5556cc61ab5557cd311442ad42">entt::basic_sparse_set::swap</a></div><div class="ttdeci">void swap(basic_sparse_set &other) noexcept</div><div class="ttdoc">Exchanges the contents with those of a given sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00484">sparse_set.hpp:484</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a8b18963e68d4f003e19389fd342f90cc"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a8b18963e68d4f003e19389fd342f90cc">entt::basic_sparse_set::pointer</a></div><div class="ttdeci">typename packed_container_type::const_pointer pointer</div><div class="ttdoc">Pointer type to contained entities.</div><div class="ttdef"><b>Definition</b> <a href="#l00385">sparse_set.hpp:385</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a8b9656b9f037aede492f66e87e57a6ca"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a8b9656b9f037aede492f66e87e57a6ca">entt::basic_sparse_set::find</a></div><div class="ttdeci">const_iterator find(const entity_type entt) const noexcept</div><div class="ttdoc">Finds an entity.</div><div class="ttdef"><b>Definition</b> <a href="#l00674">sparse_set.hpp:674</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a8cf01b2a8d20329ec1c1d5d3b5708969"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a8cf01b2a8d20329ec1c1d5d3b5708969">entt::basic_sparse_set::push</a></div><div class="ttdeci">iterator push(const entity_type entt, const void *elem=nullptr)</div><div class="ttdoc">Assigns an entity to a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00759">sparse_set.hpp:759</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a8e264ab5a7e2d97a204004d25b14238b"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a8e264ab5a7e2d97a204004d25b14238b">entt::basic_sparse_set::basic_sparse_set</a></div><div class="ttdeci">basic_sparse_set(deletion_policy pol, const allocator_type &allocator={})</div><div class="ttdoc">Constructs an empty container with the given policy and allocator.</div><div class="ttdef"><b>Definition</b> <a href="#l00411">sparse_set.hpp:411</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a8f66cbcaa360286d296dcb7a33c7e1ce"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a8f66cbcaa360286d296dcb7a33c7e1ce">entt::basic_sparse_set::pop</a></div><div class="ttdeci">virtual void pop(basic_iterator first, basic_iterator last)</div><div class="ttdoc">Erases entities from a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00283">sparse_set.hpp:283</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a91f80e4333c16c6c3786b041c8a7e8a2"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a91f80e4333c16c6c3786b041c8a7e8a2">entt::basic_sparse_set::policy</a></div><div class="ttdeci">deletion_policy policy() const noexcept</div><div class="ttdoc">Returns the deletion policy of a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00505">sparse_set.hpp:505</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a94662470540e38b7933b23b2ab2249f7"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a94662470540e38b7933b23b2ab2249f7">entt::basic_sparse_set::bind_any</a></div><div class="ttdeci">virtual void bind_any(any) noexcept</div><div class="ttdoc">Forwards variables to derived classes, if any.</div><div class="ttdef"><b>Definition</b> <a href="#l00373">sparse_set.hpp:373</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a96cf0ed9f37ededbd40f6a8c38c1940b"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a96cf0ed9f37ededbd40f6a8c38c1940b">entt::basic_sparse_set::current</a></div><div class="ttdeci">version_type current(const entity_type entt) const noexcept</div><div class="ttdoc">Returns the contained version for an identifier.</div><div class="ttdef"><b>Definition</b> <a href="#l00697">sparse_set.hpp:697</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="#l00683">sparse_set.hpp:683</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a9d6e25d1435a6216c60b42babd64085d"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a9d6e25d1435a6216c60b42babd64085d">entt::basic_sparse_set::basic_sparse_set</a></div><div class="ttdeci">basic_sparse_set(basic_sparse_set &&other, const allocator_type &allocator)</div><div class="ttdoc">Allocator-extended move constructor.</div><div class="ttdef"><b>Definition</b> <a href="#l00449">sparse_set.hpp:449</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a9e5bf6f1953740446496b834099c3de1"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a9e5bf6f1953740446496b834099c3de1">entt::basic_sparse_set::sort_as</a></div><div class="ttdeci">iterator sort_as(It first, It last)</div><div class="ttdoc">Sort entities according to their order in a range.</div><div class="ttdef"><b>Definition</b> <a href="#l01015">sparse_set.hpp:1015</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_a9f0cc6e746fd49b0c7a0b8e5d8504fef"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#a9f0cc6e746fd49b0c7a0b8e5d8504fef">entt::basic_sparse_set::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="#l00632">sparse_set.hpp:632</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_aa45b7ab945ade01c286a35cba5376d7f"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#aa45b7ab945ade01c286a35cba5376d7f">entt::basic_sparse_set::in_place_pop</a></div><div class="ttdeci">void in_place_pop(const basic_iterator it)</div><div class="ttdoc">Erases an entity from a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00272">sparse_set.hpp:272</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_aaf4d881833f592ed21079e2a0fac8d2a"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#aaf4d881833f592ed21079e2a0fac8d2a">entt::basic_sparse_set::basic_sparse_set</a></div><div class="ttdeci">basic_sparse_set(basic_sparse_set &&other) noexcept</div><div class="ttdoc">Move constructor.</div><div class="ttdef"><b>Definition</b> <a href="#l00437">sparse_set.hpp:437</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ab28f2f1c7bbf2861f4a3e7602a317b96"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ab28f2f1c7bbf2861f4a3e7602a317b96">entt::basic_sparse_set::crend</a></div><div class="ttdeci">const_reverse_iterator crend() const noexcept</div><div class="ttdoc">Returns a reverse iterator to the end.</div><div class="ttdef"><b>Definition</b> <a href="#l00664">sparse_set.hpp:664</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ab292b60dd8782739701906aec8f381ab"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ab292b60dd8782739701906aec8f381ab">entt::basic_sparse_set::get_allocator</a></div><div class="ttdeci">constexpr allocator_type get_allocator() const noexcept</div><div class="ttdoc">Returns the associated allocator.</div><div class="ttdef"><b>Definition</b> <a href="#l00497">sparse_set.hpp:497</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ab2b4ee6c81e845f332c35c89acb8f436"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ab2b4ee6c81e845f332c35c89acb8f436">entt::basic_sparse_set::remove</a></div><div class="ttdeci">size_type remove(It first, It last)</div><div class="ttdoc">Removes entities from a sparse set if they exist.</div><div class="ttdef"><b>Definition</b> <a href="#l00856">sparse_set.hpp:856</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ab3725f4fb86b9bb73f5f397884ff1680"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ab3725f4fb86b9bb73f5f397884ff1680">entt::basic_sparse_set::value</a></div><div class="ttdeci">const void * value(const entity_type entt) const noexcept</div><div class="ttdoc">Returns the element assigned to an entity, if any.</div><div class="ttdef"><b>Definition</b> <a href="#l00738">sparse_set.hpp:738</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_aba067d644dcb69d8d11f6d5dc48b9c9b"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#aba067d644dcb69d8d11f6d5dc48b9c9b">entt::basic_sparse_set::rbegin</a></div><div class="ttdeci">reverse_iterator rbegin() const noexcept</div><div class="ttdoc">Returns a reverse iterator to the beginning.</div><div class="ttdef"><b>Definition</b> <a href="#l00645">sparse_set.hpp:645</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_aba848e5d30f1f8fadce544d7bba7296a"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#aba848e5d30f1f8fadce544d7bba7296a">entt::basic_sparse_set::operator[]</a></div><div class="ttdeci">entity_type operator[](const size_type pos) const noexcept</div><div class="ttdoc">Returns the entity at specified location.</div><div class="ttdef"><b>Definition</b> <a href="#l00723">sparse_set.hpp:723</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="#l00513">sparse_set.hpp:513</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_abde0af92d2d8eade7b5acf5ab02f8038"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#abde0af92d2d8eade7b5acf5ab02f8038">entt::basic_sparse_set::swap_only</a></div><div class="ttdeci">void swap_only(const basic_iterator it)</div><div class="ttdoc">Erases an entity from a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00244">sparse_set.hpp:244</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ac56bb654b47a648d64a754d85c70b40a"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ac56bb654b47a648d64a754d85c70b40a">entt::basic_sparse_set::basic_iterator</a></div><div class="ttdeci">internal::sparse_set_iterator< packed_container_type > basic_iterator</div><div class="ttdoc">Random access iterator type.</div><div class="ttdef"><b>Definition</b> <a href="#l00238">sparse_set.hpp:238</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ac56f048f614c38f14b19ba9cb27faa94"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ac56f048f614c38f14b19ba9cb27faa94">entt::basic_sparse_set::~basic_sparse_set</a></div><div class="ttdeci">virtual ~basic_sparse_set()</div><div class="ttdoc">Default destructor.</div><div class="ttdef"><b>Definition</b> <a href="#l00459">sparse_set.hpp:459</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_acd0d917af2718dcc8f3dc71d3086e013"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#acd0d917af2718dcc8f3dc71d3086e013">entt::basic_sparse_set::free_list</a></div><div class="ttdeci">void free_list(const size_type value) noexcept</div><div class="ttdoc">Sets data on the free list whose meaning depends on the mode.</div><div class="ttdef"><b>Definition</b> <a href="#l00521">sparse_set.hpp:521</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_acfbfbfe9f6967ff54f06c210d787f4ad"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#acfbfbfe9f6967ff54f06c210d787f4ad">entt::basic_sparse_set::basic_sparse_set</a></div><div class="ttdeci">basic_sparse_set(const basic_sparse_set &)=delete</div><div class="ttdoc">Default copy constructor, deleted on purpose.</div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ad57b82c12d92837a14d8904e82eb49a9"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ad57b82c12d92837a14d8904e82eb49a9">entt::basic_sparse_set::crbegin</a></div><div class="ttdeci">const_reverse_iterator crbegin() const noexcept</div><div class="ttdoc">Returns a reverse iterator to the beginning.</div><div class="ttdef"><b>Definition</b> <a href="#l00650">sparse_set.hpp:650</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="#l00584">sparse_set.hpp:584</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ad8a8fc74771c26b36fce8234f5e1d1fa"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ad8a8fc74771c26b36fce8234f5e1d1fa">entt::basic_sparse_set::index</a></div><div class="ttdeci">size_type index(const entity_type entt) const noexcept</div><div class="ttdoc">Returns the position of an entity in a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00713">sparse_set.hpp:713</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ae37830b84f2801670927b8ae881d72b7"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ae37830b84f2801670927b8ae881d72b7">entt::basic_sparse_set::type</a></div><div class="ttdeci">const type_info & type() const noexcept</div><div class="ttdoc">Returned value type, if any.</div><div class="ttdef"><b>Definition</b> <a href="#l01047">sparse_set.hpp:1047</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ae7ceed81905adc0d65291eb9f4072f08"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ae7ceed81905adc0d65291eb9f4072f08">entt::basic_sparse_set::sort</a></div><div class="ttdeci">void sort(Compare compare, Sort algo=Sort{}, Args &&...args)</div><div class="ttdoc">Sort all elements according to the given comparison function.</div><div class="ttdef"><b>Definition</b> <a href="#l00996">sparse_set.hpp:996</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_ae90adeddf9bab1f9c8b4b1fff95980f0"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#ae90adeddf9bab1f9c8b4b1fff95980f0">entt::basic_sparse_set::entity_type</a></div><div class="ttdeci">typename traits_type::value_type entity_type</div><div class="ttdoc">Underlying entity identifier.</div><div class="ttdef"><b>Definition</b> <a href="#l00379">sparse_set.hpp:379</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="#l00844">sparse_set.hpp:844</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_af4979ce48546cfcc705c4d23654faef2"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#af4979ce48546cfcc705c4d23654faef2">entt::basic_sparse_set::compact</a></div><div class="ttdeci">void compact()</div><div class="ttdoc">Removes all tombstones from a sparse set.</div><div class="ttdef"><b>Definition</b> <a href="#l00884">sparse_set.hpp:884</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_af5d35aae661fb35e485ac733969c84d9"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#af5d35aae661fb35e485ac733969c84d9">entt::basic_sparse_set::basic_sparse_set</a></div><div class="ttdeci">basic_sparse_set(const type_info &elem, deletion_policy pol=deletion_policy::swap_and_pop, const allocator_type &allocator={})</div><div class="ttdoc">Constructs an empty container with the given value type, policy and allocator.</div><div class="ttdef"><b>Definition</b> <a href="#l00421">sparse_set.hpp:421</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_af6faaccfb0c465afb6173b0fb8a37069"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#af6faaccfb0c465afb6173b0fb8a37069">entt::basic_sparse_set::allocator_type</a></div><div class="ttdeci">Allocator allocator_type</div><div class="ttdoc">Allocator type.</div><div class="ttdef"><b>Definition</b> <a href="#l00377">sparse_set.hpp:377</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_afc504894fc2c20ea25b7fc2864bd22e3"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#afc504894fc2c20ea25b7fc2864bd22e3">entt::basic_sparse_set::basic_sparse_set</a></div><div class="ttdeci">basic_sparse_set()</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition</b> <a href="#l00396">sparse_set.hpp:396</a></div></div>
|
|
<div class="ttc" id="aclassentt_1_1basic__sparse__set_html_afe62c143e816cf5e12078a607966c003"><div class="ttname"><a href="classentt_1_1basic__sparse__set.html#afe62c143e816cf5e12078a607966c003">entt::basic_sparse_set::reverse_iterator</a></div><div class="ttdeci">std::reverse_iterator< iterator > reverse_iterator</div><div class="ttdoc">Reverse iterator type.</div><div class="ttdef"><b>Definition</b> <a href="#l00391">sparse_set.hpp:391</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_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_a1ae98eeee0b0cb3e94d97d08a74a06f0"><div class="ttname"><a href="namespaceentt.html#a1ae98eeee0b0cb3e94d97d08a74a06f0">entt::fast_mod</a></div><div class="ttdeci">constexpr std::enable_if_t< std::is_unsigned_v< Type >, Type > fast_mod(const Type value, const std::size_t mod) noexcept</div><div class="ttdoc">Fast module utility function (powers of two only).</div><div class="ttdef"><b>Definition</b> <a href="bit_8hpp_source.html#l00062">bit.hpp:62</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_a8c763e890bb00479a6a6aeae3b2a75f0"><div class="ttname"><a href="namespaceentt.html#a8c763e890bb00479a6a6aeae3b2a75f0">entt::operator<=</a></div><div class="ttdeci">constexpr bool operator<=(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00257">hashed_string.hpp:257</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_aa88e297d57dd5547afcde8dd291c4b8f"><div class="ttname"><a href="namespaceentt.html#aa88e297d57dd5547afcde8dd291c4b8f">entt::operator<</a></div><div class="ttdeci">constexpr bool operator<(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00244">hashed_string.hpp:244</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_ab36ceb26049f62c07817a385e35395f6"><div class="ttname"><a href="namespaceentt.html#ab36ceb26049f62c07817a385e35395f6">entt::operator+</a></div><div class="ttdeci">constexpr type_list< Type..., Other... > operator+(type_list< Type... >, type_list< Other... >)</div><div class="ttdoc">Concatenates multiple type lists.</div><div class="ttdef"><b>Definition</b> <a href="core_2type__traits_8hpp_source.html#l00209">type_traits.hpp:209</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_abc4d0fa77fae26e7c01793990996c581"><div class="ttname"><a href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581">entt::deletion_policy</a></div><div class="ttdeci">deletion_policy</div><div class="ttdoc">Storage deletion policy.</div><div class="ttdef"><b>Definition</b> <a href="entity_2fwd_8hpp_source.html#l00017">fwd.hpp:17</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b"><div class="ttname"><a href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a62044f8c7b1568e4536403704282322b">entt::deletion_policy::swap_only</a></div><div class="ttdeci">@ swap_only</div><div class="ttdoc">Swap-only deletion policy.</div></div>
|
|
<div class="ttc" id="anamespaceentt_html_abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708"><div class="ttname"><a href="namespaceentt.html#abc4d0fa77fae26e7c01793990996c581a8223d1ccb16b6dd0b19fe9c6fdb13708">entt::deletion_policy::swap_and_pop</a></div><div class="ttdeci">@ swap_and_pop</div><div class="ttdoc">Swap-and-pop deletion policy.</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_ad9accc71a383509ada028f7fa2b767bf"><div class="ttname"><a href="namespaceentt.html#ad9accc71a383509ada028f7fa2b767bf">entt::operator!=</a></div><div class="ttdeci">constexpr bool operator!=(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00232">hashed_string.hpp:232</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_adadb88dfb4278df554e7ffec5361ece4"><div class="ttname"><a href="namespaceentt.html#adadb88dfb4278df554e7ffec5361ece4">entt::operator>=</a></div><div class="ttdeci">constexpr bool operator>=(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00283">hashed_string.hpp:283</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_adb9682d476edbbe4434680363f9c0eb3"><div class="ttname"><a href="namespaceentt.html#adb9682d476edbbe4434680363f9c0eb3">entt::type_id</a></div><div class="ttdeci">const type_info & type_id() noexcept</div><div class="ttdoc">Returns the type info object associated to a given type.</div><div class="ttdef"><b>Definition</b> <a href="type__info_8hpp_source.html#l00251">type_info.hpp:251</a></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_aec8131af000055ceab85646c14f234ad"><div class="ttname"><a href="namespaceentt.html#aec8131af000055ceab85646c14f234ad">entt::operator></a></div><div class="ttdeci">constexpr bool operator>(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00270">hashed_string.hpp:270</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_af02fa96c663a6706416e47a3a6658328"><div class="ttname"><a href="namespaceentt.html#af02fa96c663a6706416e47a3a6658328">entt::forward_as_any</a></div><div class="ttdeci">basic_any< Len, Align > forward_as_any(Type &&value)</div><div class="ttdoc">Forwards its argument and avoids copies for lvalue references.</div><div class="ttdef"><b>Definition</b> <a href="any_8hpp_source.html#l00508">any.hpp:508</a></div></div>
|
|
<div class="ttc" id="anamespaceentt_html_af7c61951b721a1e3612cf536bd707501"><div class="ttname"><a href="namespaceentt.html#af7c61951b721a1e3612cf536bd707501">entt::operator==</a></div><div class="ttdeci">constexpr bool operator==(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00220">hashed_string.hpp:220</a></div></div>
|
|
<div 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_1entt__traits_html_a187c362626da03111928aff88f43bb83"><div class="ttname"><a href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">entt::entt_traits::page_size</a></div><div class="ttdeci">static constexpr std::size_t page_size</div><div class="ttdoc">Page size, default is ENTT_SPARSE_PAGE.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00167">entity.hpp:167</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1std__sort_html"><div class="ttname"><a href="structentt_1_1std__sort.html">entt::std_sort</a></div><div class="ttdoc">Function object to wrap std::sort in a class type.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8hpp_source.html#l00021">algorithm.hpp:21</a></div></div>
|
|
<div class="ttc" id="astructentt_1_1type__info_html"><div class="ttname"><a href="structentt_1_1type__info.html">entt::type_info</a></div><div class="ttdoc">Implementation specific information about a type.</div><div class="ttdef"><b>Definition</b> <a href="type__info_8hpp_source.html#l00133">type_info.hpp:133</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>
|