Fixed some typos + moved "main" page to a separate .dox file.

This commit is contained in:
LoRd_MuldeR 2016-12-19 17:46:05 +01:00
parent 53830e0b96
commit ad051347b8
11 changed files with 172 additions and 102 deletions

View File

@ -60,7 +60,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\
<li><code>etc/</code> miscellaneous files, everything that doesn't fit in anywhere else</li> <li><code>etc/</code> miscellaneous files, everything that doesn't fit in anywhere else</li>
<li><code>include/</code> public header files, include this directory in projects that use the MUtilities library</li> <li><code>include/</code> public header files, include this directory in projects that use the MUtilities library</li>
<li><code>obj/</code> object code files, intermediate files generated during the build process</li> <li><code>obj/</code> object code files, intermediate files generated during the build process</li>
<li><code>res/</code> resouce files, required for building the MUtilities library</li> <li><code>res/</code> resource files, required for building the MUtilities library</li>
<li><code>src/</code> source code files, required for building the MUtilities library (third-party code in <code>src/3rd_party/</code>)</li> <li><code>src/</code> source code files, required for building the MUtilities library (third-party code in <code>src/3rd_party/</code>)</li>
<li><code>test/</code> unit tests, based on Google Test framework</li> <li><code>test/</code> unit tests, based on Google Test framework</li>
<li><code>tmp/</code> temporary files, automatically generated during the build process</li> <li><code>tmp/</code> temporary files, automatically generated during the build process</li>
@ -78,7 +78,7 @@ int main(int argc, char **argv)
<ul> <ul>
<li>In order to use the <em>MUtilities</em> library in your project, your build environment must have already been set up for building Qt-based projects. Setting up Qt is <em>not</em> covered by this document.</li> <li>In order to use the <em>MUtilities</em> library in your project, your build environment must have already been set up for building Qt-based projects. Setting up Qt is <em>not</em> covered by this document.</li>
<li>Additionally, make sure that <em>MUtilities'</em> <code>include/</code> directory is contained in your &quot;Additional Include Directories&quot; and that the <em>MUtilities'</em> <code>bin/</code> directory is contained in your &quot;Additional Library Directories&quot;.</li> <li>Additionally, make sure that <em>MUtilities'</em> <code>include/</code> directory is contained in your &quot;Additional Include Directories&quot; and that the <em>MUtilities'</em> <code>bin/</code> directory is contained in your &quot;Additional Library Directories&quot;.</li>
<li>Finally, make sure that your project links against the <code>MUtils32-1.lib</code> library file. For each build configuration you have to pick the proper <strong>.lib</strong> file from the correspnding <code>bin/&lt;platform&gt;/&lt;config&gt;/</code> directory!</li> <li>Finally, make sure that your project links against the <code>MUtils32-1.lib</code> library file. For each build configuration, pick the proper <strong>.lib</strong> file from the corresponding <code>bin/&lt;platform&gt;/&lt;config&gt;/</code> directory!</li>
<li>If your projects intends to use the <em>MUtilities</em> library as a <strong>static</strong> library, then the macro <code>MUTILS_STATIC_LIB</code> <em>must</em> be added to your project's &quot;Preprocessor Definitions&quot;.</li> <li>If your projects intends to use the <em>MUtilities</em> library as a <strong>static</strong> library, then the macro <code>MUTILS_STATIC_LIB</code> <em>must</em> be added to your project's &quot;Preprocessor Definitions&quot;.</li>
</ul> </ul>
<h1 id="api-documentation"><span class="header-section-number">4</span> API Documentation</h1> <h1 id="api-documentation"><span class="header-section-number">4</span> API Documentation</h1>

View File

