517 lines
31 KiB
HTML
517 lines
31 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.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>EnTT: entt::basic_hashed_string< Char > 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">3.9.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'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:cf05388f2679ee054f2beb29a391d25f4e673ac3&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__hashed__string.html">basic_hashed_string</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="#pub-static-methods">Static Public Member Functions</a> |
|
|
<a href="classentt_1_1basic__hashed__string-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">entt::basic_hashed_string< Char > Class Template Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Zero overhead unique identifier.
|
|
<a href="classentt_1_1basic__hashed__string.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="hashed__string_8hpp_source.html">hashed_string.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:ad4e8f181e92b9218747ac43fe24c4cbc"><td class="memItemLeft" align="right" valign="top"><a id="ad4e8f181e92b9218747ac43fe24c4cbc"></a>
|
|
using </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a> = Char</td></tr>
|
|
<tr class="memdesc:ad4e8f181e92b9218747ac43fe24c4cbc"><td class="mdescLeft"> </td><td class="mdescRight">Character type. <br /></td></tr>
|
|
<tr class="separator:ad4e8f181e92b9218747ac43fe24c4cbc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1631b1f6ecd56a451366eeb228a6ffb9"><td class="memItemLeft" align="right" valign="top"><a id="a1631b1f6ecd56a451366eeb228a6ffb9"></a>
|
|
using </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> = <a class="el" href="namespaceentt.html#a13e040e7b38a8f86d1ab2f096f37b627">id_type</a></td></tr>
|
|
<tr class="memdesc:a1631b1f6ecd56a451366eeb228a6ffb9"><td class="mdescLeft"> </td><td class="mdescRight">Unsigned integer type. <br /></td></tr>
|
|
<tr class="separator:a1631b1f6ecd56a451366eeb228a6ffb9"><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:aa8b2ea90ba4d1bbb98d485f6a93e574e"><td class="memItemLeft" align="right" valign="top"><a id="aa8b2ea90ba4d1bbb98d485f6a93e574e"></a>
|
|
constexpr </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#aa8b2ea90ba4d1bbb98d485f6a93e574e">basic_hashed_string</a> ()</td></tr>
|
|
<tr class="memdesc:aa8b2ea90ba4d1bbb98d485f6a93e574e"><td class="mdescLeft"> </td><td class="mdescRight">Constructs an empty hashed string. <br /></td></tr>
|
|
<tr class="separator:aa8b2ea90ba4d1bbb98d485f6a93e574e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0b0454a742c7556c805e79fc19b556dd"><td class="memTemplParams" colspan="2">template<std::size_t N> </td></tr>
|
|
<tr class="memitem:a0b0454a742c7556c805e79fc19b556dd"><td class="memTemplItemLeft" align="right" valign="top">constexpr </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a0b0454a742c7556c805e79fc19b556dd">basic_hashed_string</a> (const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a>(&curr)[N])</td></tr>
|
|
<tr class="memdesc:a0b0454a742c7556c805e79fc19b556dd"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a hashed string from an array of const characters. <a href="classentt_1_1basic__hashed__string.html#a0b0454a742c7556c805e79fc19b556dd">More...</a><br /></td></tr>
|
|
<tr class="separator:a0b0454a742c7556c805e79fc19b556dd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a564f57a39d02f5b94fa76a5ecf143299"><td class="memItemLeft" align="right" valign="top">constexpr </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a564f57a39d02f5b94fa76a5ecf143299">basic_hashed_string</a> (const_wrapper wrapper)</td></tr>
|
|
<tr class="memdesc:a564f57a39d02f5b94fa76a5ecf143299"><td class="mdescLeft"> </td><td class="mdescRight">Explicit constructor on purpose to avoid constructing a hashed string directly from a <code>const value_type *</code>. <a href="classentt_1_1basic__hashed__string.html#a564f57a39d02f5b94fa76a5ecf143299">More...</a><br /></td></tr>
|
|
<tr class="separator:a564f57a39d02f5b94fa76a5ecf143299"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2019106a9113950a488f43feaaa57ccc"><td class="memItemLeft" align="right" valign="top">constexpr const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a2019106a9113950a488f43feaaa57ccc">data</a> () const</td></tr>
|
|
<tr class="memdesc:a2019106a9113950a488f43feaaa57ccc"><td class="mdescLeft"> </td><td class="mdescRight">Returns the human-readable representation of a hashed string. <a href="classentt_1_1basic__hashed__string.html#a2019106a9113950a488f43feaaa57ccc">More...</a><br /></td></tr>
|
|
<tr class="separator:a2019106a9113950a488f43feaaa57ccc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a40f85633eba5321389c5ceea4d19cebc"><td class="memItemLeft" align="right" valign="top">constexpr <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a40f85633eba5321389c5ceea4d19cebc">value</a> () const</td></tr>
|
|
<tr class="memdesc:a40f85633eba5321389c5ceea4d19cebc"><td class="mdescLeft"> </td><td class="mdescRight">Returns the numeric representation of a hashed string. <a href="classentt_1_1basic__hashed__string.html#a40f85633eba5321389c5ceea4d19cebc">More...</a><br /></td></tr>
|
|
<tr class="separator:a40f85633eba5321389c5ceea4d19cebc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa9ade09d3f55abe5bbae3438331aa7a2"><td class="memItemLeft" align="right" valign="top">constexpr </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#aa9ade09d3f55abe5bbae3438331aa7a2">operator const value_type *</a> () const</td></tr>
|
|
<tr class="memdesc:aa9ade09d3f55abe5bbae3438331aa7a2"><td class="mdescLeft"> </td><td class="mdescRight">Returns the human-readable representation of a hashed string. <a href="classentt_1_1basic__hashed__string.html#aa9ade09d3f55abe5bbae3438331aa7a2">More...</a><br /></td></tr>
|
|
<tr class="separator:aa9ade09d3f55abe5bbae3438331aa7a2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a342323328cacb574f886a5720dd71580"><td class="memItemLeft" align="right" valign="top">constexpr </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a342323328cacb574f886a5720dd71580">operator hash_type</a> () const</td></tr>
|
|
<tr class="memdesc:a342323328cacb574f886a5720dd71580"><td class="mdescLeft"> </td><td class="mdescRight">Returns the numeric representation of a hashed string. <a href="classentt_1_1basic__hashed__string.html#a342323328cacb574f886a5720dd71580">More...</a><br /></td></tr>
|
|
<tr class="separator:a342323328cacb574f886a5720dd71580"><td class="memSeparator" colspan="2"> </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:ac592a42bf7488cbecc5a1dd74efc0815"><td class="memItemLeft" align="right" valign="top">static constexpr <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#ac592a42bf7488cbecc5a1dd74efc0815">value</a> (const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a> *str, std::size_t size)</td></tr>
|
|
<tr class="memdesc:ac592a42bf7488cbecc5a1dd74efc0815"><td class="mdescLeft"> </td><td class="mdescRight">Returns directly the numeric representation of a string view. <a href="classentt_1_1basic__hashed__string.html#ac592a42bf7488cbecc5a1dd74efc0815">More...</a><br /></td></tr>
|
|
<tr class="separator:ac592a42bf7488cbecc5a1dd74efc0815"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a63725144b0b9af67e9965ab0a60c5862"><td class="memTemplParams" colspan="2">template<std::size_t N> </td></tr>
|
|
<tr class="memitem:a63725144b0b9af67e9965ab0a60c5862"><td class="memTemplItemLeft" align="right" valign="top">static constexpr <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a63725144b0b9af67e9965ab0a60c5862">value</a> (const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a>(&str)[N])</td></tr>
|
|
<tr class="memdesc:a63725144b0b9af67e9965ab0a60c5862"><td class="mdescLeft"> </td><td class="mdescRight">Returns directly the numeric representation of a string. <a href="classentt_1_1basic__hashed__string.html#a63725144b0b9af67e9965ab0a60c5862">More...</a><br /></td></tr>
|
|
<tr class="separator:a63725144b0b9af67e9965ab0a60c5862"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a224b0f2486381e536b627bbde4de7c87"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classentt_1_1basic__hashed__string.html#a224b0f2486381e536b627bbde4de7c87">value</a> (const_wrapper wrapper)</td></tr>
|
|
<tr class="memdesc:a224b0f2486381e536b627bbde4de7c87"><td class="mdescLeft"> </td><td class="mdescRight">Returns directly the numeric representation of a string. <a href="classentt_1_1basic__hashed__string.html#a224b0f2486381e536b627bbde4de7c87">More...</a><br /></td></tr>
|
|
<tr class="separator:a224b0f2486381e536b627bbde4de7c87"><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 Char><br />
|
|
class entt::basic_hashed_string< Char ></h3>
|
|
|
|
<p>Zero overhead unique identifier. </p>
|
|
<p>A hashed string is a compile-time tool that allows users to use human-readable identifers in the codebase while using their numeric counterparts at runtime.<br />
|
|
Because of that, a hashed string can also be used in constant expressions if required.</p>
|
|
<dl class="section warning"><dt>Warning</dt><dd>This class doesn't take ownership of user-supplied strings nor does it make a copy of them.</dd></dl>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">Char</td><td>Character type. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00058">58</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a0b0454a742c7556c805e79fc19b556dd"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0b0454a742c7556c805e79fc19b556dd">◆ </a></span>basic_hashed_string() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<div class="memtemplate">
|
|
template<std::size_t N> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">constexpr <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::<a class="el" href="classentt_1_1basic__hashed__string.html">basic_hashed_string</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a>(&) </td>
|
|
<td class="paramname"><em>curr</em>[N]</td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Constructs a hashed string from an array of const characters. </p>
|
|
<p>Forcing template resolution avoids implicit conversions. An human-readable identifier can be anything but a plain, old bunch of characters.<br />
|
|
Example of use: </p><div class="fragment"><div class="line">basic_hashed_string<char> hs{<span class="stringliteral">"my.png"</span>};</div>
|
|
</div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">N</td><td>Number of characters of the identifier. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">curr</td><td>Human-readable identifer. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00145">145</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a564f57a39d02f5b94fa76a5ecf143299"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a564f57a39d02f5b94fa76a5ecf143299">◆ </a></span>basic_hashed_string() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">constexpr <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::<a class="el" href="classentt_1_1basic__hashed__string.html">basic_hashed_string</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const_wrapper </td>
|
|
<td class="paramname"><em>wrapper</em></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 class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Explicit constructor on purpose to avoid constructing a hashed string directly from a <code>const value_type *</code>. </p>
|
|
<dl class="section warning"><dt>Warning</dt><dd>The lifetime of the string is not extended nor is it copied.</dd></dl>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">wrapper</td><td>Helps achieving the purpose by relying on overloading. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00158">158</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a2019106a9113950a488f43feaaa57ccc"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2019106a9113950a488f43feaaa57ccc">◆ </a></span>data()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">constexpr const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a>* <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::data </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the human-readable representation of a hashed string. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The string used to initialize the instance. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00166">166</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa9ade09d3f55abe5bbae3438331aa7a2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa9ade09d3f55abe5bbae3438331aa7a2">◆ </a></span>operator const value_type *()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">constexpr <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::operator const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a> * </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 class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the human-readable representation of a hashed string. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The string used to initialize the instance. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00179">179</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a342323328cacb574f886a5720dd71580"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a342323328cacb574f886a5720dd71580">◆ </a></span>operator hash_type()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">constexpr <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::operator <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> </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 class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the numeric representation of a hashed string. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The numeric representation of the instance. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00187">187</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a40f85633eba5321389c5ceea4d19cebc"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a40f85633eba5321389c5ceea4d19cebc">◆ </a></span>value() <span class="overload">[1/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">constexpr <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::value </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 class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the numeric representation of a hashed string. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The numeric representation of the instance. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00174">174</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac592a42bf7488cbecc5a1dd74efc0815"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac592a42bf7488cbecc5a1dd74efc0815">◆ </a></span>value() <span class="overload">[2/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static constexpr <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::value </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a> * </td>
|
|
<td class="paramname"><em>str</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::size_t </td>
|
|
<td class="paramname"><em>size</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</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 class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns directly the numeric representation of a string view. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">str</td><td>Human-readable identifer. </td></tr>
|
|
<tr><td class="paramname">size</td><td>Length of the string to hash. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The numeric representation of the string. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00090">90</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a63725144b0b9af67e9965ab0a60c5862"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a63725144b0b9af67e9965ab0a60c5862">◆ </a></span>value() <span class="overload">[3/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<div class="memtemplate">
|
|
template<std::size_t N> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static constexpr <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::value </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classentt_1_1basic__hashed__string.html#ad4e8f181e92b9218747ac43fe24c4cbc">value_type</a>(&) </td>
|
|
<td class="paramname"><em>str</em>[N]</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 class="mlabel">constexpr</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns directly the numeric representation of a string. </p>
|
|
<p>Forcing template resolution avoids implicit conversions. An human-readable identifier can be anything but a plain, old bunch of characters.<br />
|
|
Example of use: </p><div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keyword">auto</span> <a class="code" href="classentt_1_1basic__hashed__string.html#a40f85633eba5321389c5ceea4d19cebc">value</a> = <a class="code" href="classentt_1_1basic__hashed__string.html#a40f85633eba5321389c5ceea4d19cebc">basic_hashed_string<char>::value</a>(<span class="stringliteral">"my.png"</span>);</div>
|
|
<div class="ttc" id="aclassentt_1_1basic__hashed__string_html_a40f85633eba5321389c5ceea4d19cebc"><div class="ttname"><a href="classentt_1_1basic__hashed__string.html#a40f85633eba5321389c5ceea4d19cebc">entt::basic_hashed_string::value</a></div><div class="ttdeci">constexpr hash_type value() const</div><div class="ttdoc">Returns the numeric representation of a hashed string.</div><div class="ttdef"><b>Definition:</b> <a href="hashed__string_8hpp_source.html#l00174">hashed_string.hpp:174</a></div></div>
|
|
</div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">N</td><td>Number of characters of the identifier. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">str</td><td>Human-readable identifer. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The numeric representation of the string. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00112">112</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a224b0f2486381e536b627bbde4de7c87"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a224b0f2486381e536b627bbde4de7c87">◆ </a></span>value() <span class="overload">[4/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Char > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static <a class="el" href="classentt_1_1basic__hashed__string.html#a1631b1f6ecd56a451366eeb228a6ffb9">hash_type</a> <a class="el" href="classentt_1_1basic__hashed__string.html">entt::basic_hashed_string</a>< Char >::value </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const_wrapper </td>
|
|
<td class="paramname"><em>wrapper</em></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 directly the numeric representation of a string. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">wrapper</td><td>Helps achieving the purpose by relying on overloading. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The numeric representation of the string. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="hashed__string_8hpp_source.html#l00121">121</a> of file <a class="el" href="hashed__string_8hpp_source.html">hashed_string.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="hashed__string_8hpp_source.html">hashed_string.hpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
|
|
</small></address>
|
|
</body>
|
|
</html>
|