Files
entt/classentt_1_1basic__observer.html
2024-10-23 15:07:48 +02:00

869 lines
62 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EnTT: entt::basic_observer&lt; Registry, Allocator &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>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">EnTT<span id="projectnumber">&#160;3.14.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(function() { init_search(); });
});
/* @license-end */
</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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceentt.html">entt</a></li><li class="navelem"><a class="el" href="classentt_1_1basic__observer.html">basic_observer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classentt_1_1basic__observer-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">entt::basic_observer&lt; Registry, Allocator &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Observer.
<a href="#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="observer_8hpp_source.html">observer.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:afdf0a672324b06f59cbf9621e0a1ca82" id="r_afdf0a672324b06f59cbf9621e0a1ca82"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afdf0a672324b06f59cbf9621e0a1ca82">allocator_type</a> = Allocator</td></tr>
<tr class="memdesc:afdf0a672324b06f59cbf9621e0a1ca82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocator type. <br /></td></tr>
<tr class="separator:afdf0a672324b06f59cbf9621e0a1ca82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49cd0f73cfb9e61aaaaa32eee4a82da4" id="r_a49cd0f73cfb9e61aaaaa32eee4a82da4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a49cd0f73cfb9e61aaaaa32eee4a82da4">registry_type</a> = <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a></td></tr>
<tr class="separator:a49cd0f73cfb9e61aaaaa32eee4a82da4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a492baa27b5e13ea8759badc5b5681853" id="r_a492baa27b5e13ea8759badc5b5681853"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a492baa27b5e13ea8759badc5b5681853">entity_type</a> = <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> registry_type::entity_type</td></tr>
<tr class="memdesc:a492baa27b5e13ea8759badc5b5681853"><td class="mdescLeft">&#160;</td><td class="mdescRight">Underlying entity identifier. <br /></td></tr>
<tr class="separator:a492baa27b5e13ea8759badc5b5681853"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9562e2ac15362056e582fe515126df2" id="r_ac9562e2ac15362056e582fe515126df2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac9562e2ac15362056e582fe515126df2">size_type</a> = std::size_t</td></tr>
<tr class="memdesc:ac9562e2ac15362056e582fe515126df2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsigned integer type. <br /></td></tr>
<tr class="separator:ac9562e2ac15362056e582fe515126df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a263f1e60f3662e09f5e3c734c1e9c86e" id="r_a263f1e60f3662e09f5e3c734c1e9c86e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a263f1e60f3662e09f5e3c734c1e9c86e">iterator</a> = <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> registry_type::common_type::iterator</td></tr>
<tr class="memdesc:a263f1e60f3662e09f5e3c734c1e9c86e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Random access iterator type. <br /></td></tr>
<tr class="separator:a263f1e60f3662e09f5e3c734c1e9c86e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a31dba068369fa37f15ff120d6cdbdec1" id="r_a31dba068369fa37f15ff120d6cdbdec1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a31dba068369fa37f15ff120d6cdbdec1">basic_observer</a> ()</td></tr>
<tr class="memdesc:a31dba068369fa37f15ff120d6cdbdec1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:a31dba068369fa37f15ff120d6cdbdec1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a604a9b0d192dd468d2c019ebc92bd17a" id="r_a604a9b0d192dd468d2c019ebc92bd17a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a604a9b0d192dd468d2c019ebc92bd17a">basic_observer</a> (<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="#afdf0a672324b06f59cbf9621e0a1ca82">allocator_type</a> &amp;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>)</td></tr>
<tr class="memdesc:a604a9b0d192dd468d2c019ebc92bd17a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an empty storage with a given allocator. <br /></td></tr>
<tr class="separator:a604a9b0d192dd468d2c019ebc92bd17a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac047f4c16a0c8aa180fdb78ed7889db2" id="r_ac047f4c16a0c8aa180fdb78ed7889db2"><td class="memItemLeft" align="right" valign="top"><a id="ac047f4c16a0c8aa180fdb78ed7889db2" name="ac047f4c16a0c8aa180fdb78ed7889db2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>basic_observer</b> (<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp;)=<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">delete</a></td></tr>
<tr class="memdesc:ac047f4c16a0c8aa180fdb78ed7889db2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default copy constructor, deleted on purpose. <br /></td></tr>
<tr class="separator:ac047f4c16a0c8aa180fdb78ed7889db2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70e4dd096aa7aa8d27a7ba8e4b26ef5a" id="r_a70e4dd096aa7aa8d27a7ba8e4b26ef5a"><td class="memItemLeft" align="right" valign="top"><a id="a70e4dd096aa7aa8d27a7ba8e4b26ef5a" name="a70e4dd096aa7aa8d27a7ba8e4b26ef5a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>basic_observer</b> (<a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp;&amp;)=<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">delete</a></td></tr>
<tr class="memdesc:a70e4dd096aa7aa8d27a7ba8e4b26ef5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move constructor, deleted on purpose. <br /></td></tr>
<tr class="separator:a70e4dd096aa7aa8d27a7ba8e4b26ef5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad96408e8956a3457cd15d8d97708801f" id="r_ad96408e8956a3457cd15d8d97708801f"><td class="memTemplParams" colspan="2">template&lt;typename... Matcher&gt; </td></tr>
<tr class="memitem:ad96408e8956a3457cd15d8d97708801f"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#ad96408e8956a3457cd15d8d97708801f">basic_observer</a> (<a class="el" href="#a49cd0f73cfb9e61aaaaa32eee4a82da4">registry_type</a> &amp;reg, <a class="el" href="structentt_1_1basic__collector.html">basic_collector</a>&lt; Matcher... &gt;, <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="#afdf0a672324b06f59cbf9621e0a1ca82">allocator_type</a> &amp;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">allocator</a>=<a class="el" href="#afdf0a672324b06f59cbf9621e0a1ca82">allocator_type</a>{})</td></tr>
<tr class="memdesc:ad96408e8956a3457cd15d8d97708801f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an observer and connects it to a given registry. <br /></td></tr>
<tr class="separator:ad96408e8956a3457cd15d8d97708801f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87fca2a49acd1ca6c6b4253eaf3f2d4c" id="r_a87fca2a49acd1ca6c6b4253eaf3f2d4c"><td class="memItemLeft" align="right" valign="top"><a id="a87fca2a49acd1ca6c6b4253eaf3f2d4c" name="a87fca2a49acd1ca6c6b4253eaf3f2d4c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>~basic_observer</b> ()=<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">default</a></td></tr>
<tr class="memdesc:a87fca2a49acd1ca6c6b4253eaf3f2d4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor. <br /></td></tr>
<tr class="separator:a87fca2a49acd1ca6c6b4253eaf3f2d4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ff68c4fcb08832a12235b8556b4c427" id="r_a9ff68c4fcb08832a12235b8556b4c427"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9ff68c4fcb08832a12235b8556b4c427">operator=</a> (<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp;)=<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">delete</a></td></tr>
<tr class="memdesc:a9ff68c4fcb08832a12235b8556b4c427"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default copy assignment operator, deleted on purpose. <br /></td></tr>
<tr class="separator:a9ff68c4fcb08832a12235b8556b4c427"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67ef87b4649db8258a79daa58b154199" id="r_a67ef87b4649db8258a79daa58b154199"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a67ef87b4649db8258a79daa58b154199">operator=</a> (<a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp;&amp;)=<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">delete</a></td></tr>
<tr class="memdesc:a67ef87b4649db8258a79daa58b154199"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move assignment operator, deleted on purpose. <br /></td></tr>
<tr class="separator:a67ef87b4649db8258a79daa58b154199"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55539384374b885ab505db2ce22f75a1" id="r_a55539384374b885ab505db2ce22f75a1"><td class="memTemplParams" colspan="2">template&lt;typename... Matcher&gt; </td></tr>
<tr class="memitem:a55539384374b885ab505db2ce22f75a1"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a55539384374b885ab505db2ce22f75a1">connect</a> (<a class="el" href="#a49cd0f73cfb9e61aaaaa32eee4a82da4">registry_type</a> &amp;reg, <a class="el" href="structentt_1_1basic__collector.html">basic_collector</a>&lt; Matcher... &gt;)</td></tr>
<tr class="memdesc:a55539384374b885ab505db2ce22f75a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects an observer to a given registry. <br /></td></tr>
<tr class="separator:a55539384374b885ab505db2ce22f75a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65e696dc55d13d729decb03c148d715e" id="r_a65e696dc55d13d729decb03c148d715e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a65e696dc55d13d729decb03c148d715e">disconnect</a> ()</td></tr>
<tr class="memdesc:a65e696dc55d13d729decb03c148d715e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects an observer from the registry it keeps track of. <br /></td></tr>
<tr class="separator:a65e696dc55d13d729decb03c148d715e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4173fd7ce6c1f3b8904edde0ab64d45" id="r_ad4173fd7ce6c1f3b8904edde0ab64d45"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#ac9562e2ac15362056e582fe515126df2">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad4173fd7ce6c1f3b8904edde0ab64d45">size</a> () <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></td></tr>
<tr class="memdesc:ad4173fd7ce6c1f3b8904edde0ab64d45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of elements in an observer. <br /></td></tr>
<tr class="separator:ad4173fd7ce6c1f3b8904edde0ab64d45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cf971c812b07c963b637950525102a6" id="r_a0cf971c812b07c963b637950525102a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0cf971c812b07c963b637950525102a6">empty</a> () <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></td></tr>
<tr class="memdesc:a0cf971c812b07c963b637950525102a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether an observer is empty. <br /></td></tr>
<tr class="separator:a0cf971c812b07c963b637950525102a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad7d57a9b49d70b14b198369f2513a6e" id="r_aad7d57a9b49d70b14b198369f2513a6e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="#a492baa27b5e13ea8759badc5b5681853">entity_type</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aad7d57a9b49d70b14b198369f2513a6e">data</a> () <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></td></tr>
<tr class="memdesc:aad7d57a9b49d70b14b198369f2513a6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Direct access to the list of entities of the observer. <br /></td></tr>
<tr class="separator:aad7d57a9b49d70b14b198369f2513a6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f45d53397463edffae83b5dbda358ef" id="r_a3f45d53397463edffae83b5dbda358ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a263f1e60f3662e09f5e3c734c1e9c86e">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3f45d53397463edffae83b5dbda358ef">begin</a> () <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></td></tr>
<tr class="memdesc:a3f45d53397463edffae83b5dbda358ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the first entity of the observer. <br /></td></tr>
<tr class="separator:a3f45d53397463edffae83b5dbda358ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97c58c5a50dcb836bcb037a23522ec61" id="r_a97c58c5a50dcb836bcb037a23522ec61"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a263f1e60f3662e09f5e3c734c1e9c86e">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a97c58c5a50dcb836bcb037a23522ec61">end</a> () <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></td></tr>
<tr class="memdesc:a97c58c5a50dcb836bcb037a23522ec61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator that is past the last entity of the observer. <br /></td></tr>
<tr class="separator:a97c58c5a50dcb836bcb037a23522ec61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b5f3a90bc4fb1683bb9953a3f7fbaa3" id="r_a3b5f3a90bc4fb1683bb9953a3f7fbaa3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3b5f3a90bc4fb1683bb9953a3f7fbaa3">clear</a> () <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">noexcept</a></td></tr>
<tr class="memdesc:a3b5f3a90bc4fb1683bb9953a3f7fbaa3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the underlying container. <br /></td></tr>
<tr class="separator:a3b5f3a90bc4fb1683bb9953a3f7fbaa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9295584ca9f399bdc9bd0934ed66ae00" id="r_a9295584ca9f399bdc9bd0934ed66ae00"><td class="memTemplParams" colspan="2">template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Func &gt; </td></tr>
<tr class="memitem:a9295584ca9f399bdc9bd0934ed66ae00"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a9295584ca9f399bdc9bd0934ed66ae00">each</a> (Func func) <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a></td></tr>
<tr class="memdesc:a9295584ca9f399bdc9bd0934ed66ae00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and applies the given function object to them. <br /></td></tr>
<tr class="separator:a9295584ca9f399bdc9bd0934ed66ae00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e153e66abae9eab2af3c3775127bab9" id="r_a7e153e66abae9eab2af3c3775127bab9"><td class="memTemplParams" colspan="2">template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Func &gt; </td></tr>
<tr class="memitem:a7e153e66abae9eab2af3c3775127bab9"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a7e153e66abae9eab2af3c3775127bab9">each</a> (Func func)</td></tr>
<tr class="memdesc:a7e153e66abae9eab2af3c3775127bab9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates entities and applies the given function object to them, then clears the observer. <br /></td></tr>
<tr class="separator:a7e153e66abae9eab2af3c3775127bab9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator&gt;<br />
class entt::basic_observer&lt; Registry, Allocator &gt;</div><p>Observer. </p>
<p>An observer returns all the entities and only the entities that fit the requirements of at least one matcher. Moreover, it's guaranteed that the entity list is tightly packed in memory for fast iterations.<br />
In general, observers don't stay true to the order of any set of elements.</p>
<p>Observers work mainly with two types of matchers, provided through a collector:</p>
<ul>
<li>Observing matcher: an observer will return at least all the living entities for which one or more of the given elements have been updated and not yet destroyed.</li>
<li>Grouping matcher: an observer will return at least all the living entities that would have entered the given group if it existed and that would have not yet left it.</li>
</ul>
<p>If an entity respects the requirements of multiple matchers, it will be returned once and only once by the observer in any case.</p>
<p>Matchers support also filtering by means of a <em>where</em> clause that accepts both a list of types and an exclusion list.<br />
Whenever a matcher finds that an entity matches its requirements, the condition of the filter is verified before to register the entity itself. Moreover, a registered entity isn't returned by the observer if the condition set by the filter is broken in the meantime.</p>
<p><b>Important</b> </p>
<p>Iterators aren't invalidated if:</p>
<ul>
<li>New instances of the given elements are created and assigned to entities.</li>
<li>The entity currently pointed is modified (as an example, if one of the given elements 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 elements in any way invalidates all the iterators.</p>
<dl class="section warning"><dt>Warning</dt><dd>Lifetime of an observer doesn't necessarily have to overcome that of the registry to which it is connected. However, the observer must be disconnected from the registry before being destroyed to avoid crashes due to dangling pointers.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Registry</td><td>Basic registry type. </td></tr>
<tr><td class="paramname">Allocator</td><td>Type of allocator used to manage memory and elements. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00160">160</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="afdf0a672324b06f59cbf9621e0a1ca82" name="afdf0a672324b06f59cbf9621e0a1ca82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdf0a672324b06f59cbf9621e0a1ca82">&#9670;&#160;</a></span>allocator_type</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::allocator_type = Allocator</td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocator type. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00257">257</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a492baa27b5e13ea8759badc5b5681853" name="a492baa27b5e13ea8759badc5b5681853"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a492baa27b5e13ea8759badc5b5681853">&#9670;&#160;</a></span>entity_type</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::entity_type = <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> registry_type::entity_type</td>
</tr>
</table>
</div><div class="memdoc">
<p>Underlying entity identifier. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00261">261</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a263f1e60f3662e09f5e3c734c1e9c86e" name="a263f1e60f3662e09f5e3c734c1e9c86e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a263f1e60f3662e09f5e3c734c1e9c86e">&#9670;&#160;</a></span>iterator</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::iterator = <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> registry_type::common_type::iterator</td>
</tr>
</table>
</div><div class="memdoc">
<p>Random access iterator type. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00265">265</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a49cd0f73cfb9e61aaaaa32eee4a82da4" name="a49cd0f73cfb9e61aaaaa32eee4a82da4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49cd0f73cfb9e61aaaaa32eee4a82da4">&#9670;&#160;</a></span>registry_type</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::registry_type = <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Basic registry type. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00259">259</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="ac9562e2ac15362056e582fe515126df2" name="ac9562e2ac15362056e582fe515126df2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9562e2ac15362056e582fe515126df2">&#9670;&#160;</a></span>size_type</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">using</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::size_type = std::size_t</td>
</tr>
</table>
</div><div class="memdoc">
<p>Unsigned integer type. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00263">263</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a31dba068369fa37f15ff120d6cdbdec1" name="a31dba068369fa37f15ff120d6cdbdec1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31dba068369fa37f15ff120d6cdbdec1">&#9670;&#160;</a></span>basic_observer() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::basic_observer </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></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>Default constructor. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00268">268</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a604a9b0d192dd468d2c019ebc92bd17a" name="a604a9b0d192dd468d2c019ebc92bd17a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a604a9b0d192dd468d2c019ebc92bd17a">&#9670;&#160;</a></span>basic_observer() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::basic_observer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="#afdf0a672324b06f59cbf9621e0a1ca82">allocator_type</a> &amp;</td> <td class="paramname"><span class="paramname"><em>allocator</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs an empty storage with a given allocator. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">allocator</td><td>The allocator to use. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00275">275</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="ad96408e8956a3457cd15d8d97708801f" name="ad96408e8956a3457cd15d8d97708801f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad96408e8956a3457cd15d8d97708801f">&#9670;&#160;</a></span>basic_observer() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<div class="memtemplate">
template&lt;typename... Matcher&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::basic_observer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="#a49cd0f73cfb9e61aaaaa32eee4a82da4">registry_type</a> &amp;</td> <td class="paramname"><span class="paramname"><em>reg</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structentt_1_1basic__collector.html">basic_collector</a>&lt; Matcher... &gt;</td> <td class="paramname"><span class="paramname">, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="#afdf0a672324b06f59cbf9621e0a1ca82">allocator_type</a> &amp;</td> <td class="paramname"><span class="paramname"><em>allocator</em><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="#afdf0a672324b06f59cbf9621e0a1ca82">allocator_type</a>{}</span></span>&#160;)</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>Creates an observer and connects it to a given registry. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Matcher</td><td>Types of matchers to use to initialize the observer. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">reg</td><td>A valid reference to a registry. </td></tr>
<tr><td class="paramname">allocator</td><td>The allocator to use. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00293">293</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3f45d53397463edffae83b5dbda358ef" name="a3f45d53397463edffae83b5dbda358ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f45d53397463edffae83b5dbda358ef">&#9670;&#160;</a></span>begin()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="#a263f1e60f3662e09f5e3c734c1e9c86e">iterator</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::begin </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the first entity of the observer. </p>
<p>If the observer is empty, the returned iterator will be equal to <code><a class="el" href="#a97c58c5a50dcb836bcb037a23522ec61" title="Returns an iterator that is past the last entity of the observer.">end()</a></code>.</p>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the first entity of the observer. </dd></dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00377">377</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a3b5f3a90bc4fb1683bb9953a3f7fbaa3" name="a3b5f3a90bc4fb1683bb9953a3f7fbaa3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b5f3a90bc4fb1683bb9953a3f7fbaa3">&#9670;&#160;</a></span>clear()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::clear </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the underlying container. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00391">391</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a55539384374b885ab505db2ce22f75a1" name="a55539384374b885ab505db2ce22f75a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55539384374b885ab505db2ce22f75a1">&#9670;&#160;</a></span>connect()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<div class="memtemplate">
template&lt;typename... Matcher&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::connect </td>
<td>(</td>
<td class="paramtype"><a class="el" href="#a49cd0f73cfb9e61aaaaa32eee4a82da4">registry_type</a> &amp;</td> <td class="paramname"><span class="paramname"><em>reg</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structentt_1_1basic__collector.html">basic_collector</a>&lt; Matcher... &gt;</td> <td class="paramname"><span class="paramname"></span>&#160;)</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>Connects an observer to a given registry. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Matcher</td><td>Types of matchers to use to initialize the observer. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">reg</td><td>A valid reference to a registry. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00321">321</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="aad7d57a9b49d70b14b198369f2513a6e" name="aad7d57a9b49d70b14b198369f2513a6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad7d57a9b49d70b14b198369f2513a6e">&#9670;&#160;</a></span>data()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="#a492baa27b5e13ea8759badc5b5681853">entity_type</a> * <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::data </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Direct access to the list of entities of the observer. </p>
<p>The returned pointer is such that range <code>[<a class="el" href="#aad7d57a9b49d70b14b198369f2513a6e" title="Direct access to the list of entities of the observer.">data()</a>, <a class="el" href="#aad7d57a9b49d70b14b198369f2513a6e" title="Direct access to the list of entities of the observer.">data()</a> + <a class="el" href="#ad4173fd7ce6c1f3b8904edde0ab64d45" title="Returns the number of elements in an observer.">size()</a>)</code> is always a valid range, even if the container is empty.</p>
<dl class="section note"><dt>Note</dt><dd>Entities are in the reverse order as returned by the <code>begin</code>/<code>end</code> iterators.</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="observer_8hpp_source.html#l00366">366</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a65e696dc55d13d729decb03c148d715e" name="a65e696dc55d13d729decb03c148d715e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65e696dc55d13d729decb03c148d715e">&#9670;&#160;</a></span>disconnect()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::disconnect </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></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>Disconnects an observer from the registry it keeps track of. </p>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00331">331</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a7e153e66abae9eab2af3c3775127bab9" name="a7e153e66abae9eab2af3c3775127bab9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e153e66abae9eab2af3c3775127bab9">&#9670;&#160;</a></span>each() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Func &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::each </td>
<td>(</td>
<td class="paramtype">Func</td> <td class="paramname"><span class="paramname"><em>func</em></span></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 applies the given function object to them, then clears the observer. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#a9295584ca9f399bdc9bd0934ed66ae00" title="Iterates entities 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="observer_8hpp_source.html#l00425">425</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a9295584ca9f399bdc9bd0934ed66ae00" name="a9295584ca9f399bdc9bd0934ed66ae00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9295584ca9f399bdc9bd0934ed66ae00">&#9670;&#160;</a></span>each() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Func &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::each </td>
<td>(</td>
<td class="paramtype">Func</td> <td class="paramname"><span class="paramname"><em>func</em></span></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 applies the given function object to them. </p>
<p>The function object is invoked for each entity.<br />
The signature of the function must be equivalent to the following form:</p>
<div class="fragment"><div class="line"><a class="code hl_function" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">void</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="#a492baa27b5e13ea8759badc5b5681853">entity_type</a>);</div>
<div class="ttc" id="aclassentt_1_1basic__observer_html_a492baa27b5e13ea8759badc5b5681853"><div class="ttname"><a href="#a492baa27b5e13ea8759badc5b5681853">entt::basic_observer::entity_type</a></div><div class="ttdeci">typename registry_type::entity_type entity_type</div><div class="ttdoc">Underlying entity identifier.</div><div class="ttdef"><b>Definition</b> <a href="observer_8hpp_source.html#l00261">observer.hpp:261</a></div></div>
<div class="ttc" id="anamespaceentt_html_a12e4d0c58f9c4cc6f5513c39c530b9b7"><div class="ttname"><a href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">entt::make_obj_using_allocator</a></div><div class="ttdeci">constexpr Type make_obj_using_allocator(const Allocator &amp;allocator, Args &amp;&amp;...args)</div><div class="ttdoc">Uses-allocator construction utility (waiting for C++20).</div><div class="ttdef"><b>Definition</b> <a href="memory_8hpp_source.html#l00219">memory.hpp:219</a></div></div>
</div><!-- 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="observer_8hpp_source.html#l00409">409</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a0cf971c812b07c963b637950525102a6" name="a0cf971c812b07c963b637950525102a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0cf971c812b07c963b637950525102a6">&#9670;&#160;</a></span>empty()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">bool</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::empty </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether an observer is empty. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the observer is empty, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00350">350</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a97c58c5a50dcb836bcb037a23522ec61" name="a97c58c5a50dcb836bcb037a23522ec61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97c58c5a50dcb836bcb037a23522ec61">&#9670;&#160;</a></span>end()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="#a263f1e60f3662e09f5e3c734c1e9c86e">iterator</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::end </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator that is past the last entity of the observer. </p>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the entity following the last entity of the observer. </dd></dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00386">386</a> of file <a class="el" href="observer_8hpp_source.html">observer.hpp</a>.</p>
</div>
</div>
<a id="a67ef87b4649db8258a79daa58b154199" name="a67ef87b4649db8258a79daa58b154199"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67ef87b4649db8258a79daa58b154199">&#9670;&#160;</a></span>operator=() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp; <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">::operator</a>= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classentt_1_1basic__observer.html">basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt; &amp;&amp;</td> <td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default move assignment operator, deleted on purpose. </p>
<dl class="section return"><dt>Returns</dt><dd>This observer. </dd></dl>
</div>
</div>
<a id="a9ff68c4fcb08832a12235b8556b4c427" name="a9ff68c4fcb08832a12235b8556b4c427"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ff68c4fcb08832a12235b8556b4c427">&#9670;&#160;</a></span>operator=() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__observer.html">basic_observer</a> &amp; <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">::operator</a>= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">const</a> <a class="el" href="classentt_1_1basic__observer.html">basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt; &amp;</td> <td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default copy assignment operator, deleted on purpose. </p>
<dl class="section return"><dt>Returns</dt><dd>This observer. </dd></dl>
</div>
</div>
<a id="ad4173fd7ce6c1f3b8904edde0ab64d45" name="ad4173fd7ce6c1f3b8904edde0ab64d45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4173fd7ce6c1f3b8904edde0ab64d45">&#9670;&#160;</a></span>size()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a> , <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">typename</a> Allocator &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="#ac9562e2ac15362056e582fe515126df2">size_type</a> <a class="el" href="classentt_1_1basic__observer.html">entt::basic_observer</a>&lt; <a class="el" href="namespaceentt.html#a12e4d0c58f9c4cc6f5513c39c530b9b7">Registry</a>, Allocator &gt;::size </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of elements in an observer. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of elements. </dd></dl>
<p class="definition">Definition at line <a class="el" href="observer_8hpp_source.html#l00342">342</a> of file <a class="el" href="observer_8hpp_source.html">observer.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="observer_8hpp_source.html">observer.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
</small></address>
</body>
</html>