@ -15,7 +15,7 @@ The *MUtilities* project directory is organized as follows:
* `etc/` &ndash; miscellaneous files, everything that doesn't fit in anywhere else * `etc/` &ndash; miscellaneous files, everything that doesn't fit in anywhere else
* `include/` &ndash; public header files, include this directory in projects that use the MUtilities library * `include/` &ndash; public header files, include this directory in projects that use the MUtilities library
* `obj/` &ndash; object code files, intermediate files generated during the build process * `obj/` &ndash; object code files, intermediate files generated during the build process
* `res/` &ndash; resouce files, required for building the MUtilities library * `res/` &ndash; resource files, required for building the MUtilities library
* `src/` &ndash; source code files, required for building the MUtilities library (third-party code in `src/3rd_party/`) * `src/` &ndash; source code files, required for building the MUtilities library (third-party code in `src/3rd_party/`)
* `test/` &ndash; unit tests, based on Google Test framework * `test/` &ndash; unit tests, based on Google Test framework
* `tmp/` &ndash; temporary files, automatically generated during the build process * `tmp/` &ndash; temporary files, automatically generated during the build process
@ -37,7 +37,7 @@ Here is a minimal example on how to use the *MUtilities* library in your project
* In order to use the *MUtilities* library in your project, your build environment must have already been set up for building Qt-based projects. Setting up Qt is *not* covered by this document. * In order to use the *MUtilities* library in your project, your build environment must have already been set up for building Qt-based projects. Setting up Qt is *not* covered by this document.
* Additionally, make sure that *MUtilities'* `include/` directory is contained in your "Additional Include Directories" and that the *MUtilities'* `bin/` directory is contained in your "Additional Library Directories". * Additionally, make sure that *MUtilities'* `include/` directory is contained in your "Additional Include Directories" and that the *MUtilities'* `bin/` directory is contained in your "Additional Library Directories".
* Finally, make sure that your project links against the `MUtils32-1.lib` library file. For each build configuration you have to pick the proper **.lib** file from the correspnding `bin/<platform>/<config>/` directory! * Finally, make sure that your project links against the `MUtils32-1.lib` library file. For each build configuration, pick the proper **.lib** file from the corresponding `bin/<platform>/<config>/` directory!
* If your projects intends to use the *MUtilities* library as a **static** library, then the macro `MUTILS_STATIC_LIB` *must* be added to your project's "Preprocessor Definitions". * If your projects intends to use the *MUtilities* library as a **static** library, then the macro `MUTILS_STATIC_LIB` *must* be added to your project's "Preprocessor Definitions".

View File

