OSDN Git Service

Added the Lazy<T> class, for "lazy" initialization.
[mutilities/MUtilities.git] / docs / d3 / da6 / namespace_m_utils.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.8.12"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>MuldeR&#39;s Utilities for Qt: MUtils Namespace Reference</title>
9 <link href="../../tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="../../jquery.js"></script>
11 <script type="text/javascript" src="../../dynsections.js"></script>
12 <link href="../../search/search.css" rel="stylesheet" type="text/css"/>
13 <script type="text/javascript" src="../../search/searchdata.js"></script>
14 <script type="text/javascript" src="../../search/search.js"></script>
15 <link href="../../doxygen.css" rel="stylesheet" type="text/css" />
16 </head>
17 <body>
18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
19 <div id="titlearea">
20 <table cellspacing="0" cellpadding="0">
21  <tbody>
22  <tr style="height: 56px;">
23   <td id="projectalign" style="padding-left: 0.5em;">
24    <div id="projectname">MuldeR&#39;s Utilities for Qt
25    </div>
26    <div id="projectbrief">MUtilities</div>
27   </td>
28  </tr>
29  </tbody>
30 </table>
31 </div>
32 <!-- end header part -->
33 <!-- Generated by Doxygen 1.8.12 -->
34 <script type="text/javascript">
35 var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
36 </script>
37 <script type="text/javascript" src="../../menudata.js"></script>
38 <script type="text/javascript" src="../../menu.js"></script>
39 <script type="text/javascript">
40 $(function() {
41   initMenu('../../',true,false,'search.php','Search');
42   $(document).ready(function() { init_search(); });
43 });
44 </script>
45 <div id="main-nav"></div>
46 <!-- window showing the filter options -->
47 <div id="MSearchSelectWindow"
48      onmouseover="return searchBox.OnSearchSelectShow()"
49      onmouseout="return searchBox.OnSearchSelectHide()"
50      onkeydown="return searchBox.OnSearchSelectKey(event)">
51 </div>
52
53 <!-- iframe showing the search results (closed by default) -->
54 <div id="MSearchResultsWindow">
55 <iframe src="javascript:void(0)" frameborder="0" 
56         name="MSearchResults" id="MSearchResults">
57 </iframe>
58 </div>
59
60 </div><!-- top -->
61 <div class="header">
62   <div class="summary">
63 <a href="#namespaces">Namespaces</a> &#124;
64 <a href="#nested-classes">Classes</a> &#124;
65 <a href="#func-members">Functions</a> &#124;
66 <a href="#var-members">Variables</a>  </div>
67   <div class="headertitle">
68 <div class="title">MUtils Namespace Reference</div>  </div>
69 </div><!--header-->
70 <div class="contents">
71
72 <p>Global <a class="el" href="../../d3/da6/namespace_m_utils.html" title="Global MUtils namespace. ">MUtils</a> namespace.  
73 <a href="#details">More...</a></p>
74 <table class="memberdecls">
75 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
76 Namespaces</h2></td></tr>
77 <tr class="memitem:d3/d02/namespace_m_utils_1_1_c_p_u_fetaures"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html">CPUFetaures</a></td></tr>
78 <tr class="memdesc:d3/d02/namespace_m_utils_1_1_c_p_u_fetaures"><td class="mdescLeft">&#160;</td><td class="mdescRight">This namespace contains functions and constants for detecting CPU information. <br /></td></tr>
79 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
80 <tr class="memitem:d2/df4/namespace_m_utils_1_1_o_s"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html">OS</a></td></tr>
81 <tr class="memdesc:d2/df4/namespace_m_utils_1_1_o_s"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="../../d3/da6/namespace_m_utils.html" title="Global MUtils namespace. ">MUtils</a> OS-specific functions namespace. <br /></td></tr>
82 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
83 </table><table class="memberdecls">
84 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
85 Classes</h2></td></tr>
86 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/dfe/class_m_utils_1_1_i_p_c_channel.html">IPCChannel</a></td></tr>
87 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
88 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/dd3/class_m_utils_1_1_job_object.html">JobObject</a></td></tr>
89 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This class represents a job object.  <a href="../../dc/dd3/class_m_utils_1_1_job_object.html#details">More...</a><br /></td></tr>
90 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
91 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/dce/class_m_utils_1_1_lazy.html">Lazy</a></td></tr>
92 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="../../d0/dce/class_m_utils_1_1_lazy.html" title="Lazy initialization template class. ">Lazy</a> initialization template class.  <a href="../../d0/dce/class_m_utils_1_1_lazy.html#details">More...</a><br /></td></tr>
93 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
94 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d52/class_m_utils_1_1_taskbar7.html">Taskbar7</a></td></tr>
95 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
96 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">UpdateChecker</a></td></tr>
97 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
98 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0d/class_m_utils_1_1_update_checker_info.html">UpdateCheckerInfo</a></td></tr>
99 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
100 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d32/class_m_utils_1_1_version.html">Version</a></td></tr>
101 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
102 </table><table class="memberdecls">
103 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
104 Functions</h2></td></tr>
105 <tr class="memitem:a3f198156e8be91f3e74dd9ed69ffaa34"><td class="memItemLeft" align="right" valign="top">MUTILS_API const QString &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a3f198156e8be91f3e74dd9ed69ffaa34">temp_folder</a> (void)</td></tr>
106 <tr class="memdesc:a3f198156e8be91f3e74dd9ed69ffaa34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rerieves the full path of the application's <em>Temp</em> folder.  <a href="#a3f198156e8be91f3e74dd9ed69ffaa34">More...</a><br /></td></tr>
107 <tr class="separator:a3f198156e8be91f3e74dd9ed69ffaa34"><td class="memSeparator" colspan="2">&#160;</td></tr>
108 <tr class="memitem:a0ecb5d72f33a7b6feadd7deb8ed46cc3"><td class="memItemLeft" align="right" valign="top">MUTILS_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a0ecb5d72f33a7b6feadd7deb8ed46cc3">init_process</a> (QProcess &amp;process, const QString &amp;wokringDir, const bool bReplaceTempDir=true, const QStringList *const extraPaths=NULL)</td></tr>
109 <tr class="memdesc:a0ecb5d72f33a7b6feadd7deb8ed46cc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a given <a href="http://doc.qt.io/qt-4.8/qprocess.html">QProcess</a> object.  <a href="#a0ecb5d72f33a7b6feadd7deb8ed46cc3">More...</a><br /></td></tr>
110 <tr class="separator:a0ecb5d72f33a7b6feadd7deb8ed46cc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
111 <tr class="memitem:a1c9832c1d645a2c90e9bd52d57d843b3"><td class="memItemLeft" align="right" valign="top">MUTILS_API quint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a1c9832c1d645a2c90e9bd52d57d843b3">next_rand_u32</a> (void)</td></tr>
112 <tr class="memdesc:a1c9832c1d645a2c90e9bd52d57d843b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a <em>random</em> unsigned 32-Bit value.  <a href="#a1c9832c1d645a2c90e9bd52d57d843b3">More...</a><br /></td></tr>
113 <tr class="separator:a1c9832c1d645a2c90e9bd52d57d843b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
114 <tr class="memitem:ad7edd4aece64faf3aa16c9509243608c"><td class="memItemLeft" align="right" valign="top">MUTILS_API quint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ad7edd4aece64faf3aa16c9509243608c">next_rand_u64</a> (void)</td></tr>
115 <tr class="memdesc:ad7edd4aece64faf3aa16c9509243608c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a <em>random</em> unsigned 64-Bit value.  <a href="#ad7edd4aece64faf3aa16c9509243608c">More...</a><br /></td></tr>
116 <tr class="separator:ad7edd4aece64faf3aa16c9509243608c"><td class="memSeparator" colspan="2">&#160;</td></tr>
117 <tr class="memitem:ac583617546d5ae100ce7436546d9662c"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ac583617546d5ae100ce7436546d9662c">next_rand_str</a> (const bool &amp;bLong=false)</td></tr>
118 <tr class="memdesc:ac583617546d5ae100ce7436546d9662c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a <em>random</em> string.  <a href="#ac583617546d5ae100ce7436546d9662c">More...</a><br /></td></tr>
119 <tr class="separator:ac583617546d5ae100ce7436546d9662c"><td class="memSeparator" colspan="2">&#160;</td></tr>
120 <tr class="memitem:a29461116550863e8730f3f4ec479bbcb"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a29461116550863e8730f3f4ec479bbcb">make_temp_file</a> (const QString &amp;basePath, const QString &amp;extension, const bool placeholder=false)</td></tr>
121 <tr class="memdesc:a29461116550863e8730f3f4ec479bbcb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a temporary file name.  <a href="#a29461116550863e8730f3f4ec479bbcb">More...</a><br /></td></tr>
122 <tr class="separator:a29461116550863e8730f3f4ec479bbcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
123 <tr class="memitem:af9afe3821ae9bef7bdf56a4183fdea0d"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#af9afe3821ae9bef7bdf56a4183fdea0d">make_unique_file</a> (const QString &amp;basePath, const QString &amp;baseName, const QString &amp;extension, const bool fancy=false)</td></tr>
124 <tr class="memdesc:af9afe3821ae9bef7bdf56a4183fdea0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a unique file name.  <a href="#af9afe3821ae9bef7bdf56a4183fdea0d">More...</a><br /></td></tr>
125 <tr class="separator:af9afe3821ae9bef7bdf56a4183fdea0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
126 <tr class="memitem:aea4a212153b09b24b04f30ef5159f29b"><td class="memItemLeft" align="right" valign="top">MUTILS_API bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#aea4a212153b09b24b04f30ef5159f29b">parity</a> (quint32 value)</td></tr>
127 <tr class="memdesc:aea4a212153b09b24b04f30ef5159f29b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the <em>parity</em> of the given unsigned 32-Bit value.  <a href="#aea4a212153b09b24b04f30ef5159f29b">More...</a><br /></td></tr>
128 <tr class="separator:aea4a212153b09b24b04f30ef5159f29b"><td class="memSeparator" colspan="2">&#160;</td></tr>
129 <tr class="memitem:a5a14e75627eebd09efc37898d74c5ac6"><td class="memItemLeft" align="right" valign="top">MUTILS_API bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a5a14e75627eebd09efc37898d74c5ac6">remove_file</a> (const QString &amp;fileName)</td></tr>
130 <tr class="memdesc:a5a14e75627eebd09efc37898d74c5ac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes the specified file.  <a href="#a5a14e75627eebd09efc37898d74c5ac6">More...</a><br /></td></tr>
131 <tr class="separator:a5a14e75627eebd09efc37898d74c5ac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
132 <tr class="memitem:a4d451ddc82668d1298f2922f62474b5d"><td class="memItemLeft" align="right" valign="top">MUTILS_API bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a4d451ddc82668d1298f2922f62474b5d">remove_directory</a> (const QString &amp;folderPath, const bool &amp;recursive)</td></tr>
133 <tr class="memdesc:a4d451ddc82668d1298f2922f62474b5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recursively deletes the specified directory.  <a href="#a4d451ddc82668d1298f2922f62474b5d">More...</a><br /></td></tr>
134 <tr class="separator:a4d451ddc82668d1298f2922f62474b5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
135 <tr class="memitem:a6118cf23d2b771fae1ad159c7ea6686a"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a6118cf23d2b771fae1ad159c7ea6686a">trim_right</a> (QString &amp;str)</td></tr>
136 <tr class="memdesc:a6118cf23d2b771fae1ad159c7ea6686a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove <em>trailing</em> white-space characters.  <a href="#a6118cf23d2b771fae1ad159c7ea6686a">More...</a><br /></td></tr>
137 <tr class="separator:a6118cf23d2b771fae1ad159c7ea6686a"><td class="memSeparator" colspan="2">&#160;</td></tr>
138 <tr class="memitem:a20b8fc56856ee904caaded756399e705"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a20b8fc56856ee904caaded756399e705">trim_left</a> (QString &amp;str)</td></tr>
139 <tr class="memdesc:a20b8fc56856ee904caaded756399e705"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove <em>leading</em> white-space characters.  <a href="#a20b8fc56856ee904caaded756399e705">More...</a><br /></td></tr>
140 <tr class="separator:a20b8fc56856ee904caaded756399e705"><td class="memSeparator" colspan="2">&#160;</td></tr>
141 <tr class="memitem:a3bcb0fce5181ded3c54456379147009d"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a3bcb0fce5181ded3c54456379147009d">trim_right</a> (const QString &amp;str)</td></tr>
142 <tr class="memdesc:a3bcb0fce5181ded3c54456379147009d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove <em>trailing</em> white-space characters.  <a href="#a3bcb0fce5181ded3c54456379147009d">More...</a><br /></td></tr>
143 <tr class="separator:a3bcb0fce5181ded3c54456379147009d"><td class="memSeparator" colspan="2">&#160;</td></tr>
144 <tr class="memitem:ae43bc17b6fa4ee2287099c4ae095483b"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ae43bc17b6fa4ee2287099c4ae095483b">trim_left</a> (const QString &amp;str)</td></tr>
145 <tr class="memdesc:ae43bc17b6fa4ee2287099c4ae095483b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove <em>trailing</em> white-space characters.  <a href="#ae43bc17b6fa4ee2287099c4ae095483b">More...</a><br /></td></tr>
146 <tr class="separator:ae43bc17b6fa4ee2287099c4ae095483b"><td class="memSeparator" colspan="2">&#160;</td></tr>
147 <tr class="memitem:a4d4c545ea06892f6487f15a48808564f"><td class="memItemLeft" align="right" valign="top">MUTILS_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f">natural_string_sort</a> (QStringList &amp;list, const bool bIgnoreCase)</td></tr>
148 <tr class="memdesc:a4d4c545ea06892f6487f15a48808564f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort a list of strings using "natural ordering" algorithm.  <a href="#a4d4c545ea06892f6487f15a48808564f">More...</a><br /></td></tr>
149 <tr class="separator:a4d4c545ea06892f6487f15a48808564f"><td class="memSeparator" colspan="2">&#160;</td></tr>
150 <tr class="memitem:aeb7783b8ecbe163501ce60dce8b6709f"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">clean_file_name</a> (const QString &amp;name, const bool &amp;pretty)</td></tr>
151 <tr class="memdesc:aeb7783b8ecbe163501ce60dce8b6709f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file name string.  <a href="#aeb7783b8ecbe163501ce60dce8b6709f">More...</a><br /></td></tr>
152 <tr class="separator:aeb7783b8ecbe163501ce60dce8b6709f"><td class="memSeparator" colspan="2">&#160;</td></tr>
153 <tr class="memitem:adb5da6435b27e10443060dd2550784f3"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">clean_file_path</a> (const QString &amp;path, const bool &amp;pretty)</td></tr>
154 <tr class="memdesc:adb5da6435b27e10443060dd2550784f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file path string.  <a href="#adb5da6435b27e10443060dd2550784f3">More...</a><br /></td></tr>
155 <tr class="separator:adb5da6435b27e10443060dd2550784f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
156 <tr class="memitem:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="memItemLeft" align="right" valign="top">MUTILS_API bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">regexp_parse_uint32</a> (const QRegExp &amp;regexp, quint32 &amp;value)</td></tr>
157 <tr class="memdesc:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse regular expression results.  <a href="#ad2a851b289ee66873d3a1ec86f5f34eb">More...</a><br /></td></tr>
158 <tr class="separator:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
159 <tr class="memitem:a81704d66d34e37d3e0e159b5f436babf"><td class="memItemLeft" align="right" valign="top">MUTILS_API bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a81704d66d34e37d3e0e159b5f436babf">regexp_parse_uint32</a> (const QRegExp &amp;regexp, quint32 *values, const size_t &amp;count)</td></tr>
160 <tr class="memdesc:a81704d66d34e37d3e0e159b5f436babf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse regular expression results.  <a href="#a81704d66d34e37d3e0e159b5f436babf">More...</a><br /></td></tr>
161 <tr class="separator:a81704d66d34e37d3e0e159b5f436babf"><td class="memSeparator" colspan="2">&#160;</td></tr>
162 <tr class="memitem:a2275e64c3c74dea855c39b66be67f705"><td class="memItemLeft" align="right" valign="top">MUTILS_API QStringList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a2275e64c3c74dea855c39b66be67f705">available_codepages</a> (const bool &amp;noAliases=true)</td></tr>
163 <tr class="memdesc:a2275e64c3c74dea855c39b66be67f705"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a list of all available codepages.  <a href="#a2275e64c3c74dea855c39b66be67f705">More...</a><br /></td></tr>
164 <tr class="separator:a2275e64c3c74dea855c39b66be67f705"><td class="memSeparator" colspan="2">&#160;</td></tr>
165 </table><table class="memberdecls">
166 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
167 Variables</h2></td></tr>
168 <tr class="memitem:a4073b3c626fa07dd5530ddc2d0388939"><td class="memItemLeft" align="right" valign="top"><a id="a4073b3c626fa07dd5530ddc2d0388939"></a>
169 class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>IPCChannel_Private</b></td></tr>
170 <tr class="separator:a4073b3c626fa07dd5530ddc2d0388939"><td class="memSeparator" colspan="2">&#160;</td></tr>
171 <tr class="memitem:a78cd148fbdfdf4f799a3b7562f7981c0"><td class="memItemLeft" align="right" valign="top"><a id="a78cd148fbdfdf4f799a3b7562f7981c0"></a>
172 class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>Taskbar7_Private</b></td></tr>
173 <tr class="separator:a78cd148fbdfdf4f799a3b7562f7981c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
174 </table>
175 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
176 <div class="textblock"><p>Global <a class="el" href="../../d3/da6/namespace_m_utils.html" title="Global MUtils namespace. ">MUtils</a> namespace. </p>
177 <p>INTERNAL </p>
178 </div><h2 class="groupheader">Function Documentation</h2>
179 <a id="a2275e64c3c74dea855c39b66be67f705"></a>
180 <h2 class="memtitle"><span class="permalink"><a href="#a2275e64c3c74dea855c39b66be67f705">&sect;&nbsp;</a></span>available_codepages()</h2>
181
182 <div class="memitem">
183 <div class="memproto">
184       <table class="memname">
185         <tr>
186           <td class="memname">MUTILS_API QStringList MUtils::available_codepages </td>
187           <td>(</td>
188           <td class="paramtype">const bool &amp;&#160;</td>
189           <td class="paramname"><em>noAliases</em> = <code>true</code></td><td>)</td>
190           <td></td>
191         </tr>
192       </table>
193 </div><div class="memdoc">
194
195 <p>Retrieve a list of all available codepages. </p>
196 <p>The function generates a list of all codepages that are available on the system. Each codepage name returned by this function may be passed to the <code>QTextCodec::codecForName()</code> function in order to obtain a corresponding <a href="http://doc.qt.io/qt-4.8/qtextcodec.html">QTextCodec</a> object.</p>
197 <dl class="params"><dt>Parameters</dt><dd>
198   <table class="params">
199     <tr><td class="paramname">noAliases</td><td>If set to <code>true</code>, only distinct codepages are returned, i.e. any codepage aliases are discarded from the list; if set to <code>false</code>, the returned list may (and usually will) also contain codepage aliases.</td></tr>
200   </table>
201   </dd>
202 </dl>
203 <dl class="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a QStringList holding the names of all codepages available on the system; otherwise it returns a default-constructed QStringList. </dd></dl>
204
205 </div>
206 </div>
207 <a id="aeb7783b8ecbe163501ce60dce8b6709f"></a>
208 <h2 class="memtitle"><span class="permalink"><a href="#aeb7783b8ecbe163501ce60dce8b6709f">&sect;&nbsp;</a></span>clean_file_name()</h2>
209
210 <div class="memitem">
211 <div class="memproto">
212       <table class="memname">
213         <tr>
214           <td class="memname">MUTILS_API QString MUtils::clean_file_name </td>
215           <td>(</td>
216           <td class="paramtype">const QString &amp;&#160;</td>
217           <td class="paramname"><em>name</em>, </td>
218         </tr>
219         <tr>
220           <td class="paramkey"></td>
221           <td></td>
222           <td class="paramtype">const bool &amp;&#160;</td>
223           <td class="paramname"><em>pretty</em>&#160;</td>
224         </tr>
225         <tr>
226           <td></td>
227           <td>)</td>
228           <td></td><td></td>
229         </tr>
230       </table>
231 </div><div class="memdoc">
232
233 <p>Clean up a file name string. </p>
234 <p>This function ensures that the given string is a valid file (or directory) name. It does so by replacing any illegal characters, i.e. any characters <em>not</em> allowed in file names (which explicitly <em>includes</em> directory separators). Furthermore, the function will trim/remove specific characters that are <em>not</em> allowed directly at the beginning or end of a file name. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file name.</p>
235 <dl class="params"><dt>Parameters</dt><dd>
236   <table class="params">
237     <tr><td class="paramname">name</td><td>A read-only reference to the QString holding the original, potentially invalid file name.</td></tr>
238     <tr><td class="paramname">pretty</td><td>If set to <code>true</code>, the function tries to generate a "pretty" file name from the given file name. Otherwise, the function simply replaces each forbidden file name character by an underscore character.</td></tr>
239   </table>
240   </dd>
241 </dl>
242 <dl class="section return"><dt>Returns</dt><dd>The function returns a QString holding a valid file name. If, however, the input string was empty or contained only white-space characters, the returned sting can be empty. </dd></dl>
243
244 </div>
245 </div>
246 <a id="adb5da6435b27e10443060dd2550784f3"></a>
247 <h2 class="memtitle"><span class="permalink"><a href="#adb5da6435b27e10443060dd2550784f3">&sect;&nbsp;</a></span>clean_file_path()</h2>
248
249 <div class="memitem">
250 <div class="memproto">
251       <table class="memname">
252         <tr>
253           <td class="memname">MUTILS_API QString MUtils::clean_file_path </td>
254           <td>(</td>
255           <td class="paramtype">const QString &amp;&#160;</td>
256           <td class="paramname"><em>path</em>, </td>
257         </tr>
258         <tr>
259           <td class="paramkey"></td>
260           <td></td>
261           <td class="paramtype">const bool &amp;&#160;</td>
262           <td class="paramname"><em>pretty</em>&#160;</td>
263         </tr>
264         <tr>
265           <td></td>
266           <td>)</td>
267           <td></td><td></td>
268         </tr>
269       </table>
270 </div><div class="memdoc">
271
272 <p>Clean up a file path string. </p>
273 <p>This function ensures that the given string is a valid file (or directory) path. It does so by replacing any illegal characters, i.e. any characters <em>not</em> allowed in file paths. Directory separators are preserved, but they will be "canonicalized". Furthermore, in each path component, the function will trim/remove specific characters that are <em>not</em> allowed directly at the beginning or end of a path component. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file path.</p>
274 <dl class="params"><dt>Parameters</dt><dd>
275   <table class="params">
276     <tr><td class="paramname">path</td><td>A read-only reference to the QString holding the original, potentially invalid file path.</td></tr>
277     <tr><td class="paramname">pretty</td><td>If set to <code>true</code>, the function tries to generate "pretty" file names from the given file names. Otherwise, the function simply replaces each forbidden file name character by an underscore character.</td></tr>
278   </table>
279   </dd>
280 </dl>
281 <dl class="section return"><dt>Returns</dt><dd>The function returns a QString holding a valid file path. If, however, the input string was empty or contained only white-space characters, the returned sting can be empty. </dd></dl>
282
283 </div>
284 </div>
285 <a id="a0ecb5d72f33a7b6feadd7deb8ed46cc3"></a>
286 <h2 class="memtitle"><span class="permalink"><a href="#a0ecb5d72f33a7b6feadd7deb8ed46cc3">&sect;&nbsp;</a></span>init_process()</h2>
287
288 <div class="memitem">
289 <div class="memproto">
290       <table class="memname">
291         <tr>
292           <td class="memname">MUTILS_API void MUtils::init_process </td>
293           <td>(</td>
294           <td class="paramtype">QProcess &amp;&#160;</td>
295           <td class="paramname"><em>process</em>, </td>
296         </tr>
297         <tr>
298           <td class="paramkey"></td>
299           <td></td>
300           <td class="paramtype">const QString &amp;&#160;</td>
301           <td class="paramname"><em>wokringDir</em>, </td>
302         </tr>
303         <tr>
304           <td class="paramkey"></td>
305           <td></td>
306           <td class="paramtype">const bool&#160;</td>
307           <td class="paramname"><em>bReplaceTempDir</em> = <code>true</code>, </td>
308         </tr>
309         <tr>
310           <td class="paramkey"></td>
311           <td></td>
312           <td class="paramtype">const QStringList *const&#160;</td>
313           <td class="paramname"><em>extraPaths</em> = <code>NULL</code>&#160;</td>
314         </tr>
315         <tr>
316           <td></td>
317           <td>)</td>
318           <td></td><td></td>
319         </tr>
320       </table>
321 </div><div class="memdoc">
322
323 <p>Initialize a given <a href="http://doc.qt.io/qt-4.8/qprocess.html">QProcess</a> object. </p>
324 <p>This function prepares a given <a href="http://doc.qt.io/qt-4.8/qprocess.html">QProcess</a> object for sub-process creation. It does so by setting up combined <em>stdout</em> and <em>stderr</em> redirection for the sub-process, cleaning up the sub-process' environment variables, as well as setting up the sub-process' working directory. Optionally, the <em>Temp</em> directory for the sub-process can be set to the application-specific <em>Temp</em> directory, which is achieved by overwriting the corresponding environment variables (e.g. <code>TMP</code> and <code>TEMP</code>). Furthermore, additional paths can be added to the <code>PATH</code> environment variable of the sub-process.</p>
325 <dl class="params"><dt>Parameters</dt><dd>
326   <table class="params">
327     <tr><td class="paramname">process</td><td>A reference to the <a href="http://doc.qt.io/qt-4.8/qprocess.html">QProcess</a> object to be initialized. The <a href="http://doc.qt.io/qt-4.8/qprocess.html">QProcess</a> object must be initialized <em>before</em> calling the <code>QProcess::start()</code> method.</td></tr>
328     <tr><td class="paramname">process</td><td>A read-only reference to a QString holding the path of the working directory for the sub-process.</td></tr>
329     <tr><td class="paramname">bReplaceTempDir</td><td>If set to <code>true</code>, the <em>Temp</em> directory for the sub-process is set to the application-specific <em>Temp</em> directory; if set to <code>false</code>, the default <em>Temp</em> directory is retained.</td></tr>
330     <tr><td class="paramname">extraPaths</td><td>A read-only pointer to a QStringList object containing additional paths that will be added (prepended) to the sub-process' <code>PATH</code> environment variable. This parameter can be <code>NULL</code>, in which case <em>no</em> additional paths are added. </td></tr>
331   </table>
332   </dd>
333 </dl>
334
335 </div>
336 </div>
337 <a id="a29461116550863e8730f3f4ec479bbcb"></a>
338 <h2 class="memtitle"><span class="permalink"><a href="#a29461116550863e8730f3f4ec479bbcb">&sect;&nbsp;</a></span>make_temp_file()</h2>
339
340 <div class="memitem">
341 <div class="memproto">
342       <table class="memname">
343         <tr>
344           <td class="memname">MUTILS_API QString MUtils::make_temp_file </td>
345           <td>(</td>
346           <td class="paramtype">const QString &amp;&#160;</td>
347           <td class="paramname"><em>basePath</em>, </td>
348         </tr>
349         <tr>
350           <td class="paramkey"></td>
351           <td></td>
352           <td class="paramtype">const QString &amp;&#160;</td>
353           <td class="paramname"><em>extension</em>, </td>
354         </tr>
355         <tr>
356           <td class="paramkey"></td>
357           <td></td>
358           <td class="paramtype">const bool&#160;</td>
359           <td class="paramname"><em>placeholder</em> = <code>false</code>&#160;</td>
360         </tr>
361         <tr>
362           <td></td>
363           <td>)</td>
364           <td></td><td></td>
365         </tr>
366       </table>
367 </div><div class="memdoc">
368
369 <p>Generates a temporary file name. </p>
370 <p>The function generates a file name that contains a <em>random</em> component and that is guaranteed to <b>not</b> exist yet. The generated file name follows a <code>"&lt;basedir&gt;/&lt;random&gt;.&lt;ext&gt;"</code> pattern. This is useful (not only) for creating temporary files.</p>
371 <dl class="params"><dt>Parameters</dt><dd>
372   <table class="params">
373     <tr><td class="paramname">basePath</td><td>Specifies the "base" directory where the temporary file is supposed to be created. This must be a valid <em>existing</em> directory.</td></tr>
374     <tr><td class="paramname">extension</td><td>Specifies the desired file extensions of the temporary file. Do <b>not</b> include a leading dot (<code>.</code>) character.</td></tr>
375     <tr><td class="paramname">placeholder</td><td>If set to <code>true</code>, the function creates an empty "placeholder" file under the returned file name; if set to <code>false</code>, it does <em>not</em>.</td></tr>
376   </table>
377   </dd>
378 </dl>
379 <dl class="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a QString holding the full path of the temporary file; otherwise it returns a default-constructed QString. </dd></dl>
380
381 </div>
382 </div>
383 <a id="af9afe3821ae9bef7bdf56a4183fdea0d"></a>
384 <h2 class="memtitle"><span class="permalink"><a href="#af9afe3821ae9bef7bdf56a4183fdea0d">&sect;&nbsp;</a></span>make_unique_file()</h2>
385
386 <div class="memitem">
387 <div class="memproto">
388       <table class="memname">
389         <tr>
390           <td class="memname">MUTILS_API QString MUtils::make_unique_file </td>
391           <td>(</td>
392           <td class="paramtype">const QString &amp;&#160;</td>
393           <td class="paramname"><em>basePath</em>, </td>
394         </tr>
395         <tr>
396           <td class="paramkey"></td>
397           <td></td>
398           <td class="paramtype">const QString &amp;&#160;</td>
399           <td class="paramname"><em>baseName</em>, </td>
400         </tr>
401         <tr>
402           <td class="paramkey"></td>
403           <td></td>
404           <td class="paramtype">const QString &amp;&#160;</td>
405           <td class="paramname"><em>extension</em>, </td>
406         </tr>
407         <tr>
408           <td class="paramkey"></td>
409           <td></td>
410           <td class="paramtype">const bool&#160;</td>
411           <td class="paramname"><em>fancy</em> = <code>false</code>&#160;</td>
412         </tr>
413         <tr>
414           <td></td>
415           <td>)</td>
416           <td></td><td></td>
417         </tr>
418       </table>
419 </div><div class="memdoc">
420
421 <p>Generates a unique file name. </p>
422 <p>The function generates a unique file name in the specified directory. The function guarantees that the returned file name does <em>not</em> exist yet. If necessary, a <em>counter</em> will be included in the file name in order to ensure its uniqueness.</p>
423 <dl class="params"><dt>Parameters</dt><dd>
424   <table class="params">
425     <tr><td class="paramname">basePath</td><td>Specifies the "base" directory where the unique file is supposed to be created. This must be a valid <em>existing</em> directory.</td></tr>
426     <tr><td class="paramname">baseName</td><td>Specifies the desired "base" file name of the unique file. Do <b>not</b> include a file extension.</td></tr>
427     <tr><td class="paramname">extension</td><td>Specifies the desired file extensions of the unique file. Do <b>not</b> include a leading dot (<code>.</code>) character.</td></tr>
428     <tr><td class="paramname">fancy</td><td>If set to <code>true</code>, the unique file name is generated according to the <code>"&lt;basedir&gt;/&lt;basename&gt; (N).&lt;ext&gt;"</code> pattern; if set to <code>false</code>, it is generated according to the <code>"&lt;basedir&gt;/&lt;basename&gt;.XXXX.&lt;ext&gt;"</code> pattern. Also, if set to <code>true</code>, a counter is only included in the file name, if the file name <em>without</em> counter already exists; if set to <code>false</code>, a counter is always included. Finally, if set to <code>true</code>, the counter starts at <b>2</b> and is printed in decimal format; if set to <code>false</code>, the counter starts at <b>0</b> and is printed in zero-padded hexadecimal format.</td></tr>
429   </table>
430   </dd>
431 </dl>
432 <dl class="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a QString holding the full path of the unique file; otherwise it returns a default-constructed QString. </dd></dl>
433
434 </div>
435 </div>
436 <a id="a4d4c545ea06892f6487f15a48808564f"></a>
437 <h2 class="memtitle"><span class="permalink"><a href="#a4d4c545ea06892f6487f15a48808564f">&sect;&nbsp;</a></span>natural_string_sort()</h2>
438
439 <div class="memitem">
440 <div class="memproto">
441       <table class="memname">
442         <tr>
443           <td class="memname">MUTILS_API void MUtils::natural_string_sort </td>
444           <td>(</td>
445           <td class="paramtype">QStringList &amp;&#160;</td>
446           <td class="paramname"><em>list</em>, </td>
447         </tr>
448         <tr>
449           <td class="paramkey"></td>
450           <td></td>
451           <td class="paramtype">const bool&#160;</td>
452           <td class="paramname"><em>bIgnoreCase</em>&#160;</td>
453         </tr>
454         <tr>
455           <td></td>
456           <td>)</td>
457           <td></td><td></td>
458         </tr>
459       </table>
460 </div><div class="memdoc">
461
462 <p>Sort a list of strings using "natural ordering" algorithm. </p>
463 <p>This function implements a sort algorithm that orders alphanumeric strings in the way a human being would. See <a href="http://sourcefrog.net/projects/natsort/"><em>Natural Order String Comparison</em></a> for details!</p>
464 <dl class="params"><dt>Parameters</dt><dd>
465   <table class="params">
466     <tr><td class="paramname">list</td><td>A reference to the QStringList object to be sorted. The list will be sorted "in place".</td></tr>
467     <tr><td class="paramname">bIgnoreCase</td><td>If set to <code>true</code>, the list will be sorted disregarding the character case, i.e. upper-case and lower-case characters (of the same letter) are treated the same; if set to <code>false</code>, the character case <em>is</em> taken into account. </td></tr>
468   </table>
469   </dd>
470 </dl>
471
472 </div>
473 </div>
474 <a id="ac583617546d5ae100ce7436546d9662c"></a>
475 <h2 class="memtitle"><span class="permalink"><a href="#ac583617546d5ae100ce7436546d9662c">&sect;&nbsp;</a></span>next_rand_str()</h2>
476
477 <div class="memitem">
478 <div class="memproto">
479       <table class="memname">
480         <tr>
481           <td class="memname">MUTILS_API QString MUtils::next_rand_str </td>
482           <td>(</td>
483           <td class="paramtype">const bool &amp;&#160;</td>
484           <td class="paramname"><em>bLong</em> = <code>false</code></td><td>)</td>
485           <td></td>
486         </tr>
487       </table>
488 </div><div class="memdoc">
489
490 <p>Generates a <em>random</em> string. </p>
491 <p>The random string is generated using the same PRNG as the <code><a class="el" href="../../d3/da6/namespace_m_utils.html#ad7edd4aece64faf3aa16c9509243608c" title="Generates a random unsigned 64-Bit value. ">next_rand_u64()</a></code> function. The <em>random</em> bytes are converted to a hexadecimal string and, if necessary, zero-padded to a toal length of 16 or 32 characters. There is <b>no</b> <code>0x</code>-prefix included in the result.</p>
492 <dl class="params"><dt>Parameters</dt><dd>
493   <table class="params">
494     <tr><td class="paramname">bLong</td><td>If set to <code>true</code>, a "long" random string (32 characters) will be generated; if set to <code>false</code>, a "short" random string (16 characters) is generated.</td></tr>
495   </table>
496   </dd>
497 </dl>
498 <dl class="section return"><dt>Returns</dt><dd>The function returns a QString holding a <em>random</em> hexadecimal string </dd></dl>
499
500 </div>
501 </div>
502 <a id="a1c9832c1d645a2c90e9bd52d57d843b3"></a>
503 <h2 class="memtitle"><span class="permalink"><a href="#a1c9832c1d645a2c90e9bd52d57d843b3">&sect;&nbsp;</a></span>next_rand_u32()</h2>
504
505 <div class="memitem">
506 <div class="memproto">
507       <table class="memname">
508         <tr>
509           <td class="memname">MUTILS_API quint32 MUtils::next_rand_u32 </td>
510           <td>(</td>
511           <td class="paramtype">void&#160;</td>
512           <td class="paramname"></td><td>)</td>
513           <td></td>
514         </tr>
515       </table>
516 </div><div class="memdoc">
517
518 <p>Generates a <em>random</em> unsigned 32-Bit value. </p>
519 <p>The <em>random</em> value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is <b>not</b> required or useful to call <code>srand()</code> or <code>qsrand()</code> prior to using this function. If necessary, the seeding of the PRNG happen <em>automatically</em> on the first call.</p>
520 <dl class="section return"><dt>Returns</dt><dd>The function returns a <em>random</em> unsigned 32-Bit value. </dd></dl>
521
522 </div>
523 </div>
524 <a id="ad7edd4aece64faf3aa16c9509243608c"></a>
525 <h2 class="memtitle"><span class="permalink"><a href="#ad7edd4aece64faf3aa16c9509243608c">&sect;&nbsp;</a></span>next_rand_u64()</h2>
526
527 <div class="memitem">
528 <div class="memproto">
529       <table class="memname">
530         <tr>
531           <td class="memname">MUTILS_API quint64 MUtils::next_rand_u64 </td>
532           <td>(</td>
533           <td class="paramtype">void&#160;</td>
534           <td class="paramname"></td><td>)</td>
535           <td></td>
536         </tr>
537       </table>
538 </div><div class="memdoc">
539
540 <p>Generates a <em>random</em> unsigned 64-Bit value. </p>
541 <p>The <em>random</em> value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is <b>not</b> required or useful to call <code>srand()</code> or <code>qsrand()</code> prior to using this function. If necessary, the seeding of the PRNG happen <em>automatically</em> on the first call.</p>
542 <dl class="section return"><dt>Returns</dt><dd>The function returns a <em>random</em> unsigned 64-Bit value. </dd></dl>
543
544 </div>
545 </div>
546 <a id="aea4a212153b09b24b04f30ef5159f29b"></a>
547 <h2 class="memtitle"><span class="permalink"><a href="#aea4a212153b09b24b04f30ef5159f29b">&sect;&nbsp;</a></span>parity()</h2>
548
549 <div class="memitem">
550 <div class="memproto">
551       <table class="memname">
552         <tr>
553           <td class="memname">MUTILS_API bool MUtils::parity </td>
554           <td>(</td>
555           <td class="paramtype">quint32&#160;</td>
556           <td class="paramname"><em>value</em></td><td>)</td>
557           <td></td>
558         </tr>
559       </table>
560 </div><div class="memdoc">
561
562 <p>Computes the <em>parity</em> of the given unsigned 32-Bit value. </p>
563 <dl class="params"><dt>Parameters</dt><dd>
564   <table class="params">
565     <tr><td class="paramname">value</td><td>The 32-Bit unsigned value from which the parity is to be computed.</td></tr>
566   </table>
567   </dd>
568 </dl>
569 <dl class="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the number of <b>1</b> bits in the given value is <em>odd</em>; it returns <code>false</code>, if the number of <b>1</b> bits in the given value is <em>even</em>. </dd></dl>
570
571 </div>
572 </div>
573 <a id="ad2a851b289ee66873d3a1ec86f5f34eb"></a>
574 <h2 class="memtitle"><span class="permalink"><a href="#ad2a851b289ee66873d3a1ec86f5f34eb">&sect;&nbsp;</a></span>regexp_parse_uint32() <span class="overload">[1/2]</span></h2>
575
576 <div class="memitem">
577 <div class="memproto">
578       <table class="memname">
579         <tr>
580           <td class="memname">MUTILS_API bool MUtils::regexp_parse_uint32 </td>
581           <td>(</td>
582           <td class="paramtype">const QRegExp &amp;&#160;</td>
583           <td class="paramname"><em>regexp</em>, </td>
584         </tr>
585         <tr>
586           <td class="paramkey"></td>
587           <td></td>
588           <td class="paramtype">quint32 &amp;&#160;</td>
589           <td class="paramname"><em>value</em>&#160;</td>
590         </tr>
591         <tr>
592           <td></td>
593           <td>)</td>
594           <td></td><td></td>
595         </tr>
596       </table>
597 </div><div class="memdoc">
598
599 <p>Parse regular expression results. </p>
600 <p>This function tries to parses the result (capture) of a regular expression as an unsigned 32-Bit value. The given regular expression must contain at least <em>one</em> capture. Only the <em>first</em> capture is considered, additional captures are ignored.</p>
601 <dl class="params"><dt>Parameters</dt><dd>
602   <table class="params">
603     <tr><td class="paramname">regexp</td><td>A read-only reference to the <a href="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object whose result (capture) will be parsed. This <a href="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> must already have been <em>successfully</em> matched against the respective input string, e.g. via <code>QRegExp::indexIn()</code>, prior to calling this function.</td></tr>
604     <tr><td class="paramname">value</td><td>A reference to a variable of type <code>quint32</code>, where the unsigned 32-Bit representation of the result will be stored. The contents of this variable are <em>undefined</em>, if the function failed.</td></tr>
605   </table>
606   </dd>
607 </dl>
608 <dl class="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the regular expression's capture could be parsed successfully; it returns <code>false</code>, if the capture contains an invalid string or if there are insufficient captures in given the <a href="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object. </dd></dl>
609
610 </div>
611 </div>
612 <a id="a81704d66d34e37d3e0e159b5f436babf"></a>
613 <h2 class="memtitle"><span class="permalink"><a href="#a81704d66d34e37d3e0e159b5f436babf">&sect;&nbsp;</a></span>regexp_parse_uint32() <span class="overload">[2/2]</span></h2>
614
615 <div class="memitem">
616 <div class="memproto">
617       <table class="memname">
618         <tr>
619           <td class="memname">MUTILS_API bool MUtils::regexp_parse_uint32 </td>
620           <td>(</td>
621           <td class="paramtype">const QRegExp &amp;&#160;</td>
622           <td class="paramname"><em>regexp</em>, </td>
623         </tr>
624         <tr>
625           <td class="paramkey"></td>
626           <td></td>
627           <td class="paramtype">quint32 *&#160;</td>
628           <td class="paramname"><em>values</em>, </td>
629         </tr>
630         <tr>
631           <td class="paramkey"></td>
632           <td></td>
633           <td class="paramtype">const size_t &amp;&#160;</td>
634           <td class="paramname"><em>count</em>&#160;</td>
635         </tr>
636         <tr>
637           <td></td>
638           <td>)</td>
639           <td></td><td></td>
640         </tr>
641       </table>
642 </div><div class="memdoc">
643
644 <p>Parse regular expression results. </p>
645 <p>This function tries to parses the results (captures) of a regular expression as unsigned 32-Bit values. The given regular expression must contain at least <code>count</code> captures. Only the <em>first</em> <code>count</code> captures are considered, additional captures are ignored.</p>
646 <dl class="params"><dt>Parameters</dt><dd>
647   <table class="params">
648     <tr><td class="paramname">regexp</td><td>A read-only reference to the <a href="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object whose results (captures) will be parsed. This <a href="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> must already have been <em>successfully</em> matched against the respective input string, e.g. via <code>QRegExp::indexIn()</code>, prior to calling this function.</td></tr>
649     <tr><td class="paramname">value</td><td>A pointer to an array of type <code>quint32</code>, where the unsigned 32-Bit representations of the results will be stored (the <code>n</code>-th result is stored at <code>value[n-1]</code>). The array must be at least <code>count</code> elements in length. The contents of this array are <em>undefined</em>, if the function failed.</td></tr>
650     <tr><td class="paramname">count</td><td>Specifies the number of results (captures) in the given <a href="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object. The function tries to parse the first <code>count</code> captures and ignores any additional captures that may exist. This parameter also determines the required (minimum) length of the <code>value</code> array.</td></tr>
651   </table>
652   </dd>
653 </dl>
654 <dl class="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if all of the regular expression's captures could be parsed successfully; it returns <code>false</code>, if any of the captures contain an invalid string or if there are insufficient captures in given the <a href="http://doc.qt.io/qt-4.8/qregexp.html">QRegExp</a> object. </dd></dl>
655
656 </div>
657 </div>
658 <a id="a4d451ddc82668d1298f2922f62474b5d"></a>
659 <h2 class="memtitle"><span class="permalink"><a href="#a4d451ddc82668d1298f2922f62474b5d">&sect;&nbsp;</a></span>remove_directory()</h2>
660
661 <div class="memitem">
662 <div class="memproto">
663       <table class="memname">
664         <tr>
665           <td class="memname">MUTILS_API bool MUtils::remove_directory </td>
666           <td>(</td>
667           <td class="paramtype">const QString &amp;&#160;</td>
668           <td class="paramname"><em>folderPath</em>, </td>
669         </tr>
670         <tr>
671           <td class="paramkey"></td>
672           <td></td>
673           <td class="paramtype">const bool &amp;&#160;</td>
674           <td class="paramname"><em>recursive</em>&#160;</td>
675         </tr>
676         <tr>
677           <td></td>
678           <td>)</td>
679           <td></td><td></td>
680         </tr>
681       </table>
682 </div><div class="memdoc">
683
684 <p>Recursively deletes the specified directory. </p>
685 <p>The function deletes the specified directory. In <em>recursive</em> mode, the directory will be removed including all of its files and sub-directories. Files are deleted using the <code><a class="el" href="../../d3/da6/namespace_m_utils.html#a5a14e75627eebd09efc37898d74c5ac6" title="Deletes the specified file. ">remove_file()</a></code> function.</p>
686 <dl class="params"><dt>Parameters</dt><dd>
687   <table class="params">
688     <tr><td class="paramname">folderPath</td><td>The path to the directory to be deleted. This should be a full path.</td></tr>
689     <tr><td class="paramname">recursive</td><td>If set to <code>true</code> the function removes all files and sub-directories in the specified directory; if set to <code>false</code>, the function will <em>not</em> try to delete any files or sub-directories, which means that it will fail on non-empty directories.</td></tr>
690   </table>
691   </dd>
692 </dl>
693 <dl class="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the directory was deleted successfully or if the directory doesn't exist; it returns <code>false</code>, if the directory could <em>not</em> be deleted. </dd></dl>
694
695 </div>
696 </div>
697 <a id="a5a14e75627eebd09efc37898d74c5ac6"></a>
698 <h2 class="memtitle"><span class="permalink"><a href="#a5a14e75627eebd09efc37898d74c5ac6">&sect;&nbsp;</a></span>remove_file()</h2>
699
700 <div class="memitem">
701 <div class="memproto">
702       <table class="memname">
703         <tr>
704           <td class="memname">MUTILS_API bool MUtils::remove_file </td>
705           <td>(</td>
706           <td class="paramtype">const QString &amp;&#160;</td>
707           <td class="paramname"><em>fileName</em></td><td>)</td>
708           <td></td>
709         </tr>
710       </table>
711 </div><div class="memdoc">
712
713 <p>Deletes the specified file. </p>
714 <p>The function deletes the specified file, even if it has the "read only" flag set. If the file is currently locked (e.g. by another process), the function retries multiple times to delete the file before it fails.</p>
715 <dl class="params"><dt>Parameters</dt><dd>
716   <table class="params">
717     <tr><td class="paramname">fileName</td><td>The path to the file to be deleted. This should be a full path.</td></tr>
718   </table>
719   </dd>
720 </dl>
721 <dl class="section return"><dt>Returns</dt><dd>The function returns <code>true</code>, if the file was deleted successfully or if the file doesn't exist; it returns <code>false</code>, if the file could <em>not</em> be deleted. </dd></dl>
722
723 </div>
724 </div>
725 <a id="a3f198156e8be91f3e74dd9ed69ffaa34"></a>
726 <h2 class="memtitle"><span class="permalink"><a href="#a3f198156e8be91f3e74dd9ed69ffaa34">&sect;&nbsp;</a></span>temp_folder()</h2>
727
728 <div class="memitem">
729 <div class="memproto">
730       <table class="memname">
731         <tr>
732           <td class="memname">MUTILS_API const QString&amp; MUtils::temp_folder </td>
733           <td>(</td>
734           <td class="paramtype">void&#160;</td>
735           <td class="paramname"></td><td>)</td>
736           <td></td>
737         </tr>
738       </table>
739 </div><div class="memdoc">
740
741 <p>Rerieves the full path of the application's <em>Temp</em> folder. </p>
742 <p>The application's <em>Temp</em> folder is a unique application-specific folder, intended to store any temporary files that the application may need. It will be created when this function is called for the first time (lazy initialization); subsequent calls are guaranteed to return the same path. Usually the application's <em>Temp</em> folder will be created as a sub-folder of the system's global <em>Temp</em> folder, as indicated by the <code>TMP</code> or <code>TEMP</code> environment variables. However, it may be created at a different place (e.g. in the users <em>Profile</em> directory), if those environment variables don't point to a usable directory. In any case, this function makes sure that the application's <em>Temp</em> folder exists for the whole lifetime of the application and that it is writable. When the application terminates normally, the application's <em>Temp</em> folder and all files or sub-directories thereof will be <em>removed</em> automatically!</p>
743 <dl class="section return"><dt>Returns</dt><dd>If the function succeeds, it returns a read-only reference to a QString holding the full path of the application's <em>Temp</em> folder; otherwise a read-only reference to a default-constructed QString is returned. </dd></dl>
744
745 </div>
746 </div>
747 <a id="a20b8fc56856ee904caaded756399e705"></a>
748 <h2 class="memtitle"><span class="permalink"><a href="#a20b8fc56856ee904caaded756399e705">&sect;&nbsp;</a></span>trim_left() <span class="overload">[1/2]</span></h2>
749
750 <div class="memitem">
751 <div class="memproto">
752       <table class="memname">
753         <tr>
754           <td class="memname">MUTILS_API QString&amp; MUtils::trim_left </td>
755           <td>(</td>
756           <td class="paramtype">QString &amp;&#160;</td>
757           <td class="paramname"><em>str</em></td><td>)</td>
758           <td></td>
759         </tr>
760       </table>
761 </div><div class="memdoc">
762
763 <p>Remove <em>leading</em> white-space characters. </p>
764 <p>The function removes all <em>leading</em> white-space characters from the specified string. Trailing white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
765 <dl class="params"><dt>Parameters</dt><dd>
766   <table class="params">
767     <tr><td class="paramname">str</td><td>A reference to the QString object to be trimmed. This QString object will be modified directly.</td></tr>
768   </table>
769   </dd>
770 </dl>
771 <dl class="section return"><dt>Returns</dt><dd>A reference to the trimmed QString object. This is the same QString object that was specified in the <code>str</code> parameter. </dd></dl>
772
773 </div>
774 </div>
775 <a id="ae43bc17b6fa4ee2287099c4ae095483b"></a>
776 <h2 class="memtitle"><span class="permalink"><a href="#ae43bc17b6fa4ee2287099c4ae095483b">&sect;&nbsp;</a></span>trim_left() <span class="overload">[2/2]</span></h2>
777
778 <div class="memitem">
779 <div class="memproto">
780       <table class="memname">
781         <tr>
782           <td class="memname">MUTILS_API QString MUtils::trim_left </td>
783           <td>(</td>
784           <td class="paramtype">const QString &amp;&#160;</td>
785           <td class="paramname"><em>str</em></td><td>)</td>
786           <td></td>
787         </tr>
788       </table>
789 </div><div class="memdoc">
790
791 <p>Remove <em>trailing</em> white-space characters. </p>
792 <p>The function removes all <em>leading</em> white-space characters from the specified string. Trailing white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
793 <dl class="params"><dt>Parameters</dt><dd>
794   <table class="params">
795     <tr><td class="paramname">str</td><td>A read-only reference to the QString object to be trimmed. The original QString object is <em>not</em> modified.</td></tr>
796   </table>
797   </dd>
798 </dl>
799 <dl class="section return"><dt>Returns</dt><dd>A new QString object that equals the original QString object, except that it has all <em>leading</em> white-space characters removed. </dd></dl>
800
801 </div>
802 </div>
803 <a id="a6118cf23d2b771fae1ad159c7ea6686a"></a>
804 <h2 class="memtitle"><span class="permalink"><a href="#a6118cf23d2b771fae1ad159c7ea6686a">&sect;&nbsp;</a></span>trim_right() <span class="overload">[1/2]</span></h2>
805
806 <div class="memitem">
807 <div class="memproto">
808       <table class="memname">
809         <tr>
810           <td class="memname">MUTILS_API QString&amp; MUtils::trim_right </td>
811           <td>(</td>
812           <td class="paramtype">QString &amp;&#160;</td>
813           <td class="paramname"><em>str</em></td><td>)</td>
814           <td></td>
815         </tr>
816       </table>
817 </div><div class="memdoc">
818
819 <p>Remove <em>trailing</em> white-space characters. </p>
820 <p>The function removes all <em>trailing</em> white-space characters from the specified string. Leading white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
821 <dl class="params"><dt>Parameters</dt><dd>
822   <table class="params">
823     <tr><td class="paramname">str</td><td>A reference to the QString object to be trimmed. This QString object will be modified directly.</td></tr>
824   </table>
825   </dd>
826 </dl>
827 <dl class="section return"><dt>Returns</dt><dd>A reference to the trimmed QString object. This is the same QString object that was specified in the <code>str</code> parameter. </dd></dl>
828
829 </div>
830 </div>
831 <a id="a3bcb0fce5181ded3c54456379147009d"></a>
832 <h2 class="memtitle"><span class="permalink"><a href="#a3bcb0fce5181ded3c54456379147009d">&sect;&nbsp;</a></span>trim_right() <span class="overload">[2/2]</span></h2>
833
834 <div class="memitem">
835 <div class="memproto">
836       <table class="memname">
837         <tr>
838           <td class="memname">MUTILS_API QString MUtils::trim_right </td>
839           <td>(</td>
840           <td class="paramtype">const QString &amp;&#160;</td>
841           <td class="paramname"><em>str</em></td><td>)</td>
842           <td></td>
843         </tr>
844       </table>
845 </div><div class="memdoc">
846
847 <p>Remove <em>trailing</em> white-space characters. </p>
848 <p>The function removes all <em>trailing</em> white-space characters from the specified string. Leading white-space characters are <em>not</em> removed. White-space characters are defined by the <code>\s</code> character class.</p>
849 <dl class="params"><dt>Parameters</dt><dd>
850   <table class="params">
851     <tr><td class="paramname">str</td><td>A read-only reference to the QString object to be trimmed. The original QString object is <em>not</em> modified.</td></tr>
852   </table>
853   </dd>
854 </dl>
855 <dl class="section return"><dt>Returns</dt><dd>A new QString object that equals the original QString object, except that it has all <em>trailing</em> white-space characters removed. </dd></dl>
856
857 </div>
858 </div>
859 </div><!-- contents -->
860 <!-- start footer part -->
861 <hr class="footer"/><address class="footer"><small>
862 Generated by &#160;<a href="http://www.doxygen.org/index.html">
863 <img class="footer" src="../../doxygen.png" alt="doxygen"/>
864 </a> 1.8.12
865 </small></address>
866 </body>
867 </html>