Files
entt/classentt_1_1Identifier.html
2018-07-10 16:37:27 +02:00

162 lines
8.7 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::Identifier&lt; Types &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">entt
&#160;<span id="projectnumber">2.7.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceentt.html">entt</a></li><li class="navelem"><a class="el" href="classentt_1_1Identifier.html">Identifier</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classentt_1_1Identifier-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">entt::Identifier&lt; Types &gt; Class Template Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Types identifiers.
<a href="classentt_1_1Identifier.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="ident_8hpp_source.html">ident.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:a80c4fd9773928949e788790fac671169"><td class="memItemLeft" align="right" valign="top"><a id="a80c4fd9773928949e788790fac671169"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1Identifier.html#a80c4fd9773928949e788790fac671169">identifier_type</a> = std::size_t</td></tr>
<tr class="memdesc:a80c4fd9773928949e788790fac671169"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsigned integer type. <br /></td></tr>
<tr class="separator:a80c4fd9773928949e788790fac671169"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aed05b85b75f2b0646e007f156e43ca6a"><td class="memTemplParams" colspan="2">template&lt;typename Type &gt; </td></tr>
<tr class="memitem:aed05b85b75f2b0646e007f156e43ca6a"><td class="memTemplItemLeft" align="right" valign="top">static constexpr <a class="el" href="classentt_1_1Identifier.html#a80c4fd9773928949e788790fac671169">identifier_type</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1Identifier.html#aed05b85b75f2b0646e007f156e43ca6a">get</a> () ENTT_NOEXCEPT</td></tr>
<tr class="memdesc:aed05b85b75f2b0646e007f156e43ca6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the identifier associated with a given type. <a href="#aed05b85b75f2b0646e007f156e43ca6a">More...</a><br /></td></tr>
<tr class="separator:aed05b85b75f2b0646e007f156e43ca6a"><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... Types&gt;<br />
class entt::Identifier&lt; Types &gt;</h3>
<p>Types identifiers. </p>
<p>Variable template used to generate identifiers at compile-time for the given types. Use the <code>get</code> member function to know what's the identifier associated to the specific type.</p>
<dl class="section note"><dt>Note</dt><dd>Identifiers are constant expression and can be used in any context where such an expression is required. As an example: <div class="fragment"><div class="line"><span class="keyword">using</span> ID = <a class="code" href="classentt_1_1Identifier.html">entt::Identifier&lt;AType, AnotherType&gt;</a>;</div><div class="line"></div><div class="line"><span class="keywordflow">switch</span>(aTypeIdentifier) {</div><div class="line"><span class="keywordflow">case</span> ID::get&lt;AType&gt;():</div><div class="line"> <span class="comment">// ...</span></div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"><span class="keywordflow">case</span> ID::get&lt;AnotherType&gt;():</div><div class="line"> <span class="comment">// ...</span></div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"><span class="keywordflow">default</span>:</div><div class="line"> <span class="comment">// ...</span></div><div class="line">}</div></div><!-- fragment --></dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Types</td><td>List of types for which to generate identifiers. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="ident_8hpp_source.html#l00071">71</a> of file <a class="el" href="ident_8hpp_source.html">ident.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aed05b85b75f2b0646e007f156e43ca6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed05b85b75f2b0646e007f156e43ca6a">&#9670;&nbsp;</a></span>get()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename... Types&gt; </div>
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static constexpr <a class="el" href="classentt_1_1Identifier.html#a80c4fd9773928949e788790fac671169">identifier_type</a> <a class="el" href="classentt_1_1Identifier.html">entt::Identifier</a>&lt; Types &gt;::get </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 class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the identifier associated with a given type. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Type</td><td>of which to return the identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The identifier associated with the given type. </dd></dl>
<p class="definition">Definition at line <a class="el" href="ident_8hpp_source.html#l00095">95</a> of file <a class="el" href="ident_8hpp_source.html">ident.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/entt/core/<a class="el" href="ident_8hpp_source.html">ident.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>