@ -299,8 +299,8 @@ QString&#160;</td><td class="memItemRight" valign="bottom"><b>MUtils::clean_file
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
<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> <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>
<tr><td class="paramname">baseName</td><td>Specifies the desired "base" file name of the unqiue file. Do <b>not</b> include a file extension.</td></tr> <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>
<tr><td class="paramname">extension</td><td>Specifies the desired file extensions of the unqiue file. Do <b>not</b> include a leading dot (<code>.</code>) character.</td></tr> <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>
<tr><td class="paramname">fancy</td><td>If set to <code>true</code>, the 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>, the file name is generated according to the <code>"&lt;basedir&gt;/&lt;basename&gt;.XXXX.&lt;ext&gt;"</code> pattern.</td></tr> <tr><td class="paramname">fancy</td><td>If set to <code>true</code>, the 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>, the file name is generated according to the <code>"&lt;basedir&gt;/&lt;basename&gt;.XXXX.&lt;ext&gt;"</code> pattern.</td></tr>
</table> </table>
</dd> </dd>
@ -340,6 +340,7 @@ QString&#160;</td><td class="memItemRight" valign="bottom"><b>MUtils::clean_file
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
<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> <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>
<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>
</table> </table>
</dd> </dd>
</dl> </dl>
@ -370,7 +371,7 @@ QString&#160;</td><td class="memItemRight" valign="bottom"><b>MUtils::clean_file
</table> </table>
</dd> </dd>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>The function retruns a QString holding a <em>random</em> hexadecimal string </dd></dl> <dl class="section return"><dt>Returns</dt><dd>The function returns a QString holding a <em>random</em> hexadecimal string </dd></dl>
</div> </div>
</div> </div>
@ -392,7 +393,7 @@ QString&#160;</td><td class="memItemRight" valign="bottom"><b>MUtils::clean_file
<p>Generates a <em>random</em> unsigned 32-Bit value. </p> <p>Generates a <em>random</em> unsigned 32-Bit value. </p>
<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> <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>
<dl class="section return"><dt>Returns</dt><dd>The function retruns a <em>random</em> unsigned 32-Bit value. </dd></dl> <dl class="section return"><dt>Returns</dt><dd>The function returns a <em>random</em> unsigned 32-Bit value. </dd></dl>
</div> </div>
</div> </div>
@ -414,7 +415,7 @@ QString&#160;</td><td class="memItemRight" valign="bottom"><b>MUtils::clean_file
<p>Generates a <em>random</em> unsigned 64-Bit value. </p> <p>Generates a <em>random</em> unsigned 64-Bit value. </p>
<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> <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>
<dl class="section return"><dt>Returns</dt><dd>The function retruns a <em>random</em> unsigned 64-Bit value. </dd></dl> <dl class="section return"><dt>Returns</dt><dd>The function returns a <em>random</em> unsigned 64-Bit value. </dd></dl>
</div> </div>
</div> </div>
@ -557,7 +558,7 @@ QString&#160;</td><td class="memItemRight" valign="bottom"><b>MUtils::clean_file
</div><div class="memdoc"> </div><div class="memdoc">
<p>Recursively deletes the specified directory. </p> <p>Recursively deletes the specified directory. </p>
<p>The function deletes the specified directory. In <em>recusive</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="../../d5/d3b/_global_8h.html#a12259acdd6aff74ee83819d3aebd8ba9" title="Deletes the specified file. ">remove_file()</a></code> function.</p> <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="../../d5/d3b/_global_8h.html#a12259acdd6aff74ee83819d3aebd8ba9" title="Deletes the specified file. ">remove_file()</a></code> function.</p>
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
<tr><td class="paramname">folderPath</td><td>The path to the directory to be deleted. This should be a full path.</td></tr> <tr><td class="paramname">folderPath</td><td>The path to the directory to be deleted. This should be a full path.</td></tr>
@ -614,7 +615,7 @@ QString&#160;</td><td class="memItemRight" valign="bottom"><b>MUtils::clean_file
</div><div class="memdoc"> </div><div class="memdoc">
<p>Rerieves the full path of the application's <em>Temp</em> folder. </p> <p>Rerieves the full path of the application's <em>Temp</em> folder. </p>
<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 is about to terminate, the application's <em>Temp</em> folder and all files or sub-directories thereof will be <em>removed</em> automatically!</p> <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>
<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> <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>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/> <meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MuldeR&#39;s Utilities for Qt: MuldeR&#39;s Utilities for Qt</title> <title>MuldeR&#39;s Utilities for Qt: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@ -60,17 +60,68 @@ $(function() {
<div class="header"> <div class="header">
<div class="headertitle"> <div class="headertitle">
<div class="title">MuldeR's Utilities for Qt </div> </div> <div class="title">MuldeR's Utilities for Qt Documentation</div> </div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="textblock"><p>The <b>MUtilities</b> library is a collection of routines and classes to extend the <a href="http://qt-project.org/"><em>Qt cross-platform framework</em></a>. It contains various convenience and utility functions as well as wrappers for OS-specific functionalities. The library was originally created as a "side product" of the <a href="http://lamexp.sourceforge.net/"><b>LameXP</b></a> application: Over the years, a lot of code, <b>not</b> really specific to <em>LameXP</em>, had accumulated in the <em>LameXP</em> code base. Some of that code even had been used in other projects too, in a "copy &amp; paste" fashion &ndash; which had lead to redundancy and much complicated maintenance. In order to clean-up the LameXP code base, to eliminate the ugly redundancy and to simplify maintenance, the code in question has finally been refactored into the <b>MUtilities</b> (aka "MuldeR's Utilities for Qt") library. This library now forms the foundation of <em>LameXP</em> and <a href="https://github.com/lordmulder"><em>other OpenSource projects</em></a>.</p> <div class="textblock"><h1>Introduction</h1>
<h3>API-Documentation</h3> <p>The <b>MUtilities</b> library is a collection of routines and classes to extend the <a href="http://qt-project.org/"><em>Qt cross-platform framework</em></a>. It contains various convenience and utility functions as well as wrappers for OS-specific functionalities. The library was originally created as a "side product" of the <a href="http://lamexp.sourceforge.net/"><b>LameXP</b></a> application: Over the years, a lot of code, <b>not</b> really specific to <em>LameXP</em>, had accumulated in the <em>LameXP</em> code base. Some of that code even had been used in other projects too, in a "copy &amp; paste" fashion &ndash; which had lead to redundancy and much complicated maintenance. In order to clean-up the LameXP code base, to eliminate the ugly redundancy and to simplify maintenance, the code in question has finally been refactored into the <b>MUtilities</b> (aka "MuldeR's Utilities for Qt") library. This library now forms the foundation of <em>LameXP</em> and <a href="https://github.com/lordmulder"><em>other OpenSource projects</em></a>.</p>
<p>The public API of the <em>MUtilities</em> library is defined in the following header files:</p><ul> <h1>Project Structure</h1>
<p>The <em>MUtilities</em> project directory is organized as follows:</p>
<ul>
<li><code>bin/</code> &ndash; compiled library files (static or shared), link those files in projects that use the MUtilities library</li>
<li><code>docs/</code> &ndash; programming interface documentation, generated with Doxygen tool</li>
<li><code>etc/</code> &ndash; miscellaneous files, everything that doesn't fit in anywhere else</li>
<li><code>include/</code> &ndash; public header files, include this directory in projects that use the MUtilities library</li>
<li><code>obj/</code> &ndash; object code files, intermediate files generated during the build process</li>
<li><code>res/</code> &ndash; resource files, required for building the MUtilities library</li>
<li><code>src/</code> &ndash; source code files, required for building the MUtilities library (third-party code in <code>src/3rd_party/</code>)</li>
<li><code>test/</code> &ndash; unit tests, based on Google Test framework</li>
<li><code>tmp/</code> &ndash; temporary files, automatically generated during the build process</li>
</ul>
<h1>API Documentation</h1>
<p>The public API of the <em>MUtilities</em> library is defined in the following header files (select file for details):</p><ul>
<li><b><a class="el" href="d5/d3b/_global_8h.html" title="This file contains miscellaneous functions that are generally useful for Qt-based applications...">Global.h</a></b> &ndash; miscellaneous useful functions</li> <li><b><a class="el" href="d5/d3b/_global_8h.html" title="This file contains miscellaneous functions that are generally useful for Qt-based applications...">Global.h</a></b> &ndash; miscellaneous useful functions</li>
</ul> </ul>
<h3>License</h3> <h1>Example</h1>
<p>This library is free software. It is released under the terms of the <a href="https://www.gnu.org/licenses/lgpl-2.1.html">GNU Lesser General Public License (LGPL), Version 2.1</a>.</p> <p>Here is a minimal example on how to use the <em>MUtilities</em> library in your project: </p><pre class="fragment">//MUtils
<div class="fragment"><div class="line">MUtilities - MuldeR<span class="stringliteral">&#39;s Utilities for Qt</span></div><div class="line"><span class="stringliteral">Copyright (C) 2004-2016 LoRd_MuldeR &lt;MuldeR2@GMX.de&gt;. Some rights reserved.</span></div><div class="line"><span class="stringliteral"></span></div><div class="line"><span class="stringliteral">This library is free software; you can redistribute it and/or</span></div><div class="line"><span class="stringliteral">modify it under the terms of the GNU Lesser General Public</span></div><div class="line"><span class="stringliteral">License as published by the Free Software Foundation; either</span></div><div class="line"><span class="stringliteral">version 2.1 of the License, or (at your option) any later version.</span></div><div class="line"><span class="stringliteral"></span></div><div class="line"><span class="stringliteral">This library is distributed in the hope that it will be useful,</span></div><div class="line"><span class="stringliteral">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><span class="stringliteral">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div><div class="line"><span class="stringliteral">Lesser General Public License for more details.</span></div><div class="line"><span class="stringliteral"></span></div><div class="line"><span class="stringliteral">You should have received a copy of the GNU Lesser General Public</span></div><div class="line"><span class="stringliteral">License along with this library; if not, write to the Free Software</span></div><div class="line"><span class="stringliteral">Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</span></div></div><!-- fragment --> </div></div><!-- contents --> #include &lt;MUtils/Global.h&gt;
int main(int argc, char **argv)
{
qDebug("Random number: %u\n", MUtils::next_rand_u32());
}
</pre><h2>Build Notes</h2>
<ul>
<li>In order to use the <em>MUtilities</em> library in your project, your build environment must have already been set up for building Qt-based projects. Setting up Qt is <em>not</em> covered by this document.</li>
<li>Additionally, make sure that <em>MUtilities'</em> <code>include/</code> directory is contained in your "Additional Include Directories" and that the <em>MUtilities'</em> <code>bin/</code> directory is contained in your "Additional Library Directories".</li>
<li>Finally, make sure that your project links against the <code>MUtils32-1.lib</code> library file. For each build configuration, pick the proper **.lib** file from the corresponding <code>bin/&lt;platform&gt;/&lt;config&gt;/</code> directory!</li>
<li>If your projects intends to use the <em>MUtilities</em> library as a <b>static</b> library, then the macro <code>MUTILS_STATIC_LIB</code> <em>must</em> be added to your project's "Preprocessor Definitions".</li>
</ul>
<h1>License</h1>
<p>This library is free software. It is released under the terms of the <a href="https://www.gnu.org/licenses/lgpl-2.1.html"><em>GNU Lesser General Public License (LGPL), Version 2.1</em></a>. </p><pre class="fragment">MUtilities - MuldeR's Utilities for Qt
Copyright (C) 2004-2016 LoRd_MuldeR &lt;MuldeR2@GMX.de&gt;. Some rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
</pre><h1>Acknowledgement</h1>
<p>The following third-party code is used in the MUtilities library:</p>
<ul>
<li><b>Keccak/SHA-3 Reference Implementation</b> Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer No Copyright / Dedicated to the Public Domain</li>
<li><b>Natural Order String Comparison</b> Copyright (C) 2000, 2004 by Martin Pool <a href="#" onclick="location.href='mai'+'lto:'+'mbp'+'@s'+'our'+'ce'+'fro'+'g.'+'net'; return false;">mbp@s<span style="display: none;">.nosp@m.</span>ourc<span style="display: none;">.nosp@m.</span>efrog<span style="display: none;">.nosp@m.</span>.net</a> Released under the zlib License</li>
<li><b>Adler-32 Checksum Algorithm (from zlib)</b> Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler Released under the zlib License </li>
</ul>
</div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html"> Generated by &#160;<a href="http://www.doxygen.org/index.html">

