Files
entt/classentt_1_1basic__snapshot.html
2021-01-09 18:58:42 +01:00

377 lines
20 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">
<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.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EnTT: entt::basic_snapshot&lt; Entity &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">EnTT
&#160;<span id="projectnumber">3.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceentt.html">entt</a></li><li class="navelem"><a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</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__snapshot-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">entt::basic_snapshot&lt; Entity &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Utility class to create snapshots from a registry.
<a href="classentt_1_1basic__snapshot.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="snapshot_8hpp_source.html">snapshot.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aeb9724b67563bf7f74440e5a8feb711c"><td class="memItemLeft" align="right" valign="top"><a id="aeb9724b67563bf7f74440e5a8feb711c"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__snapshot.html#aeb9724b67563bf7f74440e5a8feb711c">entity_type</a> = Entity</td></tr>
<tr class="memdesc:aeb9724b67563bf7f74440e5a8feb711c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Underlying entity identifier. <br /></td></tr>
<tr class="separator:aeb9724b67563bf7f74440e5a8feb711c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aff1115b349483d09d10fa4054e458e5e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__snapshot.html#aff1115b349483d09d10fa4054e458e5e">basic_snapshot</a> (const <a class="el" href="classentt_1_1basic__registry.html">basic_registry</a>&lt; <a class="el" href="classentt_1_1basic__snapshot.html#aeb9724b67563bf7f74440e5a8feb711c">entity_type</a> &gt; &amp;source) noexcept</td></tr>
<tr class="memdesc:aff1115b349483d09d10fa4054e458e5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an instance that is bound to a given registry. <a href="classentt_1_1basic__snapshot.html#aff1115b349483d09d10fa4054e458e5e">More...</a><br /></td></tr>
<tr class="separator:aff1115b349483d09d10fa4054e458e5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10f658d8e4feb7df9da8b48119551334"><td class="memItemLeft" align="right" valign="top"><a id="a10f658d8e4feb7df9da8b48119551334"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__snapshot.html#a10f658d8e4feb7df9da8b48119551334">basic_snapshot</a> (<a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a10f658d8e4feb7df9da8b48119551334"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move constructor. <br /></td></tr>
<tr class="separator:a10f658d8e4feb7df9da8b48119551334"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1484b609195cfd057bbdd8808d4392bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__snapshot.html#a1484b609195cfd057bbdd8808d4392bc">operator=</a> (<a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a1484b609195cfd057bbdd8808d4392bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move assignment operator. <a href="classentt_1_1basic__snapshot.html#a1484b609195cfd057bbdd8808d4392bc">More...</a><br /></td></tr>
<tr class="separator:a1484b609195cfd057bbdd8808d4392bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79fe1641f3b448b37b8aecfcabf52a5e"><td class="memTemplParams" colspan="2">template&lt;typename Archive &gt; </td></tr>
<tr class="memitem:a79fe1641f3b448b37b8aecfcabf52a5e"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__snapshot.html#a79fe1641f3b448b37b8aecfcabf52a5e">entities</a> (Archive &amp;archive) const</td></tr>
<tr class="memdesc:a79fe1641f3b448b37b8aecfcabf52a5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Puts aside all the entities from the underlying registry. <a href="classentt_1_1basic__snapshot.html#a79fe1641f3b448b37b8aecfcabf52a5e">More...</a><br /></td></tr>
<tr class="separator:a79fe1641f3b448b37b8aecfcabf52a5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59cf70d5b7730d388f3a63845e8faede"><td class="memTemplParams" colspan="2">template&lt;typename... Component, typename Archive &gt; </td></tr>
<tr class="memitem:a59cf70d5b7730d388f3a63845e8faede"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__snapshot.html#a59cf70d5b7730d388f3a63845e8faede">component</a> (Archive &amp;archive) const</td></tr>
<tr class="memdesc:a59cf70d5b7730d388f3a63845e8faede"><td class="mdescLeft">&#160;</td><td class="mdescRight">Puts aside the given components. <a href="classentt_1_1basic__snapshot.html#a59cf70d5b7730d388f3a63845e8faede">More...</a><br /></td></tr>
<tr class="separator:a59cf70d5b7730d388f3a63845e8faede"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05fff12a4af42f0ad77dc4893856772c"><td class="memTemplParams" colspan="2">template&lt;typename... Component, typename Archive , typename It &gt; </td></tr>
<tr class="memitem:a05fff12a4af42f0ad77dc4893856772c"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__snapshot.html#a05fff12a4af42f0ad77dc4893856772c">component</a> (Archive &amp;archive, It first, It last) const</td></tr>
<tr class="memdesc:a05fff12a4af42f0ad77dc4893856772c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Puts aside the given components for the entities in a range. <a href="classentt_1_1basic__snapshot.html#a05fff12a4af42f0ad77dc4893856772c">More...</a><br /></td></tr>
<tr class="separator:a05fff12a4af42f0ad77dc4893856772c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename Entity&gt;<br />
class entt::basic_snapshot&lt; Entity &gt;</h3>
<p>Utility class to create snapshots from a registry. </p>
<p>A <em>snapshot</em> can be either a dump of the entire registry or a narrower selection of components of interest.<br />
This type can be used in both cases if provided with a correctly configured output archive.</p>
<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>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="snapshot_8hpp_source.html#l00034">34</a> of file <a class="el" href="snapshot_8hpp_source.html">snapshot.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aff1115b349483d09d10fa4054e458e5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff1115b349483d09d10fa4054e458e5e">&#9670;&nbsp;</a></span>basic_snapshot()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__snapshot.html">entt::basic_snapshot</a>&lt; Entity &gt;::<a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classentt_1_1basic__registry.html">basic_registry</a>&lt; <a class="el" href="classentt_1_1basic__snapshot.html#aeb9724b67563bf7f74440e5a8feb711c">entity_type</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>source</em></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>Constructs an instance that is bound to a given registry. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">source</td><td>A valid reference to a registry. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="snapshot_8hpp_source.html#l00072">72</a> of file <a class="el" href="snapshot_8hpp_source.html">snapshot.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a59cf70d5b7730d388f3a63845e8faede"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59cf70d5b7730d388f3a63845e8faede">&#9670;&nbsp;</a></span>component() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity &gt; </div>
<div class="memtemplate">
template&lt;typename... Component, typename Archive &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a>&amp; <a class="el" href="classentt_1_1basic__snapshot.html">entt::basic_snapshot</a>&lt; Entity &gt;::component </td>
<td>(</td>
<td class="paramtype">Archive &amp;&#160;</td>
<td class="paramname"><em>archive</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>Puts aside the given components. </p>
<p>Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Component</td><td>Types of components to serialize. </td></tr>
<tr><td class="paramname">Archive</td><td>Type of output archive. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">archive</td><td>A valid reference to an output archive. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An object of this type to continue creating the snapshot. </dd></dl>
<p class="definition">Definition at line <a class="el" href="snapshot_8hpp_source.html#l00119">119</a> of file <a class="el" href="snapshot_8hpp_source.html">snapshot.hpp</a>.</p>
</div>
</div>
<a id="a05fff12a4af42f0ad77dc4893856772c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05fff12a4af42f0ad77dc4893856772c">&#9670;&nbsp;</a></span>component() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity &gt; </div>
<div class="memtemplate">
template&lt;typename... Component, typename Archive , typename It &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a>&amp; <a class="el" href="classentt_1_1basic__snapshot.html">entt::basic_snapshot</a>&lt; Entity &gt;::component </td>
<td>(</td>
<td class="paramtype">Archive &amp;&#160;</td>
<td class="paramname"><em>archive</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">It&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">It&#160;</td>
<td class="paramname"><em>last</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Puts aside the given components for the entities in a range. </p>
<p>Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Component</td><td>Types of components to serialize. </td></tr>
<tr><td class="paramname">Archive</td><td>Type of output archive. </td></tr>
<tr><td class="paramname">It</td><td>Type of input iterator. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">archive</td><td>A valid reference to an output archive. </td></tr>
<tr><td class="paramname">first</td><td>An iterator to the first element of the range to serialize. </td></tr>
<tr><td class="paramname">last</td><td>An iterator past the last element of the range to serialize. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An object of this type to continue creating the snapshot. </dd></dl>
<p class="definition">Definition at line <a class="el" href="snapshot_8hpp_source.html#l00139">139</a> of file <a class="el" href="snapshot_8hpp_source.html">snapshot.hpp</a>.</p>
</div>
</div>
<a id="a79fe1641f3b448b37b8aecfcabf52a5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79fe1641f3b448b37b8aecfcabf52a5e">&#9670;&nbsp;</a></span>entities()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity &gt; </div>
<div class="memtemplate">
template&lt;typename Archive &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a>&amp; <a class="el" href="classentt_1_1basic__snapshot.html">entt::basic_snapshot</a>&lt; Entity &gt;::entities </td>
<td>(</td>
<td class="paramtype">Archive &amp;&#160;</td>
<td class="paramname"><em>archive</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>Puts aside all the entities from the underlying registry. </p>
<p>Entities are serialized along with their versions. Destroyed entities are taken in consideration as well by this function.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Archive</td><td>Type of output archive. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">archive</td><td>A valid reference to an output archive. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An object of this type to continue creating the snapshot. </dd></dl>
<p class="definition">Definition at line <a class="el" href="snapshot_8hpp_source.html#l00093">93</a> of file <a class="el" href="snapshot_8hpp_source.html">snapshot.hpp</a>.</p>
</div>
</div>
<a id="a1484b609195cfd057bbdd8808d4392bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1484b609195cfd057bbdd8808d4392bc">&#9670;&nbsp;</a></span>operator=()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Entity &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a>&amp; <a class="el" href="classentt_1_1basic__snapshot.html">entt::basic_snapshot</a>&lt; Entity &gt;::operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classentt_1_1basic__snapshot.html">basic_snapshot</a>&lt; Entity &gt; &amp;&amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default move assignment operator. </p>
<dl class="section return"><dt>Returns</dt><dd>This snapshot. </dd></dl>
</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="snapshot_8hpp_source.html">snapshot.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>