MUtilities/docs/d5/d3b/_global_8h_source.html
2019-12-18 20:12:16 +01:00

102 lines
42 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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MuldeR&#39;s Utilities for Qt: include/MUtils/Global.h Source File</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">MuldeR&#39;s Utilities for Qt
</div>
<div id="projectbrief">MUtilities</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_b076b53667bc06ebb413a190e197fc7b.html">MUtils</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Global.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="../../d5/d3b/_global_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// MuldeR&#39;s Utilities for Qt</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// Copyright (C) 2004-2019 LoRd_MuldeR &lt;MuldeR2@GMX.de&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// This library is free software; you can redistribute it and/or</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// modify it under the terms of the GNU Lesser General Public</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">// License as published by the Free Software Foundation; either</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// version 2.1 of the License, or (at your option) any later version.</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// This library is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// Lesser General Public License for more details.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// You should have received a copy of the GNU Lesser General Public</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// License along with this library; if not, write to the Free Software</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// http://www.gnu.org/licenses/lgpl-2.1.txt</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;QString&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="comment">//Forward Declarations</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">class </span>QProcess;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">class </span>QDir;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="../../d6/d9c/class_q_hash.html"> 34</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> K, <span class="keyword">typename</span> V&gt; <span class="keyword">class </span><a class="code" href="../../d6/d9c/class_q_hash.html">QHash</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="comment">//Interface version</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="preprocessor">#define MUTILS_INTERFACE 4</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="comment">//MUtils API</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="preprocessor"># ifdef MUTILS_DLL_EXPORT</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor"># define MUTILS_API __declspec(dllexport)</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="preprocessor"># else</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor"># ifndef MUTILS_STATIC_LIB</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="preprocessor"># define MUTILS_API __declspec(dllimport)</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="preprocessor"># else</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="preprocessor"># define MUTILS_API </span><span class="comment">/*static lib*/</span><span class="preprocessor"></span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="preprocessor"># endif</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="preprocessor"># endif</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="preprocessor"># define MUTILS_API</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="comment">//Check Debug Flags</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="preprocessor">#if defined(_DEBUG) || defined(DEBUG) || (!defined(NDEBUG))</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="preprocessor"># define MUTILS_DEBUG (1)</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="preprocessor"># if defined(NDEBUG) || defined(QT_NO_DEBUG) || (!defined(QT_DEBUG))</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="preprocessor"># error Inconsistent DEBUG flags have been detected!</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="preprocessor"># endif</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="preprocessor"># define MUTILS_DEBUG (0)</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor"># if (!defined(NDEBUG)) || (!defined(QT_NO_DEBUG)) || defined(QT_DEBUG)</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="preprocessor"># error Inconsistent DEBUG flags have been detected!</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor"># endif</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="comment">//Check CPU options</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor">#if defined(_MSC_VER) &amp;&amp; (!defined(__INTELLISENSE__)) &amp;&amp; (!defined(_M_X64)) &amp;&amp; defined(_M_IX86_FP)</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor"> #if (_M_IX86_FP != 0)</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor"> #error We should not enabled SSE or SSE2 in release builds!</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="preprocessor"> #endif</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="comment">//Library initializer</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="preprocessor">#define MUTILS_GLUE_NAME_HELPER(X,Y) X##Y</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="preprocessor">#define MUTILS_GLUE_NAME(X,Y) MUTILS_GLUE_NAME_HELPER(X,Y)</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="preprocessor">#if MUTILS_DEBUG</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="preprocessor">#define MUTILS_INITIALIZER MUTILS_GLUE_NAME(initialize_d, MUTILS_INTERFACE)</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="preprocessor">#define MUTILS_INITIALIZER MUTILS_GLUE_NAME(initialize_r, MUTILS_INTERFACE)</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="comment">//Compiler warnings</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="preprocessor">#define MUTILS_MAKE_STRING_HELPER(X) #X</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;<span class="preprocessor">#define MUTILS_MAKE_STRING(X) MUTILS_MAKE_STRING_HELPER(X)</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="preprocessor">#define MUTILS_COMPILER_WARNING(TXT) __pragma(message(__FILE__ &quot;(&quot; MUTILS_MAKE_STRING(__LINE__) &quot;) : warning: &quot; TXT))</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="keyword">namespace </span><a class="code" href="../../d3/da6/namespace_m_utils.html">MUtils</a></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;{</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="../../da/d46/struct_m_utils_1_1__fp__parts__t.html"> 106</a></span>&#160; <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../da/d46/struct_m_utils_1_1__fp__parts__t.html">_fp_parts_t</a> { <span class="keywordtype">double</span> parts[2]; } <a class="code" href="../../d3/da6/namespace_m_utils.html#a75209365a097871cb2bb8fc3a21ce14b">fp_parts_t</a>;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; MUTILS_API <span class="keyword">const</span> QString&amp; <a class="code" href="../../d3/da6/namespace_m_utils.html#a3f198156e8be91f3e74dd9ed69ffaa34">temp_folder</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; MUTILS_API <span class="keywordtype">void</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#a80205a5816416cc49e8d9f524894132a">init_process</a>(QProcess &amp;process, <span class="keyword">const</span> QString &amp;wokringDir, <span class="keyword">const</span> <span class="keywordtype">bool</span> bReplaceTempDir = <span class="keyword">true</span>, <span class="keyword">const</span> QStringList *<span class="keyword">const</span> extraPaths = NULL, <span class="keyword">const</span> <a class="code" href="../../d6/d9c/class_q_hash.html">QHash&lt;QString, QString&gt;</a> *<span class="keyword">const</span> extraEnv = NULL);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; MUTILS_API quint32 <a class="code" href="../../d3/da6/namespace_m_utils.html#a1c9832c1d645a2c90e9bd52d57d843b3">next_rand_u32</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; MUTILS_API quint32 <a class="code" href="../../d3/da6/namespace_m_utils.html#a1c9832c1d645a2c90e9bd52d57d843b3">next_rand_u32</a>(<span class="keyword">const</span> quint32 max);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; MUTILS_API quint64 <a class="code" href="../../d3/da6/namespace_m_utils.html#ad7edd4aece64faf3aa16c9509243608c">next_rand_u64</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; </div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#ac583617546d5ae100ce7436546d9662c">next_rand_str</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> &amp;bLong = <span class="keyword">false</span>);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#a29461116550863e8730f3f4ec479bbcb">make_temp_file</a>(<span class="keyword">const</span> QString &amp;basePath, <span class="keyword">const</span> QString &amp;extension, <span class="keyword">const</span> <span class="keywordtype">bool</span> placeholder = <span class="keyword">false</span>);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#a29461116550863e8730f3f4ec479bbcb">make_temp_file</a>(<span class="keyword">const</span> QDir &amp;basePath, <span class="keyword">const</span> QString &amp;extension, <span class="keyword">const</span> <span class="keywordtype">bool</span> placeholder = <span class="keyword">false</span>);</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#a4d288d8fbe9a187cffe8db04e70df3de">make_unique_file</a>(<span class="keyword">const</span> QString &amp;basePath, <span class="keyword">const</span> QString &amp;baseName, <span class="keyword">const</span> QString &amp;extension, <span class="keyword">const</span> <span class="keywordtype">bool</span> fancy = <span class="keyword">false</span>, <span class="keyword">const</span> <span class="keywordtype">bool</span> placeholder = <span class="keyword">false</span>);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#a4d288d8fbe9a187cffe8db04e70df3de">make_unique_file</a>(<span class="keyword">const</span> QDir &amp;basePath, <span class="keyword">const</span> QString &amp;baseName, <span class="keyword">const</span> QString &amp;extension, <span class="keyword">const</span> <span class="keywordtype">bool</span> fancy = <span class="keyword">false</span>, <span class="keyword">const</span> <span class="keywordtype">bool</span> placeholder = <span class="keyword">false</span>);</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; MUTILS_API <span class="keywordtype">bool</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#aea4a212153b09b24b04f30ef5159f29b">parity</a>(quint32 value);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; MUTILS_API <span class="keywordtype">bool</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#a5a14e75627eebd09efc37898d74c5ac6">remove_file</a>(<span class="keyword">const</span> QString &amp;fileName);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; MUTILS_API <span class="keywordtype">bool</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#a4d451ddc82668d1298f2922f62474b5d">remove_directory</a>(<span class="keyword">const</span> QString &amp;folderPath, <span class="keyword">const</span> <span class="keywordtype">bool</span> &amp;recursive);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; MUTILS_API QString&amp; <a class="code" href="../../d3/da6/namespace_m_utils.html#a6118cf23d2b771fae1ad159c7ea6686a">trim_right</a>(QString &amp;str);</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; MUTILS_API QString&amp; <a class="code" href="../../d3/da6/namespace_m_utils.html#a20b8fc56856ee904caaded756399e705">trim_left</a>(QString &amp;str);</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#a6118cf23d2b771fae1ad159c7ea6686a">trim_right</a>(<span class="keyword">const</span> QString &amp;str);</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#a20b8fc56856ee904caaded756399e705">trim_left</a>(<span class="keyword">const</span> QString &amp;str);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; MUTILS_API <span class="keywordtype">void</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f">natural_string_sort</a>(QStringList &amp;list, <span class="keyword">const</span> <span class="keywordtype">bool</span> bIgnoreCase);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">clean_file_name</a>(<span class="keyword">const</span> QString &amp;name, <span class="keyword">const</span> <span class="keywordtype">bool</span> &amp;pretty);</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">clean_file_path</a>(<span class="keyword">const</span> QString &amp;path, <span class="keyword">const</span> <span class="keywordtype">bool</span> &amp;pretty);</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; MUTILS_API <span class="keywordtype">bool</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">regexp_parse_uint32</a>(<span class="keyword">const</span> QRegExp &amp;regexp, quint32 &amp;value);</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; MUTILS_API <span class="keywordtype">bool</span> regexp_parse_int32(<span class="keyword">const</span> QRegExp &amp;regexp, qint32 &amp;value);</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; MUTILS_API <span class="keywordtype">bool</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">regexp_parse_uint32</a>(<span class="keyword">const</span> QRegExp &amp;regexp, quint32 &amp;value, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;offset);</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; MUTILS_API <span class="keywordtype">bool</span> regexp_parse_int32(<span class="keyword">const</span> QRegExp &amp;regexp, qint32 &amp;value, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;offset);</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; MUTILS_API QString <a class="code" href="../../d3/da6/namespace_m_utils.html#a9916e02e90bdb987b95b3cc9d463f949">parent_path</a>(<span class="keyword">const</span> QString &amp;path);</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; MUTILS_API <span class="keywordtype">bool</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">regexp_parse_uint32</a>(<span class="keyword">const</span> QRegExp &amp;regexp, quint32 *values, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;count);</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; MUTILS_API <span class="keywordtype">bool</span> regexp_parse_int32(<span class="keyword">const</span> QRegExp &amp;regexp, qint32 *values, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;count);</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; MUTILS_API <span class="keywordtype">bool</span> <a class="code" href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">regexp_parse_uint32</a>(<span class="keyword">const</span> QRegExp &amp;regexp, quint32 *values, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;offset, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;count);</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; MUTILS_API <span class="keywordtype">bool</span> regexp_parse_int32(<span class="keyword">const</span> QRegExp &amp;regexp, qint32 *values, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;offset, <span class="keyword">const</span> <span class="keywordtype">size_t</span> &amp;count);</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; MUTILS_API QStringList <a class="code" href="../../d3/da6/namespace_m_utils.html#a2275e64c3c74dea855c39b66be67f705">available_codepages</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> &amp;noAliases = <span class="keyword">true</span>);</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; MUTILS_API <a class="code" href="../../da/d46/struct_m_utils_1_1__fp__parts__t.html">fp_parts_t</a> <a class="code" href="../../d3/da6/namespace_m_utils.html#adba57bb9c5055c3ed1d528cd2151b5a9">break_fp</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> value);</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160;</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160; <span class="comment">//Internal (do *not* call directly!)</span></div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160; <span class="keyword">namespace </span>Internal</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160; {</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160; MUTILS_API <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MUTILS_INITIALIZER(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> interfaceId);</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> init_flag = MUTILS_INITIALIZER(MUTILS_INTERFACE);</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>&#160; }</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>&#160;}</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>&#160;</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>&#160;</div><div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#ad42b1946a83df3bd76734d5ab691fd0d"> 389</a></span>&#160;<span class="preprocessor">#define MUTILS_DELETE(PTR) do { if((PTR)) { delete (PTR); (PTR) = NULL; } } while(0)</span></div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160;</div><div class="line"><a name="l00393"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#aa544a37b80f1ab9d86f439a7666e9aa8"> 393</a></span>&#160;<span class="preprocessor">#define MUTILS_DELETE_ARRAY(PTR) do { if((PTR)) { delete [] (PTR); (PTR) = NULL; } } while(0)</span></div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160;</div><div class="line"><a name="l00397"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#a1fe39de37351efa3ca46bdc8653e1f25"> 397</a></span>&#160;<span class="preprocessor">#define MUTILS_ZERO_MEMORY(PTR) memset(&amp;(PTR), 0, sizeof((PTR)))</span></div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#af55d43b39d3f41cf090c138ed190ee6e"> 401</a></span>&#160;<span class="preprocessor">#define MUTILS_WCHR(STR) (reinterpret_cast&lt;const wchar_t*&gt;((STR).utf16()))</span></div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160;</div><div class="line"><a name="l00405"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#a88b0902153ea537b12d86267af20eb3f"> 405</a></span>&#160;<span class="preprocessor">#define MUTILS_UTF8(STR) ((STR).toUtf8().constData())</span></div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>&#160;</div><div class="line"><a name="l00409"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#a9e190bac06bf7cb9993cfb4c75f66fb6"> 409</a></span>&#160;<span class="preprocessor">#define MUTILS_L1STR(STR) ((STR).toLatin1().constData())</span></div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>&#160;</div><div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#a04d63f6f60c90f8e3c4029824a7352b0"> 413</a></span>&#160;<span class="preprocessor">#define MUTILS_QSTR(STR) (QString::fromUtf16(reinterpret_cast&lt;const unsigned short*&gt;((STR))))</span></div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160;</div><div class="line"><a name="l00417"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#a177ecbfe7701c2ac04bb8bdeb208773a"> 417</a></span>&#160;<span class="preprocessor">#define MUTILS_BOOL2STR(X) ((X) ? &quot;1&quot; : &quot;0&quot;)</span></div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#a8455a4d868742129d26356469fae26ba"> 421</a></span>&#160;<span class="preprocessor">#define MUTILS_BOOLIFY(X) (!(!(X)))</span></div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160;</div><div class="line"><a name="l00425"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#ad70be6c96965fb93affdeaf297b2d8e5"> 425</a></span>&#160;<span class="preprocessor">#define MUTILS_ARR2LEN(X) (sizeof((X)) / sizeof((X)[0]))</span></div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno"><a class="line" href="../../d5/d3b/_global_8h.html#a8e7b4857b78f9749233e5abc96534ca8"> 429</a></span>&#160;<span class="preprocessor">#define MUTILS_NO_COPY(CLASS) \</span></div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160;<span class="preprocessor"> CLASS(const CLASS &amp;) { throw &quot;Copy constructor is disabled!&quot;; } \</span></div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160;<span class="preprocessor"> CLASS &amp;operator=(const CLASS &amp;) { throw &quot;Assignment operator is disabled!&quot;; }</span></div><div class="ttc" id="namespace_m_utils_html_a2275e64c3c74dea855c39b66be67f705"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a2275e64c3c74dea855c39b66be67f705">MUtils::available_codepages</a></div><div class="ttdeci">MUTILS_API QStringList available_codepages(const bool &amp;noAliases=true)</div><div class="ttdoc">Retrieve a list of all available codepages. </div></div>
<div class="ttc" id="namespace_m_utils_html_a75209365a097871cb2bb8fc3a21ce14b"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a75209365a097871cb2bb8fc3a21ce14b">MUtils::fp_parts_t</a></div><div class="ttdeci">struct MUtils::_fp_parts_t fp_parts_t</div><div class="ttdoc">This struct containes the parts (integral and fractional part) of a floating-point number...</div></div>
<div class="ttc" id="namespace_m_utils_html_ac583617546d5ae100ce7436546d9662c"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#ac583617546d5ae100ce7436546d9662c">MUtils::next_rand_str</a></div><div class="ttdeci">MUTILS_API QString next_rand_str(const bool &amp;bLong=false)</div><div class="ttdoc">Generates a random string. </div></div>
<div class="ttc" id="namespace_m_utils_html_a5a14e75627eebd09efc37898d74c5ac6"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a5a14e75627eebd09efc37898d74c5ac6">MUtils::remove_file</a></div><div class="ttdeci">MUTILS_API bool remove_file(const QString &amp;fileName)</div><div class="ttdoc">Deletes the specified file. </div></div>
<div class="ttc" id="namespace_m_utils_html_adb5da6435b27e10443060dd2550784f3"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">MUtils::clean_file_path</a></div><div class="ttdeci">MUTILS_API QString clean_file_path(const QString &amp;path, const bool &amp;pretty)</div><div class="ttdoc">Clean up a file path string. </div></div>
<div class="ttc" id="struct_m_utils_1_1__fp__parts__t_html"><div class="ttname"><a href="../../da/d46/struct_m_utils_1_1__fp__parts__t.html">MUtils::_fp_parts_t</a></div><div class="ttdoc">This struct containes the parts (integral and fractional part) of a floating-point number...</div><div class="ttdef"><b>Definition:</b> Global.h:106</div></div>
<div class="ttc" id="namespace_m_utils_html_a9916e02e90bdb987b95b3cc9d463f949"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a9916e02e90bdb987b95b3cc9d463f949">MUtils::parent_path</a></div><div class="ttdeci">MUTILS_API QString parent_path(const QString &amp;path)</div><div class="ttdoc">Get parent path. </div></div>
<div class="ttc" id="namespace_m_utils_html_a4d4c545ea06892f6487f15a48808564f"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f">MUtils::natural_string_sort</a></div><div class="ttdeci">MUTILS_API void natural_string_sort(QStringList &amp;list, const bool bIgnoreCase)</div><div class="ttdoc">Sort a list of strings using &quot;natural ordering&quot; algorithm. </div></div>
<div class="ttc" id="namespace_m_utils_html_ad2a851b289ee66873d3a1ec86f5f34eb"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">MUtils::regexp_parse_uint32</a></div><div class="ttdeci">MUTILS_API bool regexp_parse_uint32(const QRegExp &amp;regexp, quint32 &amp;value)</div><div class="ttdoc">Parse regular expression results. </div></div>
<div class="ttc" id="namespace_m_utils_html_aea4a212153b09b24b04f30ef5159f29b"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#aea4a212153b09b24b04f30ef5159f29b">MUtils::parity</a></div><div class="ttdeci">MUTILS_API bool parity(quint32 value)</div><div class="ttdoc">Computes the parity of the given unsigned 32-Bit value. </div></div>
<div class="ttc" id="namespace_m_utils_html_adba57bb9c5055c3ed1d528cd2151b5a9"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#adba57bb9c5055c3ed1d528cd2151b5a9">MUtils::break_fp</a></div><div class="ttdeci">MUTILS_API fp_parts_t break_fp(const double value)</div><div class="ttdoc">Break floating-point number into fractional and integral parts. </div></div>
<div class="ttc" id="namespace_m_utils_html_ad7edd4aece64faf3aa16c9509243608c"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#ad7edd4aece64faf3aa16c9509243608c">MUtils::next_rand_u64</a></div><div class="ttdeci">MUTILS_API quint64 next_rand_u64(void)</div><div class="ttdoc">Generates a random unsigned 64-Bit value. </div></div>
<div class="ttc" id="namespace_m_utils_html_a6118cf23d2b771fae1ad159c7ea6686a"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a6118cf23d2b771fae1ad159c7ea6686a">MUtils::trim_right</a></div><div class="ttdeci">MUTILS_API QString &amp; trim_right(QString &amp;str)</div><div class="ttdoc">Remove trailing white-space characters. </div></div>
<div class="ttc" id="namespace_m_utils_html_a3f198156e8be91f3e74dd9ed69ffaa34"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a3f198156e8be91f3e74dd9ed69ffaa34">MUtils::temp_folder</a></div><div class="ttdeci">MUTILS_API const QString &amp; temp_folder(void)</div><div class="ttdoc">Rerieves the full path of the application&amp;#39;s Temp folder. </div></div>
<div class="ttc" id="namespace_m_utils_html"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html">MUtils</a></div><div class="ttdoc">Global MUtils namespace. </div><div class="ttdef"><b>Definition:</b> CPUFeatures.h:37</div></div>
<div class="ttc" id="namespace_m_utils_html_aeb7783b8ecbe163501ce60dce8b6709f"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">MUtils::clean_file_name</a></div><div class="ttdeci">MUTILS_API QString clean_file_name(const QString &amp;name, const bool &amp;pretty)</div><div class="ttdoc">Clean up a file name string. </div></div>
<div class="ttc" id="namespace_m_utils_html_a1c9832c1d645a2c90e9bd52d57d843b3"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a1c9832c1d645a2c90e9bd52d57d843b3">MUtils::next_rand_u32</a></div><div class="ttdeci">MUTILS_API quint32 next_rand_u32(void)</div><div class="ttdoc">Generates a random unsigned 32-Bit value. </div></div>
<div class="ttc" id="namespace_m_utils_html_a4d451ddc82668d1298f2922f62474b5d"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a4d451ddc82668d1298f2922f62474b5d">MUtils::remove_directory</a></div><div class="ttdeci">MUTILS_API bool remove_directory(const QString &amp;folderPath, const bool &amp;recursive)</div><div class="ttdoc">Recursively deletes the specified directory. </div></div>
<div class="ttc" id="namespace_m_utils_html_a29461116550863e8730f3f4ec479bbcb"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a29461116550863e8730f3f4ec479bbcb">MUtils::make_temp_file</a></div><div class="ttdeci">MUTILS_API QString make_temp_file(const QString &amp;basePath, const QString &amp;extension, const bool placeholder=false)</div><div class="ttdoc">Generates a temporary file name. </div></div>
<div class="ttc" id="namespace_m_utils_html_a80205a5816416cc49e8d9f524894132a"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a80205a5816416cc49e8d9f524894132a">MUtils::init_process</a></div><div class="ttdeci">MUTILS_API void init_process(QProcess &amp;process, const QString &amp;wokringDir, const bool bReplaceTempDir=true, const QStringList *const extraPaths=NULL, const QHash&lt; QString, QString &gt; *const extraEnv=NULL)</div><div class="ttdoc">Initialize a given QProcess object. </div></div>
<div class="ttc" id="namespace_m_utils_html_a20b8fc56856ee904caaded756399e705"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a20b8fc56856ee904caaded756399e705">MUtils::trim_left</a></div><div class="ttdeci">MUTILS_API QString &amp; trim_left(QString &amp;str)</div><div class="ttdoc">Remove leading white-space characters. </div></div>
<div class="ttc" id="class_q_hash_html"><div class="ttname"><a href="../../d6/d9c/class_q_hash.html">QHash</a></div><div class="ttdef"><b>Definition:</b> Global.h:34</div></div>
<div class="ttc" id="namespace_m_utils_html_a4d288d8fbe9a187cffe8db04e70df3de"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html#a4d288d8fbe9a187cffe8db04e70df3de">MUtils::make_unique_file</a></div><div class="ttdeci">MUTILS_API QString make_unique_file(const QString &amp;basePath, const QString &amp;baseName, const QString &amp;extension, const bool fancy=false, const bool placeholder=false)</div><div class="ttdoc">Generates a unique file name. </div></div>
</div><!-- fragment --></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.12
</small></address>
</body>
</html>