Files
entt/classentt_1_1basic__view.html
2019-08-29 16:16:50 +02:00

827 lines
49 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::basic_view&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">3.1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceentt.html">entt</a></li><li class="navelem"><a class="el" href="classentt_1_1basic__view.html">basic_view</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<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_1basic__view-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">entt::basic_view&lt; Entity, Component &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Multi component view.
<a href="classentt_1_1basic__view.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:a4d733f92580b2623300174292e47c7cf"><td class="memItemLeft" align="right" valign="top"><a id="a4d733f92580b2623300174292e47c7cf"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a> = typename <a class="el" href="classentt_1_1sparse__set.html">sparse_set</a>&lt; Entity &gt;::<a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a></td></tr>
<tr class="memdesc:a4d733f92580b2623300174292e47c7cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Underlying entity identifier. <br /></td></tr>
<tr class="separator:a4d733f92580b2623300174292e47c7cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f3ec253d7fc6da42e9eb0e5c8f6a655"><td class="memItemLeft" align="right" valign="top"><a id="a8f3ec253d7fc6da42e9eb0e5c8f6a655"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a8f3ec253d7fc6da42e9eb0e5c8f6a655">size_type</a> = typename <a class="el" href="classentt_1_1sparse__set.html">sparse_set</a>&lt; Entity &gt;::<a class="el" href="classentt_1_1basic__view.html#a8f3ec253d7fc6da42e9eb0e5c8f6a655">size_type</a></td></tr>
<tr class="memdesc:a8f3ec253d7fc6da42e9eb0e5c8f6a655"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsigned integer type. <br /></td></tr>
<tr class="separator:a8f3ec253d7fc6da42e9eb0e5c8f6a655"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adad369b0a841ef254549668348fed0c5"><td class="memItemLeft" align="right" valign="top"><a id="adad369b0a841ef254549668348fed0c5"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#adad369b0a841ef254549668348fed0c5">iterator_type</a> = iterator</td></tr>
<tr class="memdesc:adad369b0a841ef254549668348fed0c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Input iterator type. <br /></td></tr>
<tr class="separator:adad369b0a841ef254549668348fed0c5"><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:a05e540230bfb537a7574da0f8d4eaaa5"><td class="memTemplParams" colspan="2">template&lt;typename Comp &gt; </td></tr>
<tr class="memitem:a05e540230bfb537a7574da0f8d4eaaa5"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__view.html#a8f3ec253d7fc6da42e9eb0e5c8f6a655">size_type</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a05e540230bfb537a7574da0f8d4eaaa5">size</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a05e540230bfb537a7574da0f8d4eaaa5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of existing components of the given type. <a href="#a05e540230bfb537a7574da0f8d4eaaa5">More...</a><br /></td></tr>
<tr class="separator:a05e540230bfb537a7574da0f8d4eaaa5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb9ee6ba89ed94297808c4ee04d21f1e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__view.html#a8f3ec253d7fc6da42e9eb0e5c8f6a655">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#acb9ee6ba89ed94297808c4ee04d21f1e">size</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:acb9ee6ba89ed94297808c4ee04d21f1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Estimates the number of entities that have the given components. <a href="#acb9ee6ba89ed94297808c4ee04d21f1e">More...</a><br /></td></tr>
<tr class="separator:acb9ee6ba89ed94297808c4ee04d21f1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d19f70eda47e20c8c6d97b7f2c05f11"><td class="memTemplParams" colspan="2">template&lt;typename Comp &gt; </td></tr>
<tr class="memitem:a9d19f70eda47e20c8c6d97b7f2c05f11"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a9d19f70eda47e20c8c6d97b7f2c05f11">empty</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a9d19f70eda47e20c8c6d97b7f2c05f11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the pool of a given component is empty. <a href="#a9d19f70eda47e20c8c6d97b7f2c05f11">More...</a><br /></td></tr>
<tr class="separator:a9d19f70eda47e20c8c6d97b7f2c05f11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7916ac310c1ec40c3cb5426d74d641d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#af7916ac310c1ec40c3cb5426d74d641d">empty</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:af7916ac310c1ec40c3cb5426d74d641d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if the view is definitely empty. <a href="#af7916ac310c1ec40c3cb5426d74d641d">More...</a><br /></td></tr>
<tr class="separator:af7916ac310c1ec40c3cb5426d74d641d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb3b8c843b1ded37a8bac4e9d434d048"><td class="memTemplParams" colspan="2">template&lt;typename Comp &gt; </td></tr>
<tr class="memitem:acb3b8c843b1ded37a8bac4e9d434d048"><td class="memTemplItemLeft" align="right" valign="top">Comp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#acb3b8c843b1ded37a8bac4e9d434d048">raw</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:acb3b8c843b1ded37a8bac4e9d434d048"><td class="mdescLeft">&#160;</td><td class="mdescRight">Direct access to the list of components of a given pool. <a href="#acb3b8c843b1ded37a8bac4e9d434d048">More...</a><br /></td></tr>
<tr class="separator:acb3b8c843b1ded37a8bac4e9d434d048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2122c6c128744f4617fab34dca651c3"><td class="memTemplParams" colspan="2">template&lt;typename Comp &gt; </td></tr>
<tr class="memitem:ac2122c6c128744f4617fab34dca651c3"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#ac2122c6c128744f4617fab34dca651c3">data</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:ac2122c6c128744f4617fab34dca651c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Direct access to the list of entities of a given pool. <a href="#ac2122c6c128744f4617fab34dca651c3">More...</a><br /></td></tr>
<tr class="separator:ac2122c6c128744f4617fab34dca651c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00d2bb01727273bf40acdf1a57588fc7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__view.html#adad369b0a841ef254549668348fed0c5">iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a00d2bb01727273bf40acdf1a57588fc7">begin</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a00d2bb01727273bf40acdf1a57588fc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the first entity that has the given components. <a href="#a00d2bb01727273bf40acdf1a57588fc7">More...</a><br /></td></tr>
<tr class="separator:a00d2bb01727273bf40acdf1a57588fc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c17f8511d0e12087fbdd3b9b5cc9e4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__view.html#adad369b0a841ef254549668348fed0c5">iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a1c17f8511d0e12087fbdd3b9b5cc9e4a">end</a> () const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a1c17f8511d0e12087fbdd3b9b5cc9e4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator that is past the last entity that has the given components. <a href="#a1c17f8511d0e12087fbdd3b9b5cc9e4a">More...</a><br /></td></tr>
<tr class="separator:a1c17f8511d0e12087fbdd3b9b5cc9e4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8098ec2a26d9386d68c0b664d21d93e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__view.html#adad369b0a841ef254549668348fed0c5">iterator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#aa8098ec2a26d9386d68c0b664d21d93e">find</a> (const <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a> entt) const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:aa8098ec2a26d9386d68c0b664d21d93e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds an entity. <a href="#aa8098ec2a26d9386d68c0b664d21d93e">More...</a><br /></td></tr>
<tr class="separator:aa8098ec2a26d9386d68c0b664d21d93e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dc82a3867a4ae26e8e80b5abc2e2118"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a8dc82a3867a4ae26e8e80b5abc2e2118">contains</a> (const <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a> entt) const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:a8dc82a3867a4ae26e8e80b5abc2e2118"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a view contains an entity. <a href="#a8dc82a3867a4ae26e8e80b5abc2e2118">More...</a><br /></td></tr>
<tr class="separator:a8dc82a3867a4ae26e8e80b5abc2e2118"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa4f1d01440c37739502d3d73a28c4ca"><td class="memTemplParams" colspan="2">template&lt;typename... Comp&gt; </td></tr>
<tr class="memitem:aaa4f1d01440c37739502d3d73a28c4ca"><td class="memTemplItemLeft" align="right" valign="top">decltype(auto)&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#aaa4f1d01440c37739502d3d73a28c4ca">get</a> ([[maybe_unused]] const <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a> entt) const ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:aaa4f1d01440c37739502d3d73a28c4ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the components assigned to the given entity. <a href="#aaa4f1d01440c37739502d3d73a28c4ca">More...</a><br /></td></tr>
<tr class="separator:aaa4f1d01440c37739502d3d73a28c4ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1019208022f9a4a35ade26f3f35c097f"><td class="memTemplParams" colspan="2">template&lt;typename Func &gt; </td></tr>
<tr class="memitem:a1019208022f9a4a35ade26f3f35c097f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a1019208022f9a4a35ade26f3f35c097f">each</a> (Func func) const</td></tr>
<tr class="memdesc:a1019208022f9a4a35ade26f3f35c097f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#a1019208022f9a4a35ade26f3f35c097f">More...</a><br /></td></tr>
<tr class="separator:a1019208022f9a4a35ade26f3f35c097f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8d3d77cb491ea84ebac40017780c96f"><td class="memTemplParams" colspan="2">template&lt;typename Comp , typename Func &gt; </td></tr>
<tr class="memitem:aa8d3d77cb491ea84ebac40017780c96f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#aa8d3d77cb491ea84ebac40017780c96f">each</a> (Func func) const</td></tr>
<tr class="memdesc:aa8d3d77cb491ea84ebac40017780c96f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#aa8d3d77cb491ea84ebac40017780c96f">More...</a><br /></td></tr>
<tr class="separator:aa8d3d77cb491ea84ebac40017780c96f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09f6332a1c27e104d8006dfba2b5b3a3"><td class="memTemplParams" colspan="2">template&lt;typename Func &gt; </td></tr>
<tr class="memitem:a09f6332a1c27e104d8006dfba2b5b3a3"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a09f6332a1c27e104d8006dfba2b5b3a3">less</a> (Func func) const</td></tr>
<tr class="memdesc:a09f6332a1c27e104d8006dfba2b5b3a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#a09f6332a1c27e104d8006dfba2b5b3a3">More...</a><br /></td></tr>
<tr class="separator:a09f6332a1c27e104d8006dfba2b5b3a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ec1ea64f16ad1605dccf48d713ac429"><td class="memTemplParams" colspan="2">template&lt;typename Comp , typename Func &gt; </td></tr>
<tr class="memitem:a6ec1ea64f16ad1605dccf48d713ac429"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a6ec1ea64f16ad1605dccf48d713ac429">less</a> (Func func) const</td></tr>
<tr class="memdesc:a6ec1ea64f16ad1605dccf48d713ac429"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#a6ec1ea64f16ad1605dccf48d713ac429">More...</a><br /></td></tr>
<tr class="separator:a6ec1ea64f16ad1605dccf48d713ac429"><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:a60c928831c22b7dd2216dbc469f68f24"><td class="memItemLeft" align="right" valign="top"><a id="a60c928831c22b7dd2216dbc469f68f24"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__view.html#a60c928831c22b7dd2216dbc469f68f24">basic_registry&lt; Entity &gt;</a></td></tr>
<tr class="memdesc:a60c928831c22b7dd2216dbc469f68f24"><td class="mdescLeft">&#160;</td><td class="mdescRight">A registry is allowed to create views. <br /></td></tr>
<tr class="separator:a60c928831c22b7dd2216dbc469f68f24"><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::basic_view&lt; Entity, Component &gt;</h3>
<p>Multi component view. </p>
<p>Multi component views iterate over those entities that have at least all the given components in their bags. During initialization, a multi component view looks at the number of entities available for each component and picks up a reference to the smallest set of candidate entities in order to get a performance boost when iterate.<br />
Order of elements during iterations are highly dependent on the order of the underlying data structures. See <a class="el" href="classentt_1_1sparse__set.html" title="Basic sparse set implementation. ">sparse_set</a> and its specializations for more details.</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>
<li>The entity currently pointed is destroyed.</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 of the registry that generated them. Therefore any change to the entities and to the components made by means of the registry are immediately reflected by views.</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="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="entity_2fwd_8hpp_source.html#l00018">18</a> of file <a class="el" href="entity_2fwd_8hpp_source.html">fwd.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a00d2bb01727273bf40acdf1a57588fc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00d2bb01727273bf40acdf1a57588fc7">&#9670;&nbsp;</a></span>begin()</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_1basic__view.html#adad369b0a841ef254549668348fed0c5">iterator_type</a> <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</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_1basic__view.html#a1c17f8511d0e12087fbdd3b9b5cc9e4a" 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#l00289">289</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a8dc82a3867a4ae26e8e80b5abc2e2118"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8dc82a3867a4ae26e8e80b5abc2e2118">&#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_1basic__view.html">entt::basic_view</a>&lt; Entity, Component &gt;::contains </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>&#160;</td>
<td class="paramname"><em>entt</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">entt</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#l00331">331</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="ac2122c6c128744f4617fab34dca651c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2122c6c128744f4617fab34dca651c3">&#9670;&nbsp;</a></span>data()</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 <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>* <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</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 of a given pool. </p>
<p>The returned pointer is such that range <code>[data&lt;Comp&gt;(), data&lt;Comp&gt;() + size&lt;Comp&gt;()]</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="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Type of component in which one is interested. </td></tr>
</table>
</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#l00271">271</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a1019208022f9a4a35ade26f3f35c097f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1019208022f9a4a35ade26f3f35c097f">&#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_1basic__view.html">entt::basic_view</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 references to all its components. The <em>constness</em> of the components is as requested.<br />
The signature of the function must be equivalent to one of the following forms:</p>
<div class="fragment"><div class="line">void(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>, Component &amp;...);</div><div class="line">void(Component &amp;...);</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Empty types aren't explicitly instantiated. Therefore, temporary objects are returned during iterations. They can be caught only by copy or with const references.</dd></dl>
<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#l00387">387</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="aa8d3d77cb491ea84ebac40017780c96f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8d3d77cb491ea84ebac40017780c96f">&#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 Comp , 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_1basic__view.html">entt::basic_view</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 references to all its components. The <em>constness</em> of the components is as requested.<br />
The signature of the function must be equivalent to one of the following forms:</p>
<div class="fragment"><div class="line">void(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>, Component &amp;...);</div><div class="line">void(Component &amp;...);</div></div><!-- fragment --><p>The pool of the suggested component is used to lead the iterations. The returned entities will therefore respect the order of the pool associated with that type.<br />
It is no longer guaranteed that the performance is the best possible, but there will be greater control over the order of iteration.</p>
<dl class="section note"><dt>Note</dt><dd>Empty types aren't explicitly instantiated. Therefore, temporary objects are returned during iterations. They can be caught only by copy or with const references.</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 enforce the iteration order. </td></tr>
<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#l00423">423</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a9d19f70eda47e20c8c6d97b7f2c05f11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d19f70eda47e20c8c6d97b7f2c05f11">&#9670;&nbsp;</a></span>empty() <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 Comp &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</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 pool of a given component is empty. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Type of component in which one is interested. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the pool of the given component is empty, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00225">225</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="af7916ac310c1ec40c3cb5426d74d641d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7916ac310c1ec40c3cb5426d74d641d">&#9670;&nbsp;</a></span>empty() <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">bool <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</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 if the view is definitely empty. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the view is definitely empty, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00233">233</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a1c17f8511d0e12087fbdd3b9b5cc9e4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c17f8511d0e12087fbdd3b9b5cc9e4a">&#9670;&nbsp;</a></span>end()</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_1basic__view.html#adad369b0a841ef254549668348fed0c5">iterator_type</a> <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</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#l00309">309</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="aa8098ec2a26d9386d68c0b664d21d93e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8098ec2a26d9386d68c0b664d21d93e">&#9670;&nbsp;</a></span>find()</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_1basic__view.html#adad369b0a841ef254549668348fed0c5">iterator_type</a> <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</a>&lt; Entity, Component &gt;::find </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>&#160;</td>
<td class="paramname"><em>entt</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>Finds an entity. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entt</td><td>A valid entity identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the given entity if it's found, past the end iterator otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00320">320</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="aaa4f1d01440c37739502d3d73a28c4ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa4f1d01440c37739502d3d73a28c4ca">&#9670;&nbsp;</a></span>get()</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">decltype(auto) <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</a>&lt; Entity, Component &gt;::get </td>
<td>(</td>
<td class="paramtype">[[maybe_unused] ] const <a class="el" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>&#160;</td>
<td class="paramname"><em>entt</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_1basic__registry.html#a3a683bb33971cc5a0bbbf4a9409208df" title="Returns references to the given components for an entity. ">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>Types of components to get. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entt</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#l00353">353</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a09f6332a1c27e104d8006dfba2b5b3a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09f6332a1c27e104d8006dfba2b5b3a3">&#9670;&nbsp;</a></span>less() <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_1basic__view.html">entt::basic_view</a>&lt; Entity, Component &gt;::less </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 references to non-empty components. The <em>constness</em> of the components is as requested.<br />
The signature of the function must be equivalent to one of the following forms:</p>
<div class="fragment"><div class="line">void(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>, Type &amp;...);</div><div class="line">void(Type &amp;...);</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="classentt_1_1basic__view.html#a1019208022f9a4a35ade26f3f35c097f" title="Iterates entities and components and applies the given function object to them. ">each</a></dd></dl>
<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#l00449">449</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a6ec1ea64f16ad1605dccf48d713ac429"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ec1ea64f16ad1605dccf48d713ac429">&#9670;&nbsp;</a></span>less() <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 Comp , 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_1basic__view.html">entt::basic_view</a>&lt; Entity, Component &gt;::less </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 references to non-empty components. The <em>constness</em> of the components is as requested.<br />
The signature of the function must be equivalent to one of the following forms:</p>
<div class="fragment"><div class="line">void(<span class="keyword">const</span> <a class="code" href="classentt_1_1basic__view.html#a4d733f92580b2623300174292e47c7cf">entity_type</a>, Type &amp;...);</div><div class="line">void(Type &amp;...);</div></div><!-- fragment --><p>The pool of the suggested component is used to lead the iterations. The returned entities will therefore respect the order of the pool associated with that type.<br />
It is no longer guaranteed that the performance is the best possible, but there will be greater control over the order of iteration.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classentt_1_1basic__view.html#a1019208022f9a4a35ade26f3f35c097f" title="Iterates entities and components and applies the given function object to them. ">each</a></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 enforce the iteration order. </td></tr>
<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#l00482">482</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="acb3b8c843b1ded37a8bac4e9d434d048"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb3b8c843b1ded37a8bac4e9d434d048">&#9670;&nbsp;</a></span>raw()</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* <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</a>&lt; Entity, Component &gt;::raw </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 components of a given pool. </p>
<p>The returned pointer is such that range <code>[raw&lt;Comp&gt;(), raw&lt;Comp&gt;() + size&lt;Comp&gt;()]</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 components. Use <code>begin</code> and <code>end</code> if you want to iterate the view in the expected order.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Type of component in which one is interested. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the array of components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00252">252</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="a05e540230bfb537a7574da0f8d4eaaa5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05e540230bfb537a7574da0f8d4eaaa5">&#9670;&nbsp;</a></span>size() <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 Comp &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__view.html#a8f3ec253d7fc6da42e9eb0e5c8f6a655">size_type</a> <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</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 existing components of the given type. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Comp</td><td>Type of component of which to return the size. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of existing components of the given type. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00206">206</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
</div>
</div>
<a id="acb9ee6ba89ed94297808c4ee04d21f1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb9ee6ba89ed94297808c4ee04d21f1e">&#9670;&nbsp;</a></span>size() <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_1basic__view.html#a8f3ec253d7fc6da42e9eb0e5c8f6a655">size_type</a> <a class="el" href="classentt_1_1basic__view.html">entt::basic_view</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>Estimates the number of entities that have the given components. </p>
<dl class="section return"><dt>Returns</dt><dd>Estimated number of entities that have the given components. </dd></dl>
<p class="definition">Definition at line <a class="el" href="view_8hpp_source.html#l00214">214</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 files:<ul>
<li>src/entt/entity/<a class="el" href="entity_2fwd_8hpp_source.html">fwd.hpp</a></li>
<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>