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

118 lines
6.9 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: Crash Course: configuration</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><!-- top -->
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">Crash Course: configuration </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="autotoc_md1"></a>
Introduction</h1>
<p><code>EnTT</code> doesn't offer many hooks for customization but it certainly offers some.<br />
In the vast majority of cases, users will have no interest in changing the default parameters. For all other cases, the list of possible configurations with which it's possible to adjust the behavior of the library at runtime can be found below.</p>
<h1><a class="anchor" id="autotoc_md2"></a>
Definitions</h1>
<p>All options are intended as parameters to the compiler (or user-defined macros within the compilation units, if preferred).<br />
Each parameter can result in internal library definitions. It's not recommended to try to also modify these definitions, since there is no guarantee that they will remain stable over time unlike the options below.</p>
<h2><a class="anchor" id="autotoc_md3"></a>
ENTT_NOEXCEPT</h2>
<p>The purpose of this parameter is to suppress the use of <code>noexcept</code> by this library.<br />
To do this, simply define the variable without assigning any value to it.</p>
<h2><a class="anchor" id="autotoc_md4"></a>
ENTT_USE_ATOMIC</h2>
<p>In general, <code>EnTT</code> doesn't offer primitives to support multi-threading. Many of the features can be split over multiple threads without any explicit control and the user is the only one who knows if and when a synchronization point is required.<br />
However, some features aren't easily accessible to users and can be made thread-safe by means of this definition.</p>
<h2><a class="anchor" id="autotoc_md5"></a>
ENTT_ID_TYPE</h2>
<p><code><a class="el" href="namespaceentt.html#a13e040e7b38a8f86d1ab2f096f37b627" title="Alias declaration for type identifiers.">entt::id_type</a></code> is directly controlled by this definition and widely used within the library.<br />
By default, its type is <code>std::uint32_t</code>. However, users can define a different default type if necessary.</p>
<h2><a class="anchor" id="autotoc_md6"></a>
ENTT_PAGE_SIZE</h2>
<p>As is known, the ECS module of <code>EnTT</code> is based on <em>sparse sets</em>. What is less known perhaps is that these are paged to reduce memory consumption in some corner cases.<br />
The default size of a page is 32kB but users can adjust it if appropriate. In all case, the chosen value <b>must</b> be a power of 2.</p>
<h2><a class="anchor" id="autotoc_md7"></a>
ENTT_ASSERT</h2>
<p>For performance reasons, <code>EnTT</code> doesn't use exceptions or any other control structures. In fact, it offers many features that result in undefined behavior if not used correctly.<br />
To get around this, the library relies on a lot of asserts for the purpose of detecting errors in debug builds. By default, it uses <code>assert</code> internally, but users are allowed to overwrite its behavior by setting this variable.</p>
<h3><a class="anchor" id="autotoc_md8"></a>
ENTT_DISABLE_ASSERT</h3>
<p>Assertions may in turn affect performance to an extent when enabled. Whether <code>ENTT_ASSERT</code> is redefined or not, all asserts can be disabled at once by means of this definition.<br />
Note that <code>ENTT_DISABLE_ASSERT</code> takes precedence over the redefinition of <code>ENTT_ASSERT</code> and is therefore meant to disable all controls no matter what.</p>
<h2><a class="anchor" id="autotoc_md9"></a>
ENTT_NO_ETO</h2>
<p>In order to reduce memory consumption and increase performance, empty types are never stored by the ECS module of <code>EnTT</code>.<br />
Use this variable to treat these types like all others and therefore to create a dedicated storage for them.</p>
<h2><a class="anchor" id="autotoc_md10"></a>
ENTT_STANDARD_CPP</h2>
<p><code>EnTT</code> mixes non-standard language features with others that are perfectly compliant to offer some of its functionalities.<br />
This definition will prevent the library from using non-standard techniques, that is, functionalities that aren't fully compliant with the standard C++.<br />
While there are no known portability issues at the time of this writing, this should make the library fully portable anyway if needed. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- 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>