808 lines
49 KiB
HTML
808 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::View< Entity, Component > 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
|
|
 <span id="projectnumber">2.6.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_1View.html">View</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#pub-types">Public Types</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#friends">Friends</a> |
|
|
<a href="classentt_1_1View-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">entt::View< Entity, Component > Class Template Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Multi component view.
|
|
<a href="classentt_1_1View.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="view_8hpp_source.html">view.hpp</a>></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:a738fb04a466b1f858a1eb5d7bc8fd668"><td class="memItemLeft" align="right" valign="top"><a id="a738fb04a466b1f858a1eb5d7bc8fd668"></a>
|
|
using </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a738fb04a466b1f858a1eb5d7bc8fd668">iterator_type</a> = Iterator</td></tr>
|
|
<tr class="memdesc:a738fb04a466b1f858a1eb5d7bc8fd668"><td class="mdescLeft"> </td><td class="mdescRight">Input iterator type. <br /></td></tr>
|
|
<tr class="separator:a738fb04a466b1f858a1eb5d7bc8fd668"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a81b76e0389ffeb60195a3391c4c5ce3a"><td class="memItemLeft" align="right" valign="top"><a id="a81b76e0389ffeb60195a3391c4c5ce3a"></a>
|
|
using </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> = Iterator</td></tr>
|
|
<tr class="memdesc:a81b76e0389ffeb60195a3391c4c5ce3a"><td class="mdescLeft"> </td><td class="mdescRight">Constant input iterator type. <br /></td></tr>
|
|
<tr class="separator:a81b76e0389ffeb60195a3391c4c5ce3a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a61be0e712de89d1eb275e14bbc59174e"><td class="memItemLeft" align="right" valign="top"><a id="a61be0e712de89d1eb275e14bbc59174e"></a>
|
|
using </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">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:a61be0e712de89d1eb275e14bbc59174e"><td class="mdescLeft"> </td><td class="mdescRight">Underlying entity identifier. <br /></td></tr>
|
|
<tr class="separator:a61be0e712de89d1eb275e14bbc59174e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab3f86ec55935bbbb00077bbe07f15c4b"><td class="memItemLeft" align="right" valign="top"><a id="ab3f86ec55935bbbb00077bbe07f15c4b"></a>
|
|
using </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#ab3f86ec55935bbbb00077bbe07f15c4b">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:ab3f86ec55935bbbb00077bbe07f15c4b"><td class="mdescLeft"> </td><td class="mdescRight">Unsigned integer type. <br /></td></tr>
|
|
<tr class="separator:ab3f86ec55935bbbb00077bbe07f15c4b"><td class="memSeparator" colspan="2"> </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:a2244b847c1e148f901ea3b83ec2d6703"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1View.html#ab3f86ec55935bbbb00077bbe07f15c4b">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a2244b847c1e148f901ea3b83ec2d6703">size</a> () const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:a2244b847c1e148f901ea3b83ec2d6703"><td class="mdescLeft"> </td><td class="mdescRight">Estimates the number of entities that have the given components. <a href="#a2244b847c1e148f901ea3b83ec2d6703">More...</a><br /></td></tr>
|
|
<tr class="separator:a2244b847c1e148f901ea3b83ec2d6703"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aee65a80863abccbe3117e60b22695dc4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#aee65a80863abccbe3117e60b22695dc4">empty</a> () const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:aee65a80863abccbe3117e60b22695dc4"><td class="mdescLeft"> </td><td class="mdescRight">Checks if the view is definitely empty. <a href="#aee65a80863abccbe3117e60b22695dc4">More...</a><br /></td></tr>
|
|
<tr class="separator:aee65a80863abccbe3117e60b22695dc4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2cefabdbdd85098f9ac789a47fcc930a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a2cefabdbdd85098f9ac789a47fcc930a">cbegin</a> () const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:a2cefabdbdd85098f9ac789a47fcc930a"><td class="mdescLeft"> </td><td class="mdescRight">Returns an iterator to the first entity that has the given components. <a href="#a2cefabdbdd85098f9ac789a47fcc930a">More...</a><br /></td></tr>
|
|
<tr class="separator:a2cefabdbdd85098f9ac789a47fcc930a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7c59406241bd142289a0d618a33f98d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a7c59406241bd142289a0d618a33f98d3">begin</a> () const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:a7c59406241bd142289a0d618a33f98d3"><td class="mdescLeft"> </td><td class="mdescRight">Returns an iterator to the first entity that has the given components. <a href="#a7c59406241bd142289a0d618a33f98d3">More...</a><br /></td></tr>
|
|
<tr class="separator:a7c59406241bd142289a0d618a33f98d3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5d4b1ac137a2dd3ac7f8f91a40b6eb0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1View.html#a738fb04a466b1f858a1eb5d7bc8fd668">iterator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a5d4b1ac137a2dd3ac7f8f91a40b6eb0e">begin</a> () ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:a5d4b1ac137a2dd3ac7f8f91a40b6eb0e"><td class="mdescLeft"> </td><td class="mdescRight">Returns an iterator to the first entity that has the given components. <a href="#a5d4b1ac137a2dd3ac7f8f91a40b6eb0e">More...</a><br /></td></tr>
|
|
<tr class="separator:a5d4b1ac137a2dd3ac7f8f91a40b6eb0e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab57c0ac7a0bb1487f525757a07a6bd71"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#ab57c0ac7a0bb1487f525757a07a6bd71">cend</a> () const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:ab57c0ac7a0bb1487f525757a07a6bd71"><td class="mdescLeft"> </td><td class="mdescRight">Returns an iterator that is past the last entity that has the given components. <a href="#ab57c0ac7a0bb1487f525757a07a6bd71">More...</a><br /></td></tr>
|
|
<tr class="separator:ab57c0ac7a0bb1487f525757a07a6bd71"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af0cbc67f83e47cb4cbb3a1a26d7cd263"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#af0cbc67f83e47cb4cbb3a1a26d7cd263">end</a> () const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:af0cbc67f83e47cb4cbb3a1a26d7cd263"><td class="mdescLeft"> </td><td class="mdescRight">Returns an iterator that is past the last entity that has the given components. <a href="#af0cbc67f83e47cb4cbb3a1a26d7cd263">More...</a><br /></td></tr>
|
|
<tr class="separator:af0cbc67f83e47cb4cbb3a1a26d7cd263"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a34bca7c2c996fe26e150c0a7a2dbb69d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1View.html#a738fb04a466b1f858a1eb5d7bc8fd668">iterator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a34bca7c2c996fe26e150c0a7a2dbb69d">end</a> () ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:a34bca7c2c996fe26e150c0a7a2dbb69d"><td class="mdescLeft"> </td><td class="mdescRight">Returns an iterator that is past the last entity that has the given components. <a href="#a34bca7c2c996fe26e150c0a7a2dbb69d">More...</a><br /></td></tr>
|
|
<tr class="separator:a34bca7c2c996fe26e150c0a7a2dbb69d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abbc407e2fecdbcf97c129ade5db185e8"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#abbc407e2fecdbcf97c129ade5db185e8">contains</a> (const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> entity) const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:abbc407e2fecdbcf97c129ade5db185e8"><td class="mdescLeft"> </td><td class="mdescRight">Checks if a view contains an entity. <a href="#abbc407e2fecdbcf97c129ade5db185e8">More...</a><br /></td></tr>
|
|
<tr class="separator:abbc407e2fecdbcf97c129ade5db185e8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8f2e5fc95bb71c698b8ce61b9b4a8a5e"><td class="memTemplParams" colspan="2">template<typename Comp > </td></tr>
|
|
<tr class="memitem:a8f2e5fc95bb71c698b8ce61b9b4a8a5e"><td class="memTemplItemLeft" align="right" valign="top">const Comp & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a8f2e5fc95bb71c698b8ce61b9b4a8a5e">get</a> (const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> entity) const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:a8f2e5fc95bb71c698b8ce61b9b4a8a5e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the component assigned to the given entity. <a href="#a8f2e5fc95bb71c698b8ce61b9b4a8a5e">More...</a><br /></td></tr>
|
|
<tr class="separator:a8f2e5fc95bb71c698b8ce61b9b4a8a5e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ade86403331b51e25fae9238dd8997de0"><td class="memTemplParams" colspan="2">template<typename Comp > </td></tr>
|
|
<tr class="memitem:ade86403331b51e25fae9238dd8997de0"><td class="memTemplItemLeft" align="right" valign="top">Comp & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#ade86403331b51e25fae9238dd8997de0">get</a> (const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> entity) ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:ade86403331b51e25fae9238dd8997de0"><td class="mdescLeft"> </td><td class="mdescRight">Returns the component assigned to the given entity. <a href="#ade86403331b51e25fae9238dd8997de0">More...</a><br /></td></tr>
|
|
<tr class="separator:ade86403331b51e25fae9238dd8997de0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9fb10d57d05afa48c0f25ea0b475c81f"><td class="memTemplParams" colspan="2">template<typename... Comp> </td></tr>
|
|
<tr class="memitem:a9fb10d57d05afa48c0f25ea0b475c81f"><td class="memTemplItemLeft" align="right" valign="top">std::enable_if_t<(sizeof...(Comp) > 1), std::tuple< const Comp &... > > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a9fb10d57d05afa48c0f25ea0b475c81f">get</a> (const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> entity) const ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:a9fb10d57d05afa48c0f25ea0b475c81f"><td class="mdescLeft"> </td><td class="mdescRight">Returns the components assigned to the given entity. <a href="#a9fb10d57d05afa48c0f25ea0b475c81f">More...</a><br /></td></tr>
|
|
<tr class="separator:a9fb10d57d05afa48c0f25ea0b475c81f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac5b199f031c48da2393eb56fea35b83e"><td class="memTemplParams" colspan="2">template<typename... Comp> </td></tr>
|
|
<tr class="memitem:ac5b199f031c48da2393eb56fea35b83e"><td class="memTemplItemLeft" align="right" valign="top">std::enable_if_t<(sizeof...(Comp) > 1), std::tuple< Comp &... > > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#ac5b199f031c48da2393eb56fea35b83e">get</a> (const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> entity) ENTT_NOEXCEPT</td></tr>
|
|
<tr class="memdesc:ac5b199f031c48da2393eb56fea35b83e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the components assigned to the given entity. <a href="#ac5b199f031c48da2393eb56fea35b83e">More...</a><br /></td></tr>
|
|
<tr class="separator:ac5b199f031c48da2393eb56fea35b83e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a85eea1ef9655368de8da355019fbeaa0"><td class="memTemplParams" colspan="2">template<typename Func > </td></tr>
|
|
<tr class="memitem:a85eea1ef9655368de8da355019fbeaa0"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a85eea1ef9655368de8da355019fbeaa0">each</a> (Func func) const</td></tr>
|
|
<tr class="memdesc:a85eea1ef9655368de8da355019fbeaa0"><td class="mdescLeft"> </td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#a85eea1ef9655368de8da355019fbeaa0">More...</a><br /></td></tr>
|
|
<tr class="separator:a85eea1ef9655368de8da355019fbeaa0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6c540ac6937e6e9cf931cccaabcec745"><td class="memTemplParams" colspan="2">template<typename Func > </td></tr>
|
|
<tr class="memitem:a6c540ac6937e6e9cf931cccaabcec745"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a6c540ac6937e6e9cf931cccaabcec745">each</a> (Func func)</td></tr>
|
|
<tr class="memdesc:a6c540ac6937e6e9cf931cccaabcec745"><td class="mdescLeft"> </td><td class="mdescRight">Iterates entities and components and applies the given function object to them. <a href="#a6c540ac6937e6e9cf931cccaabcec745">More...</a><br /></td></tr>
|
|
<tr class="separator:a6c540ac6937e6e9cf931cccaabcec745"><td class="memSeparator" colspan="2"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1View.html#a200646cfe88496da691aab5f61c0fa69">Registry< Entity ></a></td></tr>
|
|
<tr class="memdesc:a200646cfe88496da691aab5f61c0fa69"><td class="mdescLeft"> </td><td class="mdescRight">A registry is allowed to create views. <br /></td></tr>
|
|
<tr class="separator:a200646cfe88496da691aab5f61c0fa69"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><h3>template<typename Entity, typename... Component><br />
|
|
class entt::View< Entity, Component ></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_1SparseSet.html" title="Sparse set. ">SparseSet</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>
|
|
</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.</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_3_01Entity_00_01Component_01_4.html" title="Single component view specialization. ">View<Entity, Component></a> </dd>
|
|
<dd>
|
|
<a class="el" href="classentt_1_1PersistentView.html" title="Persistent view. ">PersistentView</a> </dd>
|
|
<dd>
|
|
<a class="el" href="classentt_1_1RawView.html" title="Raw view. ">RawView</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#l00453">453</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="a7c59406241bd142289a0d618a33f98d3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7c59406241bd142289a0d618a33f98d3">◆ </a></span>begin() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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_1View.html#a34bca7c2c996fe26e150c0a7a2dbb69d" 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#l00669">669</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5d4b1ac137a2dd3ac7f8f91a40b6eb0e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5d4b1ac137a2dd3ac7f8f91a40b6eb0e">◆ </a></span>begin() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classentt_1_1View.html#a738fb04a466b1f858a1eb5d7bc8fd668">iterator_type</a> <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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_1View.html#a34bca7c2c996fe26e150c0a7a2dbb69d" 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#l00687">687</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2cefabdbdd85098f9ac789a47fcc930a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2cefabdbdd85098f9ac789a47fcc930a">◆ </a></span>cbegin()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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_1View.html#a34bca7c2c996fe26e150c0a7a2dbb69d" 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#l00650">650</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab57c0ac7a0bb1487f525757a07a6bd71"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab57c0ac7a0bb1487f525757a07a6bd71">◆ </a></span>cend()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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#l00706">706</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abbc407e2fecdbcf97c129ade5db185e8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abbc407e2fecdbcf97c129ade5db185e8">◆ </a></span>contains()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::contains </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> </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#l00754">754</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a85eea1ef9655368de8da355019fbeaa0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a85eea1ef9655368de8da355019fbeaa0">◆ </a></span>each() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<div class="memtemplate">
|
|
template<typename Func > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::each </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Func </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_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a>, <span class="keyword">const</span> Component &...);</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#l00869">869</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6c540ac6937e6e9cf931cccaabcec745"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6c540ac6937e6e9cf931cccaabcec745">◆ </a></span>each() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<div class="memtemplate">
|
|
template<typename Func > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::each </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Func </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_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a>, Component &...);</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#l00893">893</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aee65a80863abccbe3117e60b22695dc4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aee65a80863abccbe3117e60b22695dc4">◆ </a></span>empty()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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#l00632">632</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af0cbc67f83e47cb4cbb3a1a26d7cd263"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af0cbc67f83e47cb4cbb3a1a26d7cd263">◆ </a></span>end() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classentt_1_1View.html#a81b76e0389ffeb60195a3391c4c5ce3a">const_iterator_type</a> <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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#l00726">726</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a34bca7c2c996fe26e150c0a7a2dbb69d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a34bca7c2c996fe26e150c0a7a2dbb69d">◆ </a></span>end() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classentt_1_1View.html#a738fb04a466b1f858a1eb5d7bc8fd668">iterator_type</a> <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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#l00745">745</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8f2e5fc95bb71c698b8ce61b9b4a8a5e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8f2e5fc95bb71c698b8ce61b9b4a8a5e">◆ </a></span>get() <span class="overload">[1/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<div class="memtemplate">
|
|
template<typename Comp > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const Comp& <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::get </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> </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#l00777">777</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ade86403331b51e25fae9238dd8997de0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ade86403331b51e25fae9238dd8997de0">◆ </a></span>get() <span class="overload">[2/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<div class="memtemplate">
|
|
template<typename Comp > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Comp& <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::get </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> </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#l00800">800</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9fb10d57d05afa48c0f25ea0b475c81f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9fb10d57d05afa48c0f25ea0b475c81f">◆ </a></span>get() <span class="overload">[3/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<div class="memtemplate">
|
|
template<typename... Comp> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::enable_if_t<(sizeof...(Comp) > 1), std::tuple<const Comp &...> > <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::get </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> </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#l00823">823</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac5b199f031c48da2393eb56fea35b83e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac5b199f031c48da2393eb56fea35b83e">◆ </a></span>get() <span class="overload">[4/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<div class="memtemplate">
|
|
template<typename... Comp> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::enable_if_t<(sizeof...(Comp) > 1), std::tuple<Comp &...> > <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::get </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1View.html#a61be0e712de89d1eb275e14bbc59174e">entity_type</a> </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#l00847">847</a> of file <a class="el" href="view_8hpp_source.html">view.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2244b847c1e148f901ea3b83ec2d6703"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2244b847c1e148f901ea3b83ec2d6703">◆ </a></span>size()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Entity , typename... Component> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classentt_1_1View.html#ab3f86ec55935bbbb00077bbe07f15c4b">size_type</a> <a class="el" href="classentt_1_1View.html">entt::View</a>< Entity, Component >::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#l00624">624</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  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|