View File

@ -1,6 +1,5 @@
var searchData= var searchData=
[ [
['mulder_27s_20utilities_20for_20qt',['MuldeR&apos;s Utilities for Qt',['../index.html',1,'']]],
['make_5ftemp_5ffile',['make_temp_file',['../d5/d3b/_global_8h.html#a67cb16c62b213da5135a6fa076f3f005',1,'MUtils']]], ['make_5ftemp_5ffile',['make_temp_file',['../d5/d3b/_global_8h.html#a67cb16c62b213da5135a6fa076f3f005',1,'MUtils']]],
['make_5funique_5ffile',['make_unique_file',['../d5/d3b/_global_8h.html#a390e56e35eb9329d2e67fa9741d07536',1,'MUtils']]] ['make_5funique_5ffile',['make_unique_file',['../d5/d3b/_global_8h.html#a390e56e35eb9329d2e67fa9741d07536',1,'MUtils']]]
]; ];

View File

@ -1,26 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="pages_0.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

View File

@ -1,4 +0,0 @@
var searchData=
[
['mulder_27s_20utilities_20for_20qt',['MuldeR&apos;s Utilities for Qt',['../index.html',1,'']]]
];

View File

@ -3,8 +3,7 @@ var indexSectionsWithContent =
0: "_abgijkmnprstuv", 0: "_abgijkmnprstuv",
1: "_bijkrstuv", 1: "_bijkrstuv",
2: "g", 2: "g",
3: "amnprt", 3: "amnprt"
4: "m"
}; };
var indexSectionNames = var indexSectionNames =
@ -12,8 +11,7 @@ var indexSectionNames =
0: "all", 0: "all",
1: "classes", 1: "classes",
2: "files", 2: "files",
3: "functions", 3: "functions"
4: "pages"
}; };
var indexSectionLabels = var indexSectionLabels =
@ -21,7 +19,6 @@ var indexSectionLabels =
0: "All", 0: "All",
1: "Classes", 1: "Classes",
2: "Files", 2: "Files",
3: "Functions", 3: "Functions"
4: "Pages"
}; };

View File

@ -75,48 +75,12 @@ class QProcess;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/**
* \mainpage MuldeR's Utilities for Qt
*
* The **MUtilities** library is a collection of routines and classes to extend the [*Qt cross-platform framework*](http://qt-project.org/). It contains various convenience and utility functions as well as wrappers for OS-specific functionalities. The library was originally created as a "side product" of the [**LameXP**](http://lamexp.sourceforge.net/) application: Over the years, a lot of code, **not** really specific to *LameXP*, had accumulated in the *LameXP* code base. Some of that code even had been used in other projects too, in a "copy & paste" fashion &ndash; which had lead to redundancy and much complicated maintenance. In order to clean-up the LameXP code base, to eliminate the ugly redundancy and to simplify maintenance, the code in question has finally been refactored into the **MUtilities** (aka "MuldeR's Utilities for Qt") library. This library now forms the foundation of *LameXP* and [*other OpenSource projects*](https://github.com/lordmulder).
*
*
* ### API-Documentation
*
* The public API of the *MUtilities* library is defined in the following header files:
* - **Global.h** &ndash; miscellaneous useful functions
*
*
* ### License
*
* This library is free software. It is released under the terms of the [GNU Lesser General Public License (LGPL), Version 2.1](https://www.gnu.org/licenses/lgpl-2.1.html).
*
* ```
* MUtilities - MuldeR's Utilities for Qt
* Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>. Some rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* ```
*/
namespace MUtils namespace MUtils
{ {
/** /**
* \brief Rerieves the full path of the application's *Temp* folder. * \brief Rerieves the full path of the application's *Temp* folder.
* *
* The application's *Temp* 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 *Temp* folder will be created as a sub-folder of the system's global *Temp* folder, as indicated by the `TMP` or `TEMP` environment variables. However, it may be created at a different place (e.g. in the users *Profile* directory), if those environment variables don't point to a usable directory. In any case, this function makes sure that the application's *Temp* folder exists for the whole lifetime of the application and that it is writable. When the application is about to terminate, the application's *Temp* folder and all files or sub-directories thereof will be *removed* automatically! * The application's *Temp* 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 *Temp* folder will be created as a sub-folder of the system's global *Temp* folder, as indicated by the `TMP` or `TEMP` environment variables. However, it may be created at a different place (e.g. in the users *Profile* directory), if those environment variables don't point to a usable directory. In any case, this function makes sure that the application's *Temp* folder exists for the whole lifetime of the application and that it is writable. When the application terminates normally, the application's *Temp* folder and all files or sub-directories thereof will be *removed* automatically!
* *
* \return If the function succeeds, it returns a read-only reference to a QString holding the full path of the application's *Temp* folder; otherwise a read-only reference to a default-constructed QString is returned. * \return If the function succeeds, it returns a read-only reference to a QString holding the full path of the application's *Temp* folder; otherwise a read-only reference to a default-constructed QString is returned.
*/ */
@ -130,7 +94,7 @@ namespace MUtils
* *
* The *random* value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is **not** required or useful to call `srand()` or `qsrand()` prior to using this function. If necessary, the seeding of the PRNG happen *automatically* on the first call. * The *random* value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is **not** required or useful to call `srand()` or `qsrand()` prior to using this function. If necessary, the seeding of the PRNG happen *automatically* on the first call.
* *
* \return The function retruns a *random* unsigned 32-Bit value. * \return The function returns a *random* unsigned 32-Bit value.
*/ */
MUTILS_API quint32 next_rand_u32(void); MUTILS_API quint32 next_rand_u32(void);
@ -139,7 +103,7 @@ namespace MUtils
* *
* The *random* value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is **not** required or useful to call `srand()` or `qsrand()` prior to using this function. If necessary, the seeding of the PRNG happen *automatically* on the first call. * The *random* value is created using a "strong" PRNG of the underlying system, if possible. Otherwise a fallback PRNG is used. It is **not** required or useful to call `srand()` or `qsrand()` prior to using this function. If necessary, the seeding of the PRNG happen *automatically* on the first call.
* *
* \return The function retruns a *random* unsigned 64-Bit value. * \return The function returns a *random* unsigned 64-Bit value.
*/ */
MUTILS_API quint64 next_rand_u64(void); MUTILS_API quint64 next_rand_u64(void);
@ -150,7 +114,7 @@ namespace MUtils
* *
* \param bLong If set to `true`, a "long" random string (32 characters) will be generated; if set to `false`, a "short" random string (16 characters) is generated. * \param bLong If set to `true`, a "long" random string (32 characters) will be generated; if set to `false`, a "short" random string (16 characters) is generated.
* *
* \return The function retruns a QString holding a *random* hexadecimal string * \return The function returns a QString holding a *random* hexadecimal string
*/ */
MUTILS_API QString next_rand_str(const bool &bLong = false); MUTILS_API QString next_rand_str(const bool &bLong = false);
@ -176,9 +140,9 @@ namespace MUtils
* *
* \param basePath Specifies the "base" directory where the unique file is supposed to be created. This must be a valid *existing* directory. * \param basePath Specifies the "base" directory where the unique file is supposed to be created. This must be a valid *existing* directory.
* *
* \param baseName Specifies the desired "base" file name of the unqiue file. Do **not** include a file extension. * \param baseName Specifies the desired "base" file name of the unique file. Do **not** include a file extension.
* *
* \param extension Specifies the desired file extensions of the unqiue file. Do **not** include a leading dot (`.`) character. * \param extension Specifies the desired file extensions of the unique file. Do **not** include a leading dot (`.`) character.
* *
* \param fancy If set to `true`, the file name is generated according to the `"<basedir>/<basename> (N).<ext>"` pattern; if set to `false`, the file name is generated according to the `"<basedir>/<basename>.XXXX.<ext>"` pattern. * \param fancy If set to `true`, the file name is generated according to the `"<basedir>/<basename> (N).<ext>"` pattern; if set to `false`, the file name is generated according to the `"<basedir>/<basename>.XXXX.<ext>"` pattern.
* *
@ -209,7 +173,7 @@ namespace MUtils
/** /**
* \brief Recursively deletes the specified directory * \brief Recursively deletes the specified directory
* *
* The function deletes the specified directory. In *recusive* mode, the directory will be removed including all of its files and sub-directories. Files are deleted using the `remove_file()` function. * The function deletes the specified directory. In *recursive* mode, the directory will be removed including all of its files and sub-directories. Files are deleted using the `remove_file()` function.
* *
* \param folderPath The path to the directory to be deleted. This should be a full path. * \param folderPath The path to the directory to be deleted. This should be a full path.
* *
@ -269,10 +233,11 @@ namespace MUtils
* This function implements a sort algorithm that orders alphanumeric strings in the way a human being would. See [*Natural Order String Comparison*](http://sourcefrog.net/projects/natsort/) for details! * This function implements a sort algorithm that orders alphanumeric strings in the way a human being would. See [*Natural Order String Comparison*](http://sourcefrog.net/projects/natsort/) for details!
* *
* \param list A reference to the QStringList object to be sorted. The list will be sorted "in place". * \param list A reference to the QStringList object to be sorted. The list will be sorted "in place".
*
* \param bIgnoreCase If set to `true`, 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 `false`, the character case *is* taken into account.
*/ */
MUTILS_API void natural_string_sort(QStringList &list, const bool bIgnoreCase); MUTILS_API void natural_string_sort(QStringList &list, const bool bIgnoreCase);
MUTILS_API QString clean_file_name(const QString &name); MUTILS_API QString clean_file_name(const QString &name);
MUTILS_API QString clean_file_path(const QString &path); MUTILS_API QString clean_file_path(const QString &path);

87
include/MUtilsInfo.dox Normal file
View File

@ -0,0 +1,87 @@
/**
* @mainpage
*
* # Introduction #
*
* The **MUtilities** library is a collection of routines and classes to extend the [*Qt cross-platform framework*](http://qt-project.org/). It contains various convenience and utility functions as well as wrappers for OS-specific functionalities. The library was originally created as a "side product" of the [**LameXP**](http://lamexp.sourceforge.net/) application: Over the years, a lot of code, **not** really specific to *LameXP*, had accumulated in the *LameXP* code base. Some of that code even had been used in other projects too, in a "copy & paste" fashion &ndash; which had lead to redundancy and much complicated maintenance. In order to clean-up the LameXP code base, to eliminate the ugly redundancy and to simplify maintenance, the code in question has finally been refactored into the **MUtilities** (aka "MuldeR's Utilities for Qt") library. This library now forms the foundation of *LameXP* and [*other OpenSource projects*](https://github.com/lordmulder).
*
*
* # Project Structure
*
* The *MUtilities* project directory is organized as follows:
*
* - `bin/` &ndash; compiled library files (static or shared), link those files in projects that use the MUtilities library
* - `docs/` &ndash; programming interface documentation, generated with Doxygen tool
* - `etc/` &ndash; miscellaneous files, everything that doesn't fit in anywhere else
* - `include/` &ndash; public header files, include this directory in projects that use the MUtilities library
* - `obj/` &ndash; object code files, intermediate files generated during the build process
* - `res/` &ndash; resource files, required for building the MUtilities library
* - `src/` &ndash; source code files, required for building the MUtilities library (third-party code in `src/3rd_party/`)
* - `test/` &ndash; unit tests, based on Google Test framework
* - `tmp/` &ndash; temporary files, automatically generated during the build process
*
*
* # API Documentation
*
* The public API of the *MUtilities* library is defined in the following header files (select file for details):
* - **Global.h** &ndash; miscellaneous useful functions
*
*
* # Example
*
* Here is a minimal example on how to use the *MUtilities* library in your project:
*
* //MUtils
* #include <MUtils/Global.h>
*
* int main(int argc, char **argv)
* {
* qDebug("Random number: %u\n", MUtils::next_rand_u32());
* }
*
* ## Build Notes
*
* - In order to use the *MUtilities* library in your project, your build environment must have already been set up for building Qt-based projects. Setting up Qt is *not* covered by this document.
* - Additionally, make sure that *MUtilities'* `include/` directory is contained in your "Additional Include Directories" and that the *MUtilities'* `bin/` directory is contained in your "Additional Library Directories".
* - Finally, make sure that your project links against the `MUtils32-1.lib` library file. For each build configuration, pick the proper **.lib** file from the corresponding `bin/<platform>/<config>/` directory!
* - If your projects intends to use the *MUtilities* library as a **static** library, then the macro `MUTILS_STATIC_LIB` *must* be added to your project's "Preprocessor Definitions".
*
*
* # License
*
* This library is free software. It is released under the terms of the [*GNU Lesser General Public License (LGPL), Version 2.1*](https://www.gnu.org/licenses/lgpl-2.1.html).
*
* MUtilities - MuldeR's Utilities for Qt
* Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>. Some rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*
* # Acknowledgement
*
* The following third-party code is used in the MUtilities library:
*
* - **Keccak/SHA-3 Reference Implementation**
* Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer
* No Copyright / Dedicated to the Public Domain
*
* - **Natural Order String Comparison**
* Copyright (C) 2000, 2004 by Martin Pool <mbp@sourcefrog.net>
* Released under the zlib License
*
* - **Adler-32 Checksum Algorithm (from zlib)**
* Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
* Released under the zlib License
*/