Files
entt/classentt_1_1PersistentView.html
2018-07-10 16:36:42 +02:00

934 lines
58 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>entt: entt::PersistentView&lt; Entity, Component &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">entt
&#160;<span id="projectnumber">2.6.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceentt.html">entt</a></li><li class="navelem"><a class="el" href="classentt_1_1PersistentView.html">PersistentView</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classentt_1_1PersistentView-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">entt::PersistentView&lt; Entity, Component &gt; Class Template Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Persistent view.
<a href="classentt_1_1PersistentView.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="view_8hpp_source.html">view.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a5195c9d1dede0fe6c40bea576398022b"><td class="memItemLeft" align="right" valign="top"><a id="a5195c9d1dede0fe6c40bea576398022b"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> = typename <a class="el" href="classentt_1_1SparseSet_3_01Entity_01_4.html#a7d36e852257a965a9a0ed3fb636433e2">view_type::entity_type</a></td></tr>
<tr class="memdesc:a5195c9d1dede0fe6c40bea576398022b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Underlying entity identifier. <br /></td></tr>
<tr class="separator:a5195c9d1dede0fe6c40bea576398022b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2e81caacece38b84f46c4430cd8cf4e"><td class="memItemLeft" align="right" valign="top"><a id="ac2e81caacece38b84f46c4430cd8cf4e"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#ac2e81caacece38b84f46c4430cd8cf4e">size_type</a> = typename <a class="el" href="classentt_1_1SparseSet_3_01Entity_01_4.html#ab81c48dcee7a1104ee82794613ee7ed2">view_type::size_type</a></td></tr>
<tr class="memdesc:ac2e81caacece38b84f46c4430cd8cf4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsigned integer type. <br /></td></tr>
<tr class="separator:ac2e81caacece38b84f46c4430cd8cf4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae563ed31a62fd9f33f93767f0ecdfff5"><td class="memItemLeft" align="right" valign="top"><a id="ae563ed31a62fd9f33f93767f0ecdfff5"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#ae563ed31a62fd9f33f93767f0ecdfff5">iterator_type</a> = typename <a class="el" href="classentt_1_1SparseSet_3_01Entity_01_4.html#a1ad77aed1e49af60b61044c996969b9a">view_type::iterator_type</a></td></tr>
<tr class="memdesc:ae563ed31a62fd9f33f93767f0ecdfff5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Input iterator type. <br /></td></tr>
<tr class="separator:ae563ed31a62fd9f33f93767f0ecdfff5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a260bd2740fb90caf984ce62c26bb887b"><td class="memItemLeft" align="right" valign="top"><a id="a260bd2740fb90caf984ce62c26bb887b"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a> = typename <a class="el" href="classentt_1_1SparseSet_3_01Entity_01_4.html#aba42055f0c8a43cae63d443a17f6a5e2">view_type::const_iterator_type</a></td></tr>
<tr class="memdesc:a260bd2740fb90caf984ce62c26bb887b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constant input iterator type. <br /></td></tr>
<tr class="separator:a260bd2740fb90caf984ce62c26bb887b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad6b816b2acc684733d79ac680005f8da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1PersistentView.html#ac2e81caacece38b84f46c4430cd8cf4e">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#ad6b816b2acc684733d79ac680005f8da">size</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:ad6b816b2acc684733d79ac680005f8da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of entities that have the given components. <a href="#ad6b816b2acc684733d79ac680005f8da">More...</a><br /></td></tr>
<tr class="separator:ad6b816b2acc684733d79ac680005f8da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25cf198e023b229190aa6d62852f4d10"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a25cf198e023b229190aa6d62852f4d10">empty</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a25cf198e023b229190aa6d62852f4d10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the view is empty. <a href="#a25cf198e023b229190aa6d62852f4d10">More...</a><br /></td></tr>
<tr class="separator:a25cf198e023b229190aa6d62852f4d10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3e2d20cb89f810542c0ec4fe4537176"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#ae3e2d20cb89f810542c0ec4fe4537176">data</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:ae3e2d20cb89f810542c0ec4fe4537176"><td class="mdescLeft">&#160;</td><td class="mdescRight">Direct access to the list of entities. <a href="#ae3e2d20cb89f810542c0ec4fe4537176">More...</a><br /></td></tr>
<tr class="separator:ae3e2d20cb89f810542c0ec4fe4537176"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a6d810548ae9959047cc1a6249c5aff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a5a6d810548ae9959047cc1a6249c5aff">cbegin</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a5a6d810548ae9959047cc1a6249c5aff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the first entity that has the given components. <a href="#a5a6d810548ae9959047cc1a6249c5aff">More...</a><br /></td></tr>
<tr class="separator:a5a6d810548ae9959047cc1a6249c5aff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1469f9dd45ebc68729e88e741c465a4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#af1469f9dd45ebc68729e88e741c465a4">begin</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:af1469f9dd45ebc68729e88e741c465a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the first entity that has the given components. <a href="#af1469f9dd45ebc68729e88e741c465a4">More...</a><br /></td></tr>
<tr class="separator:af1469f9dd45ebc68729e88e741c465a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bb6ca7b9dbbbf6da3f2cf7250a61075"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1PersistentView.html#ae563ed31a62fd9f33f93767f0ecdfff5">iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a6bb6ca7b9dbbbf6da3f2cf7250a61075">begin</a> () ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a6bb6ca7b9dbbbf6da3f2cf7250a61075"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the first entity that has the given components. <a href="#a6bb6ca7b9dbbbf6da3f2cf7250a61075">More...</a><br /></td></tr>
<tr class="separator:a6bb6ca7b9dbbbf6da3f2cf7250a61075"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ae9798901deacb27827f23b9ab51fe2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a8ae9798901deacb27827f23b9ab51fe2">cend</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a8ae9798901deacb27827f23b9ab51fe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator that is past the last entity that has the given components. <a href="#a8ae9798901deacb27827f23b9ab51fe2">More...</a><br /></td></tr>
<tr class="separator:a8ae9798901deacb27827f23b9ab51fe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e614f77f05085e951e761d8ca967a84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a0e614f77f05085e951e761d8ca967a84">end</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a0e614f77f05085e951e761d8ca967a84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator that is past the last entity that has the given components. <a href="#a0e614f77f05085e951e761d8ca967a84">More...</a><br /></td></tr>
<tr class="separator:a0e614f77f05085e951e761d8ca967a84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a470ef6edb944f127e26f7e3398cbded1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1PersistentView.html#ae563ed31a62fd9f33f93767f0ecdfff5">iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a470ef6edb944f127e26f7e3398cbded1">end</a> () ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a470ef6edb944f127e26f7e3398cbded1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator that is past the last entity that has the given components. <a href="#a470ef6edb944f127e26f7e3398cbded1">More...</a><br /></td></tr>
<tr class="separator:a470ef6edb944f127e26f7e3398cbded1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7edc6f5cbd49d978469d9384b9aca6b3"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a7edc6f5cbd49d978469d9384b9aca6b3">operator[]</a> (const <a class="el" href="classentt_1_1PersistentView.html#ac2e81caacece38b84f46c4430cd8cf4e">size_type</a> pos) const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a7edc6f5cbd49d978469d9384b9aca6b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the element at the given position. <a href="#a7edc6f5cbd49d978469d9384b9aca6b3">More...</a><br /></td></tr>
<tr class="separator:a7edc6f5cbd49d978469d9384b9aca6b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af98a61a6ac04e08b6b46e4163ad3d415"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#af98a61a6ac04e08b6b46e4163ad3d415">contains</a> (const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> entity) const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:af98a61a6ac04e08b6b46e4163ad3d415"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a view contains an entity. <a href="#af98a61a6ac04e08b6b46e4163ad3d415">More...</a><br /></td></tr>
<tr class="separator:af98a61a6ac04e08b6b46e4163ad3d415"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51452939486c5e98036b60838f69a32d"><td class="memTemplParams" colspan="2">template&lt;typename Comp &gt; </td></tr>
<tr class="memitem:a51452939486c5e98036b60838f69a32d"><td class="memTemplItemLeft" align="right" valign="top">const Comp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a51452939486c5e98036b60838f69a32d">get</a> (const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> entity) const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a51452939486c5e98036b60838f69a32d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the component assigned to the given entity. <a href="#a51452939486c5e98036b60838f69a32d">More...</a><br /></td></tr>
<tr class="separator:a51452939486c5e98036b60838f69a32d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a088e6e40be777f9834c1c3fc6d1b15"><td class="memTemplParams" colspan="2">template&lt;typename Comp &gt; </td></tr>
<tr class="memitem:a0a088e6e40be777f9834c1c3fc6d1b15"><td class="memTemplItemLeft" align="right" valign="top">Comp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a0a088e6e40be777f9834c1c3fc6d1b15">get</a> (const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> entity) ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a0a088e6e40be777f9834c1c3fc6d1b15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the component assigned to the given entity. <a href="#a0a088e6e40be777f9834c1c3fc6d1b15">More...</a><br /></td></tr>
<tr class="separator:a0a088e6e40be777f9834c1c3fc6d1b15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6931b058d6009776cc19082eb9a512f"><td class="memTemplParams" colspan="2">template&lt;typename... Comp&gt; </td></tr>
<tr class="memitem:af6931b058d6009776cc19082eb9a512f"><td class="memTemplItemLeft" align="right" valign="top">std::enable_if_t&lt;(sizeof...(Comp) &gt; 1), std::tuple&lt; const Comp &amp;... &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#af6931b058d6009776cc19082eb9a512f">get</a> (const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> entity) const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:af6931b058d6009776cc19082eb9a512f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the components assigned to the given entity. <a href="#af6931b058d6009776cc19082eb9a512f">More...</a><br /></td></tr>
<tr class="separator:af6931b058d6009776cc19082eb9a512f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2e8b8cf33831f8ea2caf1bd9a0474b6"><td class="memTemplParams" colspan="2">template&lt;typename... Comp&gt; </td></tr>
<tr class="memitem:ad2e8b8cf33831f8ea2caf1bd9a0474b6"><td class="memTemplItemLeft" align="right" valign="top">std::enable_if_t&lt;(sizeof...(Comp) &gt; 1), std::tuple&lt; Comp &amp;... &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#ad2e8b8cf33831f8ea2caf1bd9a0474b6">get</a> (const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a> entity) ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:ad2e8b8cf33831f8ea2caf1bd9a0474b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the components assigned to the given entity. <a href="#ad2e8b8cf33831f8ea2caf1bd9a0474b6">More...</a><br /></td></tr>
<tr class="separator:ad2e8b8cf33831f8ea2caf1bd9a0474b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abaf27560862f9b514695e61fa6a8c6e6"><td class="memTemplParams" colspan="2">template&lt;typename Func &gt; </td></tr>
<tr class="memitem:abaf27560862f9b514695e61fa6a8c6e6"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#abaf27560862f9b514695e61fa6a8c6e6">each</a> (Func func) const</td></tr>
<tr class="memdesc:abaf27560862f9b514695e61fa6a8c6e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#abaf27560862f9b514695e61fa6a8c6e6">More...</a><br /></td></tr>
<tr class="separator:abaf27560862f9b514695e61fa6a8c6e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa71f689a8ac192907617a4316492f03c"><td class="memTemplParams" colspan="2">template&lt;typename Func &gt; </td></tr>
<tr class="memitem:aa71f689a8ac192907617a4316492f03c"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#aa71f689a8ac192907617a4316492f03c">each</a> (Func func)</td></tr>
<tr class="memdesc:aa71f689a8ac192907617a4316492f03c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#aa71f689a8ac192907617a4316492f03c">More...</a><br /></td></tr>
<tr class="separator:aa71f689a8ac192907617a4316492f03c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accde3d4b4a904e79c832f6b05f324b05"><td class="memTemplParams" colspan="2">template&lt;typename Comp &gt; </td></tr>
<tr class="memitem:accde3d4b4a904e79c832f6b05f324b05"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#accde3d4b4a904e79c832f6b05f324b05">sort</a> ()</td></tr>
<tr class="memdesc:accde3d4b4a904e79c832f6b05f324b05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort the shared pool of entities according to the given component. <a href="#accde3d4b4a904e79c832f6b05f324b05">More...</a><br /></td></tr>
<tr class="separator:accde3d4b4a904e79c832f6b05f324b05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a200646cfe88496da691aab5f61c0fa69"><td class="memItemLeft" align="right" valign="top"><a id="a200646cfe88496da691aab5f61c0fa69"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1PersistentView.html#a200646cfe88496da691aab5f61c0fa69">Registry&lt; Entity &gt;</a></td></tr>
<tr class="memdesc:a200646cfe88496da691aab5f61c0fa69"><td class="mdescLeft">&#160;</td><td class="mdescRight">A registry is allowed to create views. <br /></td></tr>
<tr class="separator:a200646cfe88496da691aab5f61c0fa69"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename Entity, typename... Component&gt;<br />
class entt::PersistentView&lt; Entity, Component &gt;</h3>
<p>Persistent view. </p>
<p>A persistent view returns all the entities and only the entities that have at least the given components. Moreover, it's guaranteed that the entity list is tightly packed in memory for fast iterations.<br />
In general, persistent views don't stay true to the order of any set of components unless users explicitly sort them.</p>
<p><b>Important</b> </p>
<p>Iterators aren't invalidated if:</p>
<ul>
<li>New instances of the given components are created and assigned to entities.</li>
<li>The entity currently pointed is modified (as an example, if one of the given components is removed from the entity to which the iterator points).</li>
</ul>
<p>In all the other cases, modifying the pools of the given components in any way invalidates all the iterators and using them results in undefined behavior.</p>
<dl class="section note"><dt>Note</dt><dd>Views share references to the underlying data structures with the <a class="el" href="classentt_1_1Registry.html" title="Fast and reliable entity-component system. ">Registry</a> that generated them. Therefore any change to the entities and to the components made by means of the registry are immediately reflected by views.<br />
Moreover, sorting a persistent view affects all the other views of the same type (it means that users don't have to call <code>sort</code> on each view to sort all of them because they share the set of entities).</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Lifetime of a view must overcome the one of the registry that generated it. In any other case, attempting to use a view results in undefined behavior.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classentt_1_1View.html" title="Multi component view. ">View</a> </dd>
<dd>
<a class="el" href="classentt_1_1View_3_01Entity_00_01Component_01_4.html" title="Single component view specialization. ">View&lt;Entity, Component&gt;</a> </dd>
<dd>
<a class="el" href="classentt_1_1RawView.html" title="Raw view. ">RawView</a> </dd>
<dd>
<a class="el" href="classentt_1_1RuntimeView.html" title="Runtime view. ">RuntimeView</a></dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Entity</td><td>A valid entity type (see <a class="el" href="structentt_1_1entt__traits.html" title="Entity traits. ">entt_traits</a> for more details). </td></tr>
<tr><td class="paramname">Component</td><td>Types of components iterated by the view. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00071">71</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="af1469f9dd45ebc68729e88e741c465a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1469f9dd45ebc68729e88e741c465a4">&#9670;&nbsp;</a></span>begin() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a> <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::begin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the first entity that has the given components. </p>
<p>The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to <code><a class="el" href="classentt_1_1PersistentView.html#a470ef6edb944f127e26f7e3398cbded1" title="Returns an iterator that is past the last entity that has the given components. ">end()</a></code>.</p>
<dl class="section note"><dt>Note</dt><dd>Input iterators stay true to the order imposed to the underlying data structures.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the first entity that has the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00161">161</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a6bb6ca7b9dbbbf6da3f2cf7250a61075"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bb6ca7b9dbbbf6da3f2cf7250a61075">&#9670;&nbsp;</a></span>begin() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1PersistentView.html#ae563ed31a62fd9f33f93767f0ecdfff5">iterator_type</a> <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::begin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the first entity that has the given components. </p>
<p>The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to <code><a class="el" href="classentt_1_1PersistentView.html#a470ef6edb944f127e26f7e3398cbded1" title="Returns an iterator that is past the last entity that has the given components. ">end()</a></code>.</p>
<dl class="section note"><dt>Note</dt><dd>Input iterators stay true to the order imposed to the underlying data structures.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the first entity that has the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00179">179</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a5a6d810548ae9959047cc1a6249c5aff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a6d810548ae9959047cc1a6249c5aff">&#9670;&nbsp;</a></span>cbegin()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a> <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::cbegin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the first entity that has the given components. </p>
<p>The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to <code><a class="el" href="classentt_1_1PersistentView.html#a470ef6edb944f127e26f7e3398cbded1" title="Returns an iterator that is past the last entity that has the given components. ">end()</a></code>.</p>
<dl class="section note"><dt>Note</dt><dd>Input iterators stay true to the order imposed to the underlying data structures.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the first entity that has the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00143">143</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a8ae9798901deacb27827f23b9ab51fe2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ae9798901deacb27827f23b9ab51fe2">&#9670;&nbsp;</a></span>cend()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a> <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::cend </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator that is past the last entity that has the given components. </p>
<p>The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.</p>
<dl class="section note"><dt>Note</dt><dd>Input iterators stay true to the order imposed to the underlying data structures.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the entity following the last entity that has the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00198">198</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="af98a61a6ac04e08b6b46e4163ad3d415"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af98a61a6ac04e08b6b46e4163ad3d415">&#9670;&nbsp;</a></span>contains()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::contains </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>&#160;</td>
<td class="paramname"><em>entity</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a view contains an entity. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entity</td><td>A valid entity identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the view contains the given entity, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00254">254</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="ae3e2d20cb89f810542c0ec4fe4537176"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3e2d20cb89f810542c0ec4fe4537176">&#9670;&nbsp;</a></span>data()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>* <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::data </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Direct access to the list of entities. </p>
<p>The returned pointer is such that range <code>[<a class="el" href="classentt_1_1PersistentView.html#ae3e2d20cb89f810542c0ec4fe4537176" title="Direct access to the list of entities. ">data()</a>, <a class="el" href="classentt_1_1PersistentView.html#ae3e2d20cb89f810542c0ec4fe4537176" title="Direct access to the list of entities. ">data()</a> + <a class="el" href="classentt_1_1PersistentView.html#ad6b816b2acc684733d79ac680005f8da" title="Returns the number of entities that have the given components. ">size()</a>]</code> is always a valid range, even if the container is empty.</p>
<dl class="section note"><dt>Note</dt><dd>There are no guarantees on the order of the entities. Use <code>begin</code> and <code>end</code> if you want to iterate the view in the expected order.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the array of entities. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00125">125</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="abaf27560862f9b514695e61fa6a8c6e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abaf27560862f9b514695e61fa6a8c6e6">&#9670;&nbsp;</a></span>each() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<div class="memtemplate">
template&lt;typename Func &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::each </td>
<td>(</td>
<td class="paramtype">Func&#160;</td>
<td class="paramname"><em>func</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Iterates entities and components and applies the given function object to them. </p>
<p>The function object is invoked for each entity. It is provided with the entity itself and a set of const references to all the components of the view.<br />
The signature of the function should be equivalent to the following:</p>
<div class="fragment"><div class="line">void(<span class="keyword">const</span> <a class="code" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>, <span class="keyword">const</span> Component &amp;...);</div></div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Func</td><td>Type of the function object to invoke. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">func</td><td>A valid function object. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00368">368</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="aa71f689a8ac192907617a4316492f03c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa71f689a8ac192907617a4316492f03c">&#9670;&nbsp;</a></span>each() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<div class="memtemplate">
template&lt;typename Func &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::each </td>
<td>(</td>
<td class="paramtype">Func&#160;</td>
<td class="paramname"><em>func</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Iterates entities and components and applies the given function object to them. </p>
<p>The function object is invoked for each entity. It is provided with the entity itself and a set of references to all the components of the view.<br />
The signature of the function should be equivalent to the following:</p>
<div class="fragment"><div class="line">void(<span class="keyword">const</span> <a class="code" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>, Component &amp;...);</div></div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Func</td><td>Type of the function object to invoke. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">func</td><td>A valid function object. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00391">391</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a25cf198e023b229190aa6d62852f4d10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a25cf198e023b229190aa6d62852f4d10">&#9670;&nbsp;</a></span>empty()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::empty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the view is empty. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the view is empty, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00109">109</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a0e614f77f05085e951e761d8ca967a84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e614f77f05085e951e761d8ca967a84">&#9670;&nbsp;</a></span>end() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1PersistentView.html#a260bd2740fb90caf984ce62c26bb887b">const_iterator_type</a> <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::end </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator that is past the last entity that has the given components. </p>
<p>The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.</p>
<dl class="section note"><dt>Note</dt><dd>Input iterators stay true to the order imposed to the underlying data structures.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the entity following the last entity that has the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00217">217</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a470ef6edb944f127e26f7e3398cbded1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a470ef6edb944f127e26f7e3398cbded1">&#9670;&nbsp;</a></span>end() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1PersistentView.html#ae563ed31a62fd9f33f93767f0ecdfff5">iterator_type</a> <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::end </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator that is past the last entity that has the given components. </p>
<p>The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.</p>
<dl class="section note"><dt>Note</dt><dd>Input iterators stay true to the order imposed to the underlying data structures.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the entity following the last entity that has the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00236">236</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a51452939486c5e98036b60838f69a32d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51452939486c5e98036b60838f69a32d">&#9670;&nbsp;</a></span>get() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<div class="memtemplate">
template&lt;typename Comp &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const Comp&amp; <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::get </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>&#160;</td>
<td class="paramname"><em>entity</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the component assigned to the given entity. </p>
<p>Prefer this function instead of <code><a class="el" href="classentt_1_1Registry.html#a2079fb67093feb86b75e9dede6bb6c4d" title="Returns a reference to the given tag. ">Registry::get</a></code> during iterations. It has far better performance than its companion function.</p>
<dl class="section warning"><dt>Warning</dt><dd>Attempting to use an invalid component type results in a compilation error. Attempting to use an entity that doesn't belong to the view results in undefined behavior.<br />
An assertion will abort the execution at runtime in debug mode if the view doesn't contain the given entity.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Type of component to get. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entity</td><td>A valid entity identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The component assigned to the entity. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00276">276</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a0a088e6e40be777f9834c1c3fc6d1b15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a088e6e40be777f9834c1c3fc6d1b15">&#9670;&nbsp;</a></span>get() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<div class="memtemplate">
template&lt;typename Comp &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Comp&amp; <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::get </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>&#160;</td>
<td class="paramname"><em>entity</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the component assigned to the given entity. </p>
<p>Prefer this function instead of <code><a class="el" href="classentt_1_1Registry.html#a2079fb67093feb86b75e9dede6bb6c4d" title="Returns a reference to the given tag. ">Registry::get</a></code> during iterations. It has far better performance than its companion function.</p>
<dl class="section warning"><dt>Warning</dt><dd>Attempting to use an invalid component type results in a compilation error. Attempting to use an entity that doesn't belong to the view results in undefined behavior.<br />
An assertion will abort the execution at runtime in debug mode if the view doesn't contain the given entity.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Type of component to get. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entity</td><td>A valid entity identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The component assigned to the entity. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00299">299</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="af6931b058d6009776cc19082eb9a512f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6931b058d6009776cc19082eb9a512f">&#9670;&nbsp;</a></span>get() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<div class="memtemplate">
template&lt;typename... Comp&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::enable_if_t&lt;(sizeof...(Comp) &gt; 1), std::tuple&lt;const Comp &amp;...&gt; &gt; <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::get </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>&#160;</td>
<td class="paramname"><em>entity</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the components assigned to the given entity. </p>
<p>Prefer this function instead of <code><a class="el" href="classentt_1_1Registry.html#a2079fb67093feb86b75e9dede6bb6c4d" title="Returns a reference to the given tag. ">Registry::get</a></code> during iterations. It has far better performance than its companion function.</p>
<dl class="section warning"><dt>Warning</dt><dd>Attempting to use invalid component types results in a compilation error. Attempting to use an entity that doesn't belong to the view results in undefined behavior.<br />
An assertion will abort the execution at runtime in debug mode if the view doesn't contain the given entity.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Types of the components to get. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entity</td><td>A valid entity identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The components assigned to the entity. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00322">322</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="ad2e8b8cf33831f8ea2caf1bd9a0474b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2e8b8cf33831f8ea2caf1bd9a0474b6">&#9670;&nbsp;</a></span>get() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<div class="memtemplate">
template&lt;typename... Comp&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::enable_if_t&lt;(sizeof...(Comp) &gt; 1), std::tuple&lt;Comp &amp;...&gt; &gt; <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::get </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>&#160;</td>
<td class="paramname"><em>entity</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the components assigned to the given entity. </p>
<p>Prefer this function instead of <code><a class="el" href="classentt_1_1Registry.html#a2079fb67093feb86b75e9dede6bb6c4d" title="Returns a reference to the given tag. ">Registry::get</a></code> during iterations. It has far better performance than its companion function.</p>
<dl class="section warning"><dt>Warning</dt><dd>Attempting to use invalid component types results in a compilation error. Attempting to use an entity that doesn't belong to the view results in undefined behavior.<br />
An assertion will abort the execution at runtime in debug mode if the view doesn't contain the given entity.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Types of the components to get. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entity</td><td>A valid entity identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The components assigned to the entity. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00346">346</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a7edc6f5cbd49d978469d9384b9aca6b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7edc6f5cbd49d978469d9384b9aca6b3">&#9670;&nbsp;</a></span>operator[]()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classentt_1_1PersistentView.html#a5195c9d1dede0fe6c40bea576398022b">entity_type</a>&amp; <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::operator[] </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1PersistentView.html#ac2e81caacece38b84f46c4430cd8cf4e">size_type</a>&#160;</td>
<td class="paramname"><em>pos</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a reference to the element at the given position. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pos</td><td>Position of the element to return. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A reference to the requested element. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00245">245</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="ad6b816b2acc684733d79ac680005f8da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6b816b2acc684733d79ac680005f8da">&#9670;&nbsp;</a></span>size()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1PersistentView.html#ac2e81caacece38b84f46c4430cd8cf4e">size_type</a> <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of entities that have the given components. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of entities that have the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00101">101</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="accde3d4b4a904e79c832f6b05f324b05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accde3d4b4a904e79c832f6b05f324b05">&#9670;&nbsp;</a></span>sort()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity , typename... Component&gt; </div>
<div class="memtemplate">
template&lt;typename Comp &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classentt_1_1PersistentView.html">entt::PersistentView</a>&lt; Entity, Component &gt;::sort </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sort the shared pool of entities according to the given component. </p>
<p>Persistent views of the same type share with the <a class="el" href="classentt_1_1Registry.html" title="Fast and reliable entity-component system. ">Registry</a> a pool of entities with its own order that doesn't depend on the order of any pool of components. Users can order the underlying data structure so that it respects the order of the pool of the given component.</p>
<dl class="section note"><dt>Note</dt><dd>The shared pool of entities and thus its order is affected by the changes to each and every pool that it tracks. Therefore changes to those pools can quickly ruin the order imposed to the pool of entities shared between the persistent views.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Type of component to use to impose the order. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00414">414</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/entt/entity/<a class="el" href="view_8hpp_source.html">view.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>