SDLU/docs/html/_util_8hpp.html
2021-04-24 02:01:36 +02:00

421 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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SDL Utility: C:/Users/Robert/source/repos/SDLU/include/Util.hpp File 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.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">SDL Utility
</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&amp;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&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>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_util_8hpp.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle">
<div class="title">Util.hpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Basic utility macros, typedefs...
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cstdint&gt;</code><br />
</div>
<p><a href="_util_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a598a3330b3c21701223ee0ca14316eca"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a598a3330b3c21701223ee0ca14316eca">PI</a>&#160;&#160;&#160;3.1415926f</td></tr>
<tr class="separator:a598a3330b3c21701223ee0ca14316eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4c68e5e049464b06576d7b1a190a9ce"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#aa4c68e5e049464b06576d7b1a190a9ce">IS_NULLPTR</a>(x)&#160;&#160;&#160;(x == nullptr)</td></tr>
<tr class="separator:aa4c68e5e049464b06576d7b1a190a9ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad78bed6042757c22a0a7415695d83912"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#ad78bed6042757c22a0a7415695d83912">RETURN_IF_NULLPTR</a>(x, ...)&#160;&#160;&#160;{ if(<a class="el" href="_util_8hpp.html#aa4c68e5e049464b06576d7b1a190a9ce">IS_NULLPTR</a>(x)) return __VA_ARGS__; }</td></tr>
<tr class="separator:ad78bed6042757c22a0a7415695d83912"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5f4e3d7f412af2f887266042b63bb23"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#aa5f4e3d7f412af2f887266042b63bb23">RETURN_IF_NOT_NULLPTR</a>(x, ...)&#160;&#160;&#160;{ if(!<a class="el" href="_util_8hpp.html#aa4c68e5e049464b06576d7b1a190a9ce">IS_NULLPTR</a>(x)) return __VA_ARGS__; }</td></tr>
<tr class="separator:aa5f4e3d7f412af2f887266042b63bb23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f6f72fed1b9e22bc996980c4da87c5f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a6f6f72fed1b9e22bc996980c4da87c5f">THROW_IF</a>(condition, exception)&#160;&#160;&#160;( condition ? throw exception : false)</td></tr>
<tr class="separator:a6f6f72fed1b9e22bc996980c4da87c5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e2f2eee0698641fd77fbc489bf5b72a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a8e2f2eee0698641fd77fbc489bf5b72a">THROW_IF_NOT</a>(condition, exception)&#160;&#160;&#160;( <a class="el" href="_util_8hpp.html#a6f6f72fed1b9e22bc996980c4da87c5f">THROW_IF</a>(!condition, exception) )</td></tr>
<tr class="separator:a8e2f2eee0698641fd77fbc489bf5b72a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0494d8896dbc587136819e261afdc91"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#ad0494d8896dbc587136819e261afdc91">SDLU_BEGIN</a>&#160;&#160;&#160;namespace sdlu {</td></tr>
<tr class="separator:ad0494d8896dbc587136819e261afdc91"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a2944638813a090aa23e62f4da842c3e2"><td class="memItemLeft" align="right" valign="top">typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a2944638813a090aa23e62f4da842c3e2">Uint8</a></td></tr>
<tr class="separator:a2944638813a090aa23e62f4da842c3e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d6ba23467c5f743eb2b594913650a61"><td class="memItemLeft" align="right" valign="top">typedef int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a1d6ba23467c5f743eb2b594913650a61">Int8</a></td></tr>
<tr class="separator:a1d6ba23467c5f743eb2b594913650a61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31fcc0a076c9068668173ee26d33e42b"><td class="memItemLeft" align="right" valign="top">typedef uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a31fcc0a076c9068668173ee26d33e42b">Uint16</a></td></tr>
<tr class="separator:a31fcc0a076c9068668173ee26d33e42b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d70d2452bc784cc9a499c567e4b5a77"><td class="memItemLeft" align="right" valign="top">typedef int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a6d70d2452bc784cc9a499c567e4b5a77">Int16</a></td></tr>
<tr class="separator:a6d70d2452bc784cc9a499c567e4b5a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add440eff171ea5f55cb00c4a9ab8672d"><td class="memItemLeft" align="right" valign="top">typedef uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#add440eff171ea5f55cb00c4a9ab8672d">Uint32</a></td></tr>
<tr class="separator:add440eff171ea5f55cb00c4a9ab8672d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20b0c262d9ef5d263888e463dfa99638"><td class="memItemLeft" align="right" valign="top">typedef int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a20b0c262d9ef5d263888e463dfa99638">Int32</a></td></tr>
<tr class="separator:a20b0c262d9ef5d263888e463dfa99638"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac006cf2bd55a42a9cc8ae9f123aa7e13"><td class="memItemLeft" align="right" valign="top">typedef uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#ac006cf2bd55a42a9cc8ae9f123aa7e13">Uint64</a></td></tr>
<tr class="separator:ac006cf2bd55a42a9cc8ae9f123aa7e13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2de3f49eadcae5078cd57134586ee25d"><td class="memItemLeft" align="right" valign="top">typedef int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_util_8hpp.html#a2de3f49eadcae5078cd57134586ee25d">Int64</a></td></tr>
<tr class="separator:a2de3f49eadcae5078cd57134586ee25d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Basic utility macros, typedefs... </p>
<dl class="section author"><dt>Author</dt><dd>Lauchmelder23 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>16.05.2020 </dd></dl>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="aa4c68e5e049464b06576d7b1a190a9ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4c68e5e049464b06576d7b1a190a9ce">&#9670;&nbsp;</a></span>IS_NULLPTR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IS_NULLPTR</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">x</td><td>)</td>
<td>&#160;&#160;&#160;(x == nullptr)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a598a3330b3c21701223ee0ca14316eca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a598a3330b3c21701223ee0ca14316eca">&#9670;&nbsp;</a></span>PI</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PI&#160;&#160;&#160;3.1415926f</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aa5f4e3d7f412af2f887266042b63bb23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5f4e3d7f412af2f887266042b63bb23">&#9670;&nbsp;</a></span>RETURN_IF_NOT_NULLPTR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define RETURN_IF_NOT_NULLPTR</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">x, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;{ if(!<a class="el" href="_util_8hpp.html#aa4c68e5e049464b06576d7b1a190a9ce">IS_NULLPTR</a>(x)) return __VA_ARGS__; }</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ad78bed6042757c22a0a7415695d83912"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad78bed6042757c22a0a7415695d83912">&#9670;&nbsp;</a></span>RETURN_IF_NULLPTR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define RETURN_IF_NULLPTR</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">x, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;{ if(<a class="el" href="_util_8hpp.html#aa4c68e5e049464b06576d7b1a190a9ce">IS_NULLPTR</a>(x)) return __VA_ARGS__; }</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ad0494d8896dbc587136819e261afdc91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0494d8896dbc587136819e261afdc91">&#9670;&nbsp;</a></span>SDLU_BEGIN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SDLU_BEGIN&#160;&#160;&#160;namespace sdlu {</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a6f6f72fed1b9e22bc996980c4da87c5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f6f72fed1b9e22bc996980c4da87c5f">&#9670;&nbsp;</a></span>THROW_IF</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define THROW_IF</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">condition, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">exception&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;( condition ? throw exception : false)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a8e2f2eee0698641fd77fbc489bf5b72a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e2f2eee0698641fd77fbc489bf5b72a">&#9670;&nbsp;</a></span>THROW_IF_NOT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define THROW_IF_NOT</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">condition, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">exception&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;( <a class="el" href="_util_8hpp.html#a6f6f72fed1b9e22bc996980c4da87c5f">THROW_IF</a>(!condition, exception) )</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a6d70d2452bc784cc9a499c567e4b5a77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d70d2452bc784cc9a499c567e4b5a77">&#9670;&nbsp;</a></span>Int16</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int16_t <a class="el" href="_util_8hpp.html#a6d70d2452bc784cc9a499c567e4b5a77">Int16</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a20b0c262d9ef5d263888e463dfa99638"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20b0c262d9ef5d263888e463dfa99638">&#9670;&nbsp;</a></span>Int32</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int32_t <a class="el" href="_util_8hpp.html#a20b0c262d9ef5d263888e463dfa99638">Int32</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a2de3f49eadcae5078cd57134586ee25d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2de3f49eadcae5078cd57134586ee25d">&#9670;&nbsp;</a></span>Int64</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int64_t <a class="el" href="_util_8hpp.html#a2de3f49eadcae5078cd57134586ee25d">Int64</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a1d6ba23467c5f743eb2b594913650a61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d6ba23467c5f743eb2b594913650a61">&#9670;&nbsp;</a></span>Int8</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int8_t <a class="el" href="_util_8hpp.html#a1d6ba23467c5f743eb2b594913650a61">Int8</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a31fcc0a076c9068668173ee26d33e42b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31fcc0a076c9068668173ee26d33e42b">&#9670;&nbsp;</a></span>Uint16</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint16_t <a class="el" href="_util_8hpp.html#a31fcc0a076c9068668173ee26d33e42b">Uint16</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="add440eff171ea5f55cb00c4a9ab8672d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add440eff171ea5f55cb00c4a9ab8672d">&#9670;&nbsp;</a></span>Uint32</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint32_t <a class="el" href="_util_8hpp.html#add440eff171ea5f55cb00c4a9ab8672d">Uint32</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ac006cf2bd55a42a9cc8ae9f123aa7e13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac006cf2bd55a42a9cc8ae9f123aa7e13">&#9670;&nbsp;</a></span>Uint64</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint64_t <a class="el" href="_util_8hpp.html#ac006cf2bd55a42a9cc8ae9f123aa7e13">Uint64</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a2944638813a090aa23e62f4da842c3e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2944638813a090aa23e62f4da842c3e2">&#9670;&nbsp;</a></span>Uint8</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t <a class="el" href="_util_8hpp.html#a2944638813a090aa23e62f4da842c3e2">Uint8</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="_util_8hpp.html">Util.hpp</a></li>
<li class="footer">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 </li>
</ul>
</div>
</body>
</html>