diff --git a/docs/annotated.html b/docs/annotated.html index 4c6d3fb..f6d0a37 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -65,7 +65,7 @@ $(function() {
▼NMUtils | ||||||
▼NMUtils | ||||||
▼NCPUFetaures | ||||||
C_cpu_info_t | ||||||
▼NHash |
| |||||
_cpu_info_t (MUtils::CPUFetaures) | IPCChannel (MUtils) | RegistryKey (MUtils::Registry) | UpdateChecker (MUtils) | |||
_cpu_info_t (MUtils::CPUFetaures) | IPCChannel (MUtils) | RegistryKey (MUtils::Registry) | UpdateChecker (MUtils) | |||
_os_version_t (MUtils::OS::Version) |
|
| UpdateCheckerInfo (MUtils) | UpdateCheckerInfo (MUtils) | ||
|
| |||||
JobObject (MUtils) | spongeStateStruct (MUtils::Hash::Internal::KeccakImpl) | |||||
JobObject (MUtils) | spongeStateStruct (MUtils::Hash::Internal::KeccakImpl) | |||||
Blake2 (MUtils::Hash) |
|
| Version (MUtils) | Version (MUtils) | ||
Keccak (MUtils::Hash) | Taskbar7 (MUtils) | |||||
Keccak (MUtils::Hash) | Taskbar7 (MUtils) | |||||
+ MuldeR's Utilities for Qt
+
+ MUtilities
+ |
+
+Classes | |
class | IPCChannel |
class | JobObject |
class | Taskbar7 |
class | UpdateChecker |
class | UpdateCheckerInfo |
class | Version |
+Functions | |
MUTILS_API const QString & | temp_folder (void) |
Rerieves the full path of the application's Temp folder. More... | |
MUTILS_API void | init_process (QProcess &process, const QString &wokringDir, const bool bReplaceTempDir=true, const QStringList *const extraPaths=NULL) |
Initialize a given QProcess object. More... | |
MUTILS_API quint32 | next_rand_u32 (void) |
Generates a random unsigned 32-Bit value. More... | |
MUTILS_API quint64 | next_rand_u64 (void) |
Generates a random unsigned 64-Bit value. More... | |
MUTILS_API QString | next_rand_str (const bool &bLong=false) |
Generates a random string. More... | |
MUTILS_API QString | make_temp_file (const QString &basePath, const QString &extension, const bool placeholder=false) |
Generates a temporary file name. More... | |
MUTILS_API QString | make_unique_file (const QString &basePath, const QString &baseName, const QString &extension, const bool fancy=false) |
Generates a unique file name. More... | |
MUTILS_API bool | parity (quint32 value) |
Computes the parity of the given unsigned 32-Bit value. More... | |
MUTILS_API bool | remove_file (const QString &fileName) |
Deletes the specified file. More... | |
MUTILS_API bool | remove_directory (const QString &folderPath, const bool &recursive) |
Recursively deletes the specified directory. More... | |
MUTILS_API QString & | trim_right (QString &str) |
Remove trailing white-space characters. More... | |
MUTILS_API QString & | trim_left (QString &str) |
Remove leading white-space characters. More... | |
MUTILS_API QString | trim_right (const QString &str) |
Remove trailing white-space characters. More... | |
MUTILS_API QString | trim_left (const QString &str) |
Remove trailing white-space characters. More... | |
MUTILS_API void | natural_string_sort (QStringList &list, const bool bIgnoreCase) |
Sort a list of strings using "natural ordering" algorithm. More... | |
MUTILS_API QString | clean_file_name (const QString &name) |
Clean up a file name string. More... | |
MUTILS_API QString | clean_file_path (const QString &path) |
Clean up a file path string. More... | |
MUTILS_API bool | regexp_parse_uint32 (const QRegExp ®exp, quint32 &value) |
Parse regular expression results. More... | |
MUTILS_API bool | regexp_parse_uint32 (const QRegExp ®exp, quint32 *values, const size_t &count) |
Parse regular expression results. More... | |
MUTILS_API QStringList | available_codepages (const bool &noAliases=true) |
Retrieve a list of all available codepages. More... | |
+Variables | |
+class MUTILS_API | IPCChannel_Private |
+class MUTILS_API | JobObject_Private |
+class MUTILS_API | Taskbar7_Private |
INTERNAL
+MUTILS_API QStringList MUtils::available_codepages | +( | +const bool & | +noAliases = true | ) | ++ |
Retrieve a list of all available codepages.
+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 QTextCodec::codecForName()
function in order to obtain a corresponding QTextCodec object.
noAliases | If set to true , only distinct codepages are returned, i.e. any codepage aliases are discarded from the list; if set to false , the returned list may (and usually will) also contain codepage aliases. |
MUTILS_API QString MUtils::clean_file_name | +( | +const QString & | +name | ) | ++ |
Clean up a file name string.
+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 not allowed in file names (which explicitly includes directory separators). Furthermore, the function will trim/remove specific characters that are not allowed directly at the beginning or end of a file name. Finally, the function takes care or 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.
+list | A read-only reference to the QString holding the original, potentially invalid file name. |
MUTILS_API QString MUtils::clean_file_path | +( | +const QString & | +path | ) | ++ |
Clean up a file path string.
+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 not 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 not allowed directly at the beginning or end of a path component. Finally, the function takes care or 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.
+list | A read-only reference to the QString holding the original, potentially invalid file path. |
MUTILS_API void MUtils::init_process | +( | +QProcess & | +process, | +
+ | + | const QString & | +wokringDir, | +
+ | + | const bool | +bReplaceTempDir = true , |
+
+ | + | const QStringList *const | +extraPaths = NULL |
+
+ | ) | ++ |
Initialize a given QProcess object.
+This function prepares a given QProcess object for sub-process creation. It does so by setting up combined stdout and stderr redirection for the sub-process, cleaning up the sub-process' environment variables, as well as setting up the sub-process' working directory. Optionally, the Temp directory for the sub-process can be set to the application-specific Temp directory, which is achieved by overwriting the corresponding environment variables (e.g. TMP
and TEMP
). Furthermore, additional paths can be added to the PATH
environment variable of the sub-process.
process | A reference to the QProcess object to be initialized. The QProcess object must be initialized before calling the QProcess::start() method. |
process | A read-only reference to a QString holding the path of the working directory for the sub-process. |
bReplaceTempDir | If set to true , the Temp directory for the sub-process is set to the application-specific Temp directory; if set to false , the default Temp directory is retained. |
extraPaths | A read-only pointer to a QStringList object containing additional paths that will be added (prepended) to the sub-process' PATH environment variable. This parameter can be NULL , in which case no additional paths are added. |
MUTILS_API QString MUtils::make_temp_file | +( | +const QString & | +basePath, | +
+ | + | const QString & | +extension, | +
+ | + | const bool | +placeholder = false |
+
+ | ) | ++ |
Generates a temporary file name.
+The function generates a file name that contains a random component and that is guaranteed to not exist yet. The generated file name follows a "<basedir>/<random>.<ext>"
pattern. This is useful (not only) for creating temporary files.
basePath | Specifies the "base" directory where the temporary file is supposed to be created. This must be a valid existing directory. |
extension | Specifies the desired file extensions of the temporary file. Do not include a leading dot (. ) character. |
placeholder | If set to true , the function creates an empty "placeholder" file under the returned file name; if set to false , it does not. |
MUTILS_API QString MUtils::make_unique_file | +( | +const QString & | +basePath, | +
+ | + | const QString & | +baseName, | +
+ | + | const QString & | +extension, | +
+ | + | const bool | +fancy = false |
+
+ | ) | ++ |
Generates a unique file name.
+The function generates a unique file name in the specified directory. The function guarantees that the returned file name does not exist yet. If necessary, a counter will be included in the file name in order to ensure its uniqueness.
+basePath | Specifies the "base" directory where the unique file is supposed to be created. This must be a valid existing directory. |
baseName | Specifies the desired "base" file name of the unique file. Do not include a file extension. |
extension | Specifies the desired file extensions of the unique file. Do not include a leading dot (. ) character. |
fancy | If set to true , the unique file name is generated according to the "<basedir>/<basename> (N).<ext>" pattern; if set to false , it is generated according to the "<basedir>/<basename>.XXXX.<ext>" pattern. Also, if set to true , a counter is only included in the file name, if the file name without counter already exists; if set to false , a counter is always included. Finally, if set to true , the counter starts at 2 and is printed in decimal format; if set to false , the counter starts at 0 and is printed in zero-padded hexadecimal format. |
MUTILS_API void MUtils::natural_string_sort | +( | +QStringList & | +list, | +
+ | + | const bool | +bIgnoreCase | +
+ | ) | ++ |
Sort a list of strings using "natural ordering" algorithm.
+This function implements a sort algorithm that orders alphanumeric strings in the way a human being would. See Natural Order String Comparison for details!
+list | A reference to the QStringList object to be sorted. The list will be sorted "in place". |
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 QString MUtils::next_rand_str | +( | +const bool & | +bLong = false | ) | ++ |
Generates a random string.
+The random string is generated using the same PRNG as the next_rand_u64()
function. The random bytes are converted to a hexadecimal string and, if necessary, zero-padded to a toal length of 16 or 32 characters. There is no 0x
-prefix included in the result.
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. |
MUTILS_API quint32 MUtils::next_rand_u32 | +( | +void | +) | ++ |
Generates a random unsigned 32-Bit value.
+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.
MUTILS_API quint64 MUtils::next_rand_u64 | +( | +void | +) | ++ |
Generates a random unsigned 64-Bit value.
+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.
MUTILS_API bool MUtils::parity | +( | +quint32 | +value | ) | ++ |
Computes the parity of the given unsigned 32-Bit value.
+value | The 32-Bit unsigned value from which the parity is to be computed. |
true
, if the number of 1 bits in the given value is odd; it returns false
, if the number of 1 bits in the given value is even. MUTILS_API bool MUtils::regexp_parse_uint32 | +( | +const QRegExp & | +regexp, | +
+ | + | quint32 & | +value | +
+ | ) | ++ |
Parse regular expression results.
+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 one capture. Only the first capture is considered, additional captures are ignored.
+regexp | A read-only reference to the QRegExp object whose result (capture) will be parsed. This QRegExp must already have been successfully matched against the respective input string, e.g. via QRegExp::indexIn() , prior to calling this function. |
value | A reference to a variable of type quint32 , where the unsigned 32-Bit representation of the result will be stored. The contents of this variable are undefined, if the function failed. |
true
, if the regular expression's capture could be parsed successfully; it returns false
, if the capture contains an invalid string or if there are insufficient captures in given the QRegExp object. MUTILS_API bool MUtils::regexp_parse_uint32 | +( | +const QRegExp & | +regexp, | +
+ | + | quint32 * | +values, | +
+ | + | const size_t & | +count | +
+ | ) | ++ |
Parse regular expression results.
+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 count
captures. Only the first count
captures are considered, additional captures are ignored.
regexp | A read-only reference to the QRegExp object whose results (captures) will be parsed. This QRegExp must already have been successfully matched against the respective input string, e.g. via QRegExp::indexIn() , prior to calling this function. |
value | A pointer to an array of type quint32 , where the unsigned 32-Bit representations of the results will be stored (the n -th result is stored at value[n-1] ). The array must be at least count elements in length. The contents of this array are undefined, if the function failed. |
count | Specifies the number of results (captures) in the given QRegExp object. The function tries to parse the first count captures and ignores any additional captures that may exist. This parameter also determines the required (minimum) length of the value array. |
true
, if all of the regular expression's captures could be parsed successfully; it returns false
, if any of the captures contain an invalid string or if there are insufficient captures in given the QRegExp object. MUTILS_API bool MUtils::remove_directory | +( | +const QString & | +folderPath, | +
+ | + | const bool & | +recursive | +
+ | ) | ++ |
Recursively deletes the specified directory.
+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.
folderPath | The path to the directory to be deleted. This should be a full path. |
recursive | If set to true the function removes all files and sub-directories in the specified directory; if set to false , the function will not try to delete any files or sub-directories, which means that it will fail on non-empty directories. |
true
, if the directory was deleted successfully or if the directory doesn't exist; it returns false
, if the directory could not be deleted. MUTILS_API bool MUtils::remove_file | +( | +const QString & | +fileName | ) | ++ |
Deletes the specified file.
+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.
+fileName | The path to the file to be deleted. This should be a full path. |
true
, if the file was deleted successfully or if the file doesn't exist; it returns false
, if the file could not be deleted. MUTILS_API const QString& MUtils::temp_folder | +( | +void | +) | ++ |
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 terminates normally, the application's Temp folder and all files or sub-directories thereof will be removed automatically!
MUTILS_API QString& MUtils::trim_left | +( | +QString & | +str | ) | ++ |
Remove leading white-space characters.
+The function removes all leading white-space characters from the specified string. Trailing white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A reference to the QString object to be trimmed. This QString object will be modified directly. |
str
parameter. MUTILS_API QString MUtils::trim_left | +( | +const QString & | +str | ) | ++ |
Remove trailing white-space characters.
+The function removes all leading white-space characters from the specified string. Trailing white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A read-only reference to the QString object to be trimmed. The original QString object is not modified. |
MUTILS_API QString& MUtils::trim_right | +( | +QString & | +str | ) | ++ |
Remove trailing white-space characters.
+The function removes all trailing white-space characters from the specified string. Leading white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A reference to the QString object to be trimmed. This QString object will be modified directly. |
str
parameter. MUTILS_API QString MUtils::trim_right | +( | +const QString & | +str | ) | ++ |
Remove trailing white-space characters.
+The function removes all trailing white-space characters from the specified string. Leading white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A read-only reference to the QString object to be trimmed. The original QString object is not modified. |
Go to the source code of this file.
+Namespaces | |
MUtils | |
Macros | |
-#define | MUTILS_API |
-#define | MUTILS_MAKE_STRING_HELPER(X) #X |
-#define | MUTILS_MAKE_STRING(X) MUTILS_MAKE_STRING_HELPER(X) |
-#define | MUTILS_COMPILER_WARNING(TXT) __pragma(message(__FILE__ "(" MUTILS_MAKE_STRING(__LINE__) ") : warning: " TXT)) |
-#define | MUTILS_DEBUG (1) |
-#define | MUTILS_DELETE(PTR) do { if((PTR)) { delete (PTR); (PTR) = NULL; } } while(0) | MUTILS_DELETE(PTR) do { if((PTR)) { delete (PTR); (PTR) = NULL; } } while(0) | +
Deletes the object, if and only if the given pointer is not NULL. Also sets pointer to NULL after object has been deleted. | |
-#define | MUTILS_DELETE_ARRAY(PTR) do { if((PTR)) { delete [] (PTR); (PTR) = NULL; } } while(0) | MUTILS_DELETE_ARRAY(PTR) do { if((PTR)) { delete [] (PTR); (PTR) = NULL; } } while(0) | +
Deletes the array, if and only if the given pointer is not NULL. Also sets pointer to NULL after array has been deleted. | |
-#define | MUTILS_ZERO_MEMORY(PTR) memset(&(PTR), 0, sizeof((PTR))) | MUTILS_ZERO_MEMORY(PTR) memset(&(PTR), 0, sizeof((PTR))) | +
Clears the specified variable or struct by setting all of its bytes to zero (0x00 ). Do not use for arrays. | |
-#define | MUTILS_WCHR(STR) (reinterpret_cast<const wchar_t*>((STR).utf16())) | MUTILS_WCHR(STR) (reinterpret_cast<const wchar_t*>((STR).utf16())) | +
Converts a given QString object to a wchar_t* pointer. Does not copy the string data, so do not free the pointer! The returned pointer only remains valid until the underlying QString is modified or goes out of scope. | |
-#define | MUTILS_UTF8(STR) ((STR).toUtf8().constData()) | MUTILS_UTF8(STR) ((STR).toUtf8().constData()) | +
Converts a given QString object to a char* pointer. The string is converted to UTF-8 encoding. The pointer is valid only while the expression is being evaluated, so do not free or store this pointer! Mainly useful for function calls that require a char* argument. | |
-#define | MUTILS_QSTR(STR) (QString::fromUtf16(reinterpret_cast<const unsigned short*>((STR)))) | MUTILS_QSTR(STR) (QString::fromUtf16(reinterpret_cast<const unsigned short*>((STR)))) | +
Creates a QString object from a given wchar_t* buffer. The buffer is expected to conatin a NULL-terminated string in UTF-16 encoding. The string data is copied into the new QString object, however the original buffer will not be freed automatically! | |
-#define | MUTILS_BOOL2STR(X) ((X) ? "1" : "0") | MUTILS_BOOL2STR(X) ((X) ? "1" : "0") | +
Converts a boolean expression into a string. A true boolean expression is converted to the string "1" ; a false boolean expression is converted to the string "0" . | |
Functions | |
const QString & | MUtils::temp_folder (void) |
Rerieves the full path of the application's Temp folder. More... | |
-void | MUtils::init_process (QProcess &process, const QString &wokringDir, const bool bReplaceTempDir=true, const QStringList *const extraPaths=NULL) |
quint32 | MUtils::next_rand_u32 (void) |
Generates a random unsigned 32-Bit value. More... | |
quint64 | MUtils::next_rand_u64 (void) |
Generates a random unsigned 64-Bit value. More... | |
QString | MUtils::next_rand_str (const bool &bLong=false) |
Generates a random string. More... | |
QString | MUtils::make_temp_file (const QString &basePath, const QString &extension, const bool placeholder=false) |
Generates a temporary file name. More... | |
QString | MUtils::make_unique_file (const QString &basePath, const QString &baseName, const QString &extension, const bool fancy=false) |
Generates a unique file name. More... | |
bool | MUtils::parity (quint32 value) |
Computes the parity of the given unsigned 32-Bit value. More... | |
bool | MUtils::remove_file (const QString &fileName) |
Deletes the specified file. More... | |
bool | MUtils::remove_directory (const QString &folderPath, const bool &recursive) |
Recursively deletes the specified directory. More... | |
QString & | MUtils::trim_right (QString &str) |
Remove trailing white-space characters. More... | |
QString & | MUtils::trim_left (QString &str) |
Remove leading white-space characters. More... | |
QString | MUtils::trim_right (const QString &str) |
Remove trailing white-space characters. More... | |
QString | MUtils::trim_left (const QString &str) |
Remove trailing white-space characters. More... | |
void | MUtils::natural_string_sort (QStringList &list, const bool bIgnoreCase) |
Sort a list of strings using "natural ordering" algorithm. More... | |
-QString | MUtils::clean_file_name (const QString &name) |
-QString | MUtils::clean_file_path (const QString &path) |
bool | MUtils::regexp_parse_uint32 (const QRegExp ®exp, quint32 &value) |
Parse regular expression results. More... | |
bool | MUtils::regexp_parse_uint32 (const QRegExp ®exp, quint32 *values, const size_t &count) |
Parse regular expression results. More... | |
QStringList | MUtils::available_codepages (const bool &noAliases=true) |
Retrieve a list of all available codepages. More... | |
MUTILS_API const QString & | MUtils::temp_folder (void) |
Rerieves the full path of the application's Temp folder. More... | |
MUTILS_API void | MUtils::init_process (QProcess &process, const QString &wokringDir, const bool bReplaceTempDir=true, const QStringList *const extraPaths=NULL) |
Initialize a given QProcess object. More... | |
MUTILS_API quint32 | MUtils::next_rand_u32 (void) |
Generates a random unsigned 32-Bit value. More... | |
MUTILS_API quint64 | MUtils::next_rand_u64 (void) |
Generates a random unsigned 64-Bit value. More... | |
MUTILS_API QString | MUtils::next_rand_str (const bool &bLong=false) |
Generates a random string. More... | |
MUTILS_API QString | MUtils::make_temp_file (const QString &basePath, const QString &extension, const bool placeholder=false) |
Generates a temporary file name. More... | |
MUTILS_API QString | MUtils::make_unique_file (const QString &basePath, const QString &baseName, const QString &extension, const bool fancy=false) |
Generates a unique file name. More... | |
MUTILS_API bool | MUtils::parity (quint32 value) |
Computes the parity of the given unsigned 32-Bit value. More... | |
MUTILS_API bool | MUtils::remove_file (const QString &fileName) |
Deletes the specified file. More... | |
MUTILS_API bool | MUtils::remove_directory (const QString &folderPath, const bool &recursive) |
Recursively deletes the specified directory. More... | |
MUTILS_API QString & | MUtils::trim_right (QString &str) |
Remove trailing white-space characters. More... | |
MUTILS_API QString & | MUtils::trim_left (QString &str) |
Remove leading white-space characters. More... | |
MUTILS_API QString | MUtils::trim_right (const QString &str) |
Remove trailing white-space characters. More... | |
MUTILS_API QString | MUtils::trim_left (const QString &str) |
Remove trailing white-space characters. More... | |
MUTILS_API void | MUtils::natural_string_sort (QStringList &list, const bool bIgnoreCase) |
Sort a list of strings using "natural ordering" algorithm. More... | |
MUTILS_API QString | MUtils::clean_file_name (const QString &name) |
Clean up a file name string. More... | |
MUTILS_API QString | MUtils::clean_file_path (const QString &path) |
Clean up a file path string. More... | |
MUTILS_API bool | MUtils::regexp_parse_uint32 (const QRegExp ®exp, quint32 &value) |
Parse regular expression results. More... | |
MUTILS_API bool | MUtils::regexp_parse_uint32 (const QRegExp ®exp, quint32 *values, const size_t &count) |
Parse regular expression results. More... | |
MUTILS_API QStringList | MUtils::available_codepages (const bool &noAliases=true) |
Retrieve a list of all available codepages. More... | |
This file contains miscellaneous functions that are generally useful for Qt-based applications.
-QStringList MUtils::available_codepages | -( | -const bool & | -noAliases = true | ) | -- |
Retrieve a list of all available codepages.
-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 QTextCodec::codecForName()
function in order to obtain a corresponding QTextCodec object.
noAliases | If set to true , only distinct codepages are returned, i.e. any codepage aliases are discarded from the list; if set to false , the returned list may (and usually will) also contain codepage aliases. |
QString MUtils::make_temp_file | -( | -const QString & | -basePath, | -
- | - | const QString & | -extension, | -
- | - | const bool | -placeholder = false |
-
- | ) | -- |
Generates a temporary file name.
-The function generates a file name that contains a random component and that is guaranteed to not exist yet. The generated file name follows a "<basedir>/<random>.<ext>"
pattern. This is useful (not only) for creating temporary files.
basePath | Specifies the "base" directory where the temporary file is supposed to be created. This must be a valid existing directory. |
extension | Specifies the desired file extensions of the temporary file. Do not include a leading dot (. ) character. |
placeholder | If set to true , the function creates an empty "placeholder" file under the returned file name; if set to false , it does not. |
QString MUtils::make_unique_file | -( | -const QString & | -basePath, | -
- | - | const QString & | -baseName, | -
- | - | const QString & | -extension, | -
- | - | const bool | -fancy = false |
-
- | ) | -- |
Generates a unique file name.
-The function generates a unique file name in the specified directory. The function guarantees that the returned file name does not exist yet. If necessary, a counter will be included in the file name in order to ensure its uniqueness.
-basePath | Specifies the "base" directory where the unique file is supposed to be created. This must be a valid existing directory. |
baseName | Specifies the desired "base" file name of the unique file. Do not include a file extension. |
extension | Specifies the desired file extensions of the unique file. Do not include a leading dot (. ) character. |
fancy | If set to true , the unique file name is generated according to the "<basedir>/<basename> (N).<ext>" pattern; if set to false , it is generated according to the "<basedir>/<basename>.XXXX.<ext>" pattern. Also, if set to true , a counter is only included in the file name, if the file name without counter already exists; if set to false , a counter is always included. Finally, if set to true , the counter starts at 2 and is printed in decimal format; if set to false , the counter starts at 0 and is printed in zero-padded hexadecimal format. |
void MUtils::natural_string_sort | -( | -QStringList & | -list, | -
- | - | const bool | -bIgnoreCase | -
- | ) | -- |
Sort a list of strings using "natural ordering" algorithm.
-This function implements a sort algorithm that orders alphanumeric strings in the way a human being would. See Natural Order String Comparison for details!
-list | A reference to the QStringList object to be sorted. The list will be sorted "in place". |
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. |
QString MUtils::next_rand_str | -( | -const bool & | -bLong = false | ) | -- |
Generates a random string.
-The random string is generated using the same PRNG as the next_rand_u64()
function. The random bytes are converted to a hexadecimal string and, if necessary, zero-padded to a toal length of 16 or 32 characters. There is no 0x
-prefix included in the result.
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. |
quint32 MUtils::next_rand_u32 | -( | -void | -) | -- |
Generates a random unsigned 32-Bit value.
-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.
quint64 MUtils::next_rand_u64 | -( | -void | -) | -- |
Generates a random unsigned 64-Bit value.
-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.
bool MUtils::parity | -( | -quint32 | -value | ) | -- |
Computes the parity of the given unsigned 32-Bit value.
-value | The 32-Bit unsigned value from which the parity is to be computed. |
true
, if the number of 1 bits in the given value is odd; it returns false
, if the number of 1 bits in the given value is even. bool MUtils::regexp_parse_uint32 | -( | -const QRegExp & | -regexp, | -
- | - | quint32 & | -value | -
- | ) | -- |
Parse regular expression results.
-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 one capture. Only the first capture is considered, additional captures are ignored.
-regexp | A read-only reference to the QRegExp object whose result (capture) will be parsed. This QRegExp must already have been successfully matched against the respective input string, e.g. via QRegExp::indexIn() , prior to calling this function. |
value | A reference to a variable of type quint32 , where the unsigned 32-Bit representation of the result will be stored. The contents of this variable are undefined, if the function failed. |
true
, if the regular expression's capture could be parsed successfully; it returns false
, if the capture contains an invalid string or if there are insufficient captures in given the QRegExp object. bool MUtils::regexp_parse_uint32 | -( | -const QRegExp & | -regexp, | -
- | - | quint32 * | -values, | -
- | - | const size_t & | -count | -
- | ) | -- |
Parse regular expression results.
-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 count
captures. Only the first count
captures are considered, additional captures are ignored.
regexp | A read-only reference to the QRegExp object whose results (captures) will be parsed. This QRegExp must already have been successfully matched against the respective input string, e.g. via QRegExp::indexIn() , prior to calling this function. |
value | A pointer to an array of type quint32 , where the unsigned 32-Bit representations of the results will be stored (the n -th result is stored at value[n-1] ). The array must be at least count elements in length. The contents of this array are undefined, if the function failed. |
count | Specifies the number of results (captures) in the given QRegExp object. The function tries to parse the first count captures and ignores any additional captures that may exist. This parameter also determines the required (minimum) length of the value array. |
true
, if all of the regular expression's captures could be parsed successfully; it returns false
, if any of the captures contain an invalid string or if there are insufficient captures in given the QRegExp object. bool MUtils::remove_directory | -( | -const QString & | -folderPath, | -
- | - | const bool & | -recursive | -
- | ) | -- |
Recursively deletes the specified directory.
-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.
folderPath | The path to the directory to be deleted. This should be a full path. |
recursive | If set to true the function removes all files and sub-directories in the specified directory; if set to false , the function will not try to delete any files or sub-directories, which means that it will fail on non-empty directories. |
true
, if the directory was deleted successfully or if the directory doesn't exist; it returns false
, if the directory could not be deleted. bool MUtils::remove_file | -( | -const QString & | -fileName | ) | -- |
Deletes the specified file.
-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.
-fileName | The path to the file to be deleted. This should be a full path. |
true
, if the file was deleted successfully or if the file doesn't exist; it returns false
, if the file could not be deleted. const QString& MUtils::temp_folder | -( | -void | -) | -- |
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 terminates normally, the application's Temp folder and all files or sub-directories thereof will be removed automatically!
QString& MUtils::trim_left | -( | -QString & | -str | ) | -- |
Remove leading white-space characters.
-The function removes all leading white-space characters from the specified string. Trailing white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A reference to the QString object to be trimmed. This QString object will be modified directly. |
str
parameter. QString MUtils::trim_left | -( | -const QString & | -str | ) | -- |
Remove trailing white-space characters.
-The function removes all leading white-space characters from the specified string. Trailing white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A read-only reference to the QString object to be trimmed. The original QString object is not modified. |
QString& MUtils::trim_right | -( | -QString & | -str | ) | -- |
Remove trailing white-space characters.
-The function removes all trailing white-space characters from the specified string. Leading white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A reference to the QString object to be trimmed. This QString object will be modified directly. |
str
parameter. QString MUtils::trim_right | -( | -const QString & | -str | ) | -- |
Remove trailing white-space characters.
-The function removes all trailing white-space characters from the specified string. Leading white-space characters are not removed. White-space characters are defined by the \s
character class.
str | A read-only reference to the QString object to be trimmed. The original QString object is not modified. |
+ MuldeR's Utilities for Qt
+
+ MUtilities
+ |
+
+ MuldeR's Utilities for Qt
+
+ MUtilities
+ |
+
The MUtilities library is a collection of routines and classes to extend the Qt cross-platform framework. 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 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 – 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.
-The MUtilities project directory is organized as follows:
-bin/
– compiled library files (static or shared), link those files in projects that use the MUtilities librarydocs/
– programming interface documentation, generated with Doxygen tooletc/
– miscellaneous files, everything that doesn't fit in anywhere elseinclude/
– public header files, include this directory in projects that use the MUtilities libraryobj/
– object code files, intermediate files generated during the build processres/
– resource files, required for building the MUtilities librarysrc/
– source code files, required for building the MUtilities library (third-party code in src/3rd_party/
)test/
– unit tests, based on Google Test frameworktmp/
– temporary files, automatically generated during the build processThe public API of the MUtilities library is defined in the following header files (select file for details):
include/
directory is contained in your "Additional Include Directories" and that the MUtilities' bin/
directory is contained in your "Additional Library Directories".MUtils32-1.lib
library file. For each build configuration, pick the proper **.lib** file from the corresponding bin/<platform>/<config>/
directory!MUTILS_STATIC_LIB
must be added to your project's "Preprocessor Definitions".This library is free software. It is released under the terms of the GNU Lesser General Public License (LGPL), Version 2.1.
MUtilities - MuldeR's Utilities for Qt Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>. Some rights reserved. diff --git a/docs/menudata.js b/docs/menudata.js index db9ff74..a2b6c55 100644 --- a/docs/menudata.js +++ b/docs/menudata.js @@ -1,8 +1,16 @@ var menudata={children:[ {text:'Main Page',url:'index.html'}, +{text:'Namespaces',url:'namespaces.html',children:[ +{text:'Namespace List',url:'namespaces.html'}, +{text:'Namespace Members',url:'namespacemembers.html',children:[ +{text:'All',url:'namespacemembers.html'}, +{text:'Functions',url:'namespacemembers_func.html'}]}]}, {text:'Classes',url:'annotated.html',children:[ {text:'Class List',url:'annotated.html'}, {text:'Class Index',url:'classes.html'}, {text:'Class Hierarchy',url:'hierarchy.html'}]}, {text:'Files',url:'files.html',children:[ -{text:'File List',url:'files.html'}]}]} +{text:'File List',url:'files.html'}, +{text:'File Members',url:'globals.html',children:[ +{text:'All',url:'globals.html'}, +{text:'Macros',url:'globals_defs.html'}]}]}]} diff --git a/docs/namespacemembers.html b/docs/namespacemembers.html new file mode 100644 index 0000000..3216f2d --- /dev/null +++ b/docs/namespacemembers.html @@ -0,0 +1,123 @@ + + + + + + + +MuldeR's Utilities for Qt: Namespace Members + + + + + + + + + +++ +++ + + + + + + ++ +
++ + ++ +MuldeR's Utilities for Qt ++MUtilities+++ + ++ ++ +++ +Here is a list of all documented namespace members with links to the namespaces they belong to:+
+- available_codepages() +: MUtils +
+- clean_file_name() +: MUtils +
+- clean_file_path() +: MUtils +
+- init_process() +: MUtils +
+- make_temp_file() +: MUtils +
+- make_unique_file() +: MUtils +
+- natural_string_sort() +: MUtils +
+- next_rand_str() +: MUtils +
+- next_rand_u32() +: MUtils +
+- next_rand_u64() +: MUtils +
+- parity() +: MUtils +
+- regexp_parse_uint32() +: MUtils +
+- remove_directory() +: MUtils +
+- remove_file() +: MUtils +
+- temp_folder() +: MUtils +
+- trim_left() +: MUtils +
+- trim_right() +: MUtils +
+
+Generated by + + 1.8.12 + + + diff --git a/docs/namespacemembers_func.html b/docs/namespacemembers_func.html new file mode 100644 index 0000000..7f022f7 --- /dev/null +++ b/docs/namespacemembers_func.html @@ -0,0 +1,123 @@ + + + + + + + +MuldeR's Utilities for Qt: Namespace Members + + + + + + + + + +++ +++ + + + + + + ++ +
++ + ++ +MuldeR's Utilities for Qt ++MUtilities+++ + ++ ++ +++ ++
+- available_codepages() +: MUtils +
+- clean_file_name() +: MUtils +
+- clean_file_path() +: MUtils +
+- init_process() +: MUtils +
+- make_temp_file() +: MUtils +
+- make_unique_file() +: MUtils +
+- natural_string_sort() +: MUtils +
+- next_rand_str() +: MUtils +
+- next_rand_u32() +: MUtils +
+- next_rand_u64() +: MUtils +
+- parity() +: MUtils +
+- regexp_parse_uint32() +: MUtils +
+- remove_directory() +: MUtils +
+- remove_file() +: MUtils +
+- temp_folder() +: MUtils +
+- trim_left() +: MUtils +
+- trim_right() +: MUtils +
+
+Generated by + + 1.8.12 + + + diff --git a/docs/namespaces.html b/docs/namespaces.html new file mode 100644 index 0000000..43079e6 --- /dev/null +++ b/docs/namespaces.html @@ -0,0 +1,79 @@ + + + + + + + +MuldeR's Utilities for Qt: Namespace List + + + + + + + + + +++ +++ + + + + + + ++ +
++ + ++ +MuldeR's Utilities for Qt ++MUtilities+++ + ++ ++ +++++Namespace List++ +Here is a list of all documented namespaces with brief descriptions:+++
++ NMUtils
+Generated by + + 1.8.12 + + + diff --git a/docs/search/all_1.js b/docs/search/all_1.js index f2c4c9a..b41c51c 100644 --- a/docs/search/all_1.js +++ b/docs/search/all_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['available_5fcodepages',['available_codepages',['../d5/d3b/_global_8h.html#a4fcbdafffc1224776616fcc6aec8278b',1,'MUtils']]] + ['available_5fcodepages',['available_codepages',['../d3/da6/namespace_m_utils.html#a2275e64c3c74dea855c39b66be67f705',1,'MUtils']]] ]; diff --git a/docs/search/all_3.js b/docs/search/all_3.js index fa2e904..f8da9ee 100644 --- a/docs/search/all_3.js +++ b/docs/search/all_3.js @@ -1,4 +1,5 @@ var searchData= [ - ['global_2eh',['Global.h',['../d5/d3b/_global_8h.html',1,'']]] + ['clean_5ffile_5fname',['clean_file_name',['../d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385',1,'MUtils']]], + ['clean_5ffile_5fpath',['clean_file_path',['../d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88',1,'MUtils']]] ]; diff --git a/docs/search/all_4.js b/docs/search/all_4.js index 8414f45..fa2e904 100644 --- a/docs/search/all_4.js +++ b/docs/search/all_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['ipcchannel',['IPCChannel',['../d5/dfe/class_m_utils_1_1_i_p_c_channel.html',1,'MUtils']]] + ['global_2eh',['Global.h',['../d5/d3b/_global_8h.html',1,'']]] ]; diff --git a/docs/search/all_5.js b/docs/search/all_5.js index e409b67..e8ff725 100644 --- a/docs/search/all_5.js +++ b/docs/search/all_5.js @@ -1,4 +1,5 @@ var searchData= [ - ['jobobject',['JobObject',['../dc/dd3/class_m_utils_1_1_job_object.html',1,'MUtils']]] + ['init_5fprocess',['init_process',['../d3/da6/namespace_m_utils.html#a0ecb5d72f33a7b6feadd7deb8ed46cc3',1,'MUtils']]], + ['ipcchannel',['IPCChannel',['../d5/dfe/class_m_utils_1_1_i_p_c_channel.html',1,'MUtils']]] ]; diff --git a/docs/search/all_6.js b/docs/search/all_6.js index 78ae639..e409b67 100644 --- a/docs/search/all_6.js +++ b/docs/search/all_6.js @@ -1,4 +1,4 @@ var searchData= [ - ['keccak',['Keccak',['../dd/d9f/class_m_utils_1_1_hash_1_1_keccak.html',1,'MUtils::Hash']]] + ['jobobject',['JobObject',['../dc/dd3/class_m_utils_1_1_job_object.html',1,'MUtils']]] ]; diff --git a/docs/search/all_7.js b/docs/search/all_7.js index 3281d97..78ae639 100644 --- a/docs/search/all_7.js +++ b/docs/search/all_7.js @@ -1,5 +1,4 @@ var searchData= [ - ['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']]] + ['keccak',['Keccak',['../dd/d9f/class_m_utils_1_1_hash_1_1_keccak.html',1,'MUtils::Hash']]] ]; diff --git a/docs/search/all_8.js b/docs/search/all_8.js index de939ce..421341b 100644 --- a/docs/search/all_8.js +++ b/docs/search/all_8.js @@ -1,7 +1,13 @@ var searchData= [ - ['natural_5fstring_5fsort',['natural_string_sort',['../d5/d3b/_global_8h.html#a09e919d419ded903481cf7aba702dcba',1,'MUtils']]], - ['next_5frand_5fstr',['next_rand_str',['../d5/d3b/_global_8h.html#a996b60884ddf7728178e94f34ca12570',1,'MUtils']]], - ['next_5frand_5fu32',['next_rand_u32',['../d5/d3b/_global_8h.html#a4dc7dccb81653ae28e0d37a7c2f62112',1,'MUtils']]], - ['next_5frand_5fu64',['next_rand_u64',['../d5/d3b/_global_8h.html#a15762bf5b0239e5f67a3815d63ed441a',1,'MUtils']]] + ['make_5ftemp_5ffile',['make_temp_file',['../d3/da6/namespace_m_utils.html#a29461116550863e8730f3f4ec479bbcb',1,'MUtils']]], + ['make_5funique_5ffile',['make_unique_file',['../d3/da6/namespace_m_utils.html#af9afe3821ae9bef7bdf56a4183fdea0d',1,'MUtils']]], + ['mutils',['MUtils',['../d3/da6/namespace_m_utils.html',1,'']]], + ['mutils_5fbool2str',['MUTILS_BOOL2STR',['../d5/d3b/_global_8h.html#a177ecbfe7701c2ac04bb8bdeb208773a',1,'Global.h']]], + ['mutils_5fdelete',['MUTILS_DELETE',['../d5/d3b/_global_8h.html#ad42b1946a83df3bd76734d5ab691fd0d',1,'Global.h']]], + ['mutils_5fdelete_5farray',['MUTILS_DELETE_ARRAY',['../d5/d3b/_global_8h.html#aa544a37b80f1ab9d86f439a7666e9aa8',1,'Global.h']]], + ['mutils_5fqstr',['MUTILS_QSTR',['../d5/d3b/_global_8h.html#a04d63f6f60c90f8e3c4029824a7352b0',1,'Global.h']]], + ['mutils_5futf8',['MUTILS_UTF8',['../d5/d3b/_global_8h.html#a88b0902153ea537b12d86267af20eb3f',1,'Global.h']]], + ['mutils_5fwchr',['MUTILS_WCHR',['../d5/d3b/_global_8h.html#af55d43b39d3f41cf090c138ed190ee6e',1,'Global.h']]], + ['mutils_5fzero_5fmemory',['MUTILS_ZERO_MEMORY',['../d5/d3b/_global_8h.html#a1fe39de37351efa3ca46bdc8653e1f25',1,'Global.h']]] ]; diff --git a/docs/search/all_9.js b/docs/search/all_9.js index 386600c..ecffc94 100644 --- a/docs/search/all_9.js +++ b/docs/search/all_9.js @@ -1,4 +1,7 @@ var searchData= [ - ['parity',['parity',['../d5/d3b/_global_8h.html#ad1bdb5e416839b1f85f6df68e58ae28c',1,'MUtils']]] + ['natural_5fstring_5fsort',['natural_string_sort',['../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f',1,'MUtils']]], + ['next_5frand_5fstr',['next_rand_str',['../d3/da6/namespace_m_utils.html#ac583617546d5ae100ce7436546d9662c',1,'MUtils']]], + ['next_5frand_5fu32',['next_rand_u32',['../d3/da6/namespace_m_utils.html#a1c9832c1d645a2c90e9bd52d57d843b3',1,'MUtils']]], + ['next_5frand_5fu64',['next_rand_u64',['../d3/da6/namespace_m_utils.html#ad7edd4aece64faf3aa16c9509243608c',1,'MUtils']]] ]; diff --git a/docs/search/all_a.js b/docs/search/all_a.js index 0715c8f..f923f06 100644 --- a/docs/search/all_a.js +++ b/docs/search/all_a.js @@ -1,7 +1,4 @@ var searchData= [ - ['regexp_5fparse_5fuint32',['regexp_parse_uint32',['../d5/d3b/_global_8h.html#a45cb0d1e6a55cf5ffda3b626c25fd957',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 &value)'],['../d5/d3b/_global_8h.html#a367969a260da994876d19c9f7ee40606',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 *values, const size_t &count)']]], - ['registrykey',['RegistryKey',['../da/d35/class_m_utils_1_1_registry_1_1_registry_key.html',1,'MUtils::Registry']]], - ['remove_5fdirectory',['remove_directory',['../d5/d3b/_global_8h.html#ac7d2c9bd5c49230b2fed72e3410c3f7d',1,'MUtils']]], - ['remove_5ffile',['remove_file',['../d5/d3b/_global_8h.html#a12259acdd6aff74ee83819d3aebd8ba9',1,'MUtils']]] + ['parity',['parity',['../d3/da6/namespace_m_utils.html#aea4a212153b09b24b04f30ef5159f29b',1,'MUtils']]] ]; diff --git a/docs/search/all_b.js b/docs/search/all_b.js index c5890a5..45b0c01 100644 --- a/docs/search/all_b.js +++ b/docs/search/all_b.js @@ -1,4 +1,7 @@ var searchData= [ - ['spongestatestruct',['spongeStateStruct',['../d0/dd8/struct_m_utils_1_1_hash_1_1_internal_1_1_keccak_impl_1_1sponge_state_struct.html',1,'MUtils::Hash::Internal::KeccakImpl']]] + ['regexp_5fparse_5fuint32',['regexp_parse_uint32',['../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 &value)'],['../d3/da6/namespace_m_utils.html#a81704d66d34e37d3e0e159b5f436babf',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 *values, const size_t &count)']]], + ['registrykey',['RegistryKey',['../da/d35/class_m_utils_1_1_registry_1_1_registry_key.html',1,'MUtils::Registry']]], + ['remove_5fdirectory',['remove_directory',['../d3/da6/namespace_m_utils.html#a4d451ddc82668d1298f2922f62474b5d',1,'MUtils']]], + ['remove_5ffile',['remove_file',['../d3/da6/namespace_m_utils.html#a5a14e75627eebd09efc37898d74c5ac6',1,'MUtils']]] ]; diff --git a/docs/search/all_c.js b/docs/search/all_c.js index aaed9d2..c5890a5 100644 --- a/docs/search/all_c.js +++ b/docs/search/all_c.js @@ -1,7 +1,4 @@ var searchData= [ - ['taskbar7',['Taskbar7',['../d2/d52/class_m_utils_1_1_taskbar7.html',1,'MUtils']]], - ['temp_5ffolder',['temp_folder',['../d5/d3b/_global_8h.html#a9ddb9a2039585b1ef3429db16ea84292',1,'MUtils']]], - ['trim_5fleft',['trim_left',['../d5/d3b/_global_8h.html#af089c8a40b6ec2e19db3fe612aa81c8c',1,'MUtils::trim_left(QString &str)'],['../d5/d3b/_global_8h.html#a8680aeaeb1118353bd099e26ba7d6123',1,'MUtils::trim_left(const QString &str)']]], - ['trim_5fright',['trim_right',['../d5/d3b/_global_8h.html#a9290a3fe637a05ad2a7515f36fad79bd',1,'MUtils::trim_right(QString &str)'],['../d5/d3b/_global_8h.html#a3eb47d6ca49b2700622e3fe99faf14d8',1,'MUtils::trim_right(const QString &str)']]] + ['spongestatestruct',['spongeStateStruct',['../d0/dd8/struct_m_utils_1_1_hash_1_1_internal_1_1_keccak_impl_1_1sponge_state_struct.html',1,'MUtils::Hash::Internal::KeccakImpl']]] ]; diff --git a/docs/search/all_d.js b/docs/search/all_d.js index d8e4d05..b0a2bec 100644 --- a/docs/search/all_d.js +++ b/docs/search/all_d.js @@ -1,5 +1,7 @@ var searchData= [ - ['updatechecker',['UpdateChecker',['../d0/d8a/class_m_utils_1_1_update_checker.html',1,'MUtils']]], - ['updatecheckerinfo',['UpdateCheckerInfo',['../d1/d0d/class_m_utils_1_1_update_checker_info.html',1,'MUtils']]] + ['taskbar7',['Taskbar7',['../d2/d52/class_m_utils_1_1_taskbar7.html',1,'MUtils']]], + ['temp_5ffolder',['temp_folder',['../d3/da6/namespace_m_utils.html#a3f198156e8be91f3e74dd9ed69ffaa34',1,'MUtils']]], + ['trim_5fleft',['trim_left',['../d3/da6/namespace_m_utils.html#a20b8fc56856ee904caaded756399e705',1,'MUtils::trim_left(QString &str)'],['../d3/da6/namespace_m_utils.html#ae43bc17b6fa4ee2287099c4ae095483b',1,'MUtils::trim_left(const QString &str)']]], + ['trim_5fright',['trim_right',['../d3/da6/namespace_m_utils.html#a6118cf23d2b771fae1ad159c7ea6686a',1,'MUtils::trim_right(QString &str)'],['../d3/da6/namespace_m_utils.html#a3bcb0fce5181ded3c54456379147009d',1,'MUtils::trim_right(const QString &str)']]] ]; diff --git a/docs/search/all_e.js b/docs/search/all_e.js index 367cd93..d8e4d05 100644 --- a/docs/search/all_e.js +++ b/docs/search/all_e.js @@ -1,4 +1,5 @@ var searchData= [ - ['version',['Version',['../d1/d32/class_m_utils_1_1_version.html',1,'MUtils']]] + ['updatechecker',['UpdateChecker',['../d0/d8a/class_m_utils_1_1_update_checker.html',1,'MUtils']]], + ['updatecheckerinfo',['UpdateCheckerInfo',['../d1/d0d/class_m_utils_1_1_update_checker_info.html',1,'MUtils']]] ]; diff --git a/docs/search/all_f.html b/docs/search/all_f.html new file mode 100644 index 0000000..3bf97c6 --- /dev/null +++ b/docs/search/all_f.html @@ -0,0 +1,26 @@ + ++ + + + + + + + ++ + diff --git a/docs/search/all_f.js b/docs/search/all_f.js new file mode 100644 index 0000000..367cd93 --- /dev/null +++ b/docs/search/all_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['version',['Version',['../d1/d32/class_m_utils_1_1_version.html',1,'MUtils']]] +]; diff --git a/docs/search/defines_0.html b/docs/search/defines_0.html new file mode 100644 index 0000000..e53ef23 --- /dev/null +++ b/docs/search/defines_0.html @@ -0,0 +1,26 @@ + +Loading...+ + +Searching...+No Matches+ ++ + + + + + + + ++ + diff --git a/docs/search/defines_0.js b/docs/search/defines_0.js new file mode 100644 index 0000000..7eea83b --- /dev/null +++ b/docs/search/defines_0.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['mutils_5fbool2str',['MUTILS_BOOL2STR',['../d5/d3b/_global_8h.html#a177ecbfe7701c2ac04bb8bdeb208773a',1,'Global.h']]], + ['mutils_5fdelete',['MUTILS_DELETE',['../d5/d3b/_global_8h.html#ad42b1946a83df3bd76734d5ab691fd0d',1,'Global.h']]], + ['mutils_5fdelete_5farray',['MUTILS_DELETE_ARRAY',['../d5/d3b/_global_8h.html#aa544a37b80f1ab9d86f439a7666e9aa8',1,'Global.h']]], + ['mutils_5fqstr',['MUTILS_QSTR',['../d5/d3b/_global_8h.html#a04d63f6f60c90f8e3c4029824a7352b0',1,'Global.h']]], + ['mutils_5futf8',['MUTILS_UTF8',['../d5/d3b/_global_8h.html#a88b0902153ea537b12d86267af20eb3f',1,'Global.h']]], + ['mutils_5fwchr',['MUTILS_WCHR',['../d5/d3b/_global_8h.html#af55d43b39d3f41cf090c138ed190ee6e',1,'Global.h']]], + ['mutils_5fzero_5fmemory',['MUTILS_ZERO_MEMORY',['../d5/d3b/_global_8h.html#a1fe39de37351efa3ca46bdc8653e1f25',1,'Global.h']]] +]; diff --git a/docs/search/functions_0.js b/docs/search/functions_0.js index f2c4c9a..b41c51c 100644 --- a/docs/search/functions_0.js +++ b/docs/search/functions_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['available_5fcodepages',['available_codepages',['../d5/d3b/_global_8h.html#a4fcbdafffc1224776616fcc6aec8278b',1,'MUtils']]] + ['available_5fcodepages',['available_codepages',['../d3/da6/namespace_m_utils.html#a2275e64c3c74dea855c39b66be67f705',1,'MUtils']]] ]; diff --git a/docs/search/functions_1.js b/docs/search/functions_1.js index 3281d97..f8da9ee 100644 --- a/docs/search/functions_1.js +++ b/docs/search/functions_1.js @@ -1,5 +1,5 @@ var searchData= [ - ['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']]] + ['clean_5ffile_5fname',['clean_file_name',['../d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385',1,'MUtils']]], + ['clean_5ffile_5fpath',['clean_file_path',['../d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88',1,'MUtils']]] ]; diff --git a/docs/search/functions_2.js b/docs/search/functions_2.js index de939ce..895c41d 100644 --- a/docs/search/functions_2.js +++ b/docs/search/functions_2.js @@ -1,7 +1,4 @@ var searchData= [ - ['natural_5fstring_5fsort',['natural_string_sort',['../d5/d3b/_global_8h.html#a09e919d419ded903481cf7aba702dcba',1,'MUtils']]], - ['next_5frand_5fstr',['next_rand_str',['../d5/d3b/_global_8h.html#a996b60884ddf7728178e94f34ca12570',1,'MUtils']]], - ['next_5frand_5fu32',['next_rand_u32',['../d5/d3b/_global_8h.html#a4dc7dccb81653ae28e0d37a7c2f62112',1,'MUtils']]], - ['next_5frand_5fu64',['next_rand_u64',['../d5/d3b/_global_8h.html#a15762bf5b0239e5f67a3815d63ed441a',1,'MUtils']]] + ['init_5fprocess',['init_process',['../d3/da6/namespace_m_utils.html#a0ecb5d72f33a7b6feadd7deb8ed46cc3',1,'MUtils']]] ]; diff --git a/docs/search/functions_3.js b/docs/search/functions_3.js index 386600c..041659c 100644 --- a/docs/search/functions_3.js +++ b/docs/search/functions_3.js @@ -1,4 +1,5 @@ var searchData= [ - ['parity',['parity',['../d5/d3b/_global_8h.html#ad1bdb5e416839b1f85f6df68e58ae28c',1,'MUtils']]] + ['make_5ftemp_5ffile',['make_temp_file',['../d3/da6/namespace_m_utils.html#a29461116550863e8730f3f4ec479bbcb',1,'MUtils']]], + ['make_5funique_5ffile',['make_unique_file',['../d3/da6/namespace_m_utils.html#af9afe3821ae9bef7bdf56a4183fdea0d',1,'MUtils']]] ]; diff --git a/docs/search/functions_4.js b/docs/search/functions_4.js index 4c66f69..ecffc94 100644 --- a/docs/search/functions_4.js +++ b/docs/search/functions_4.js @@ -1,6 +1,7 @@ var searchData= [ - ['regexp_5fparse_5fuint32',['regexp_parse_uint32',['../d5/d3b/_global_8h.html#a45cb0d1e6a55cf5ffda3b626c25fd957',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 &value)'],['../d5/d3b/_global_8h.html#a367969a260da994876d19c9f7ee40606',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 *values, const size_t &count)']]], - ['remove_5fdirectory',['remove_directory',['../d5/d3b/_global_8h.html#ac7d2c9bd5c49230b2fed72e3410c3f7d',1,'MUtils']]], - ['remove_5ffile',['remove_file',['../d5/d3b/_global_8h.html#a12259acdd6aff74ee83819d3aebd8ba9',1,'MUtils']]] + ['natural_5fstring_5fsort',['natural_string_sort',['../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f',1,'MUtils']]], + ['next_5frand_5fstr',['next_rand_str',['../d3/da6/namespace_m_utils.html#ac583617546d5ae100ce7436546d9662c',1,'MUtils']]], + ['next_5frand_5fu32',['next_rand_u32',['../d3/da6/namespace_m_utils.html#a1c9832c1d645a2c90e9bd52d57d843b3',1,'MUtils']]], + ['next_5frand_5fu64',['next_rand_u64',['../d3/da6/namespace_m_utils.html#ad7edd4aece64faf3aa16c9509243608c',1,'MUtils']]] ]; diff --git a/docs/search/functions_5.js b/docs/search/functions_5.js index f777269..f923f06 100644 --- a/docs/search/functions_5.js +++ b/docs/search/functions_5.js @@ -1,6 +1,4 @@ var searchData= [ - ['temp_5ffolder',['temp_folder',['../d5/d3b/_global_8h.html#a9ddb9a2039585b1ef3429db16ea84292',1,'MUtils']]], - ['trim_5fleft',['trim_left',['../d5/d3b/_global_8h.html#af089c8a40b6ec2e19db3fe612aa81c8c',1,'MUtils::trim_left(QString &str)'],['../d5/d3b/_global_8h.html#a8680aeaeb1118353bd099e26ba7d6123',1,'MUtils::trim_left(const QString &str)']]], - ['trim_5fright',['trim_right',['../d5/d3b/_global_8h.html#a9290a3fe637a05ad2a7515f36fad79bd',1,'MUtils::trim_right(QString &str)'],['../d5/d3b/_global_8h.html#a3eb47d6ca49b2700622e3fe99faf14d8',1,'MUtils::trim_right(const QString &str)']]] + ['parity',['parity',['../d3/da6/namespace_m_utils.html#aea4a212153b09b24b04f30ef5159f29b',1,'MUtils']]] ]; diff --git a/docs/search/functions_6.html b/docs/search/functions_6.html new file mode 100644 index 0000000..c7bc6fb --- /dev/null +++ b/docs/search/functions_6.html @@ -0,0 +1,26 @@ + +Loading...+ + +Searching...+No Matches+ ++ + + + + + + + ++ + diff --git a/docs/search/functions_6.js b/docs/search/functions_6.js new file mode 100644 index 0000000..86f9020 --- /dev/null +++ b/docs/search/functions_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['regexp_5fparse_5fuint32',['regexp_parse_uint32',['../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 &value)'],['../d3/da6/namespace_m_utils.html#a81704d66d34e37d3e0e159b5f436babf',1,'MUtils::regexp_parse_uint32(const QRegExp ®exp, quint32 *values, const size_t &count)']]], + ['remove_5fdirectory',['remove_directory',['../d3/da6/namespace_m_utils.html#a4d451ddc82668d1298f2922f62474b5d',1,'MUtils']]], + ['remove_5ffile',['remove_file',['../d3/da6/namespace_m_utils.html#a5a14e75627eebd09efc37898d74c5ac6',1,'MUtils']]] +]; diff --git a/docs/search/functions_7.html b/docs/search/functions_7.html new file mode 100644 index 0000000..7f10e2b --- /dev/null +++ b/docs/search/functions_7.html @@ -0,0 +1,26 @@ + +Loading...+ + +Searching...+No Matches+ ++ + + + + + + + ++ + diff --git a/docs/search/functions_7.js b/docs/search/functions_7.js new file mode 100644 index 0000000..7d9d593 --- /dev/null +++ b/docs/search/functions_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['temp_5ffolder',['temp_folder',['../d3/da6/namespace_m_utils.html#a3f198156e8be91f3e74dd9ed69ffaa34',1,'MUtils']]], + ['trim_5fleft',['trim_left',['../d3/da6/namespace_m_utils.html#a20b8fc56856ee904caaded756399e705',1,'MUtils::trim_left(QString &str)'],['../d3/da6/namespace_m_utils.html#ae43bc17b6fa4ee2287099c4ae095483b',1,'MUtils::trim_left(const QString &str)']]], + ['trim_5fright',['trim_right',['../d3/da6/namespace_m_utils.html#a6118cf23d2b771fae1ad159c7ea6686a',1,'MUtils::trim_right(QString &str)'],['../d3/da6/namespace_m_utils.html#a3bcb0fce5181ded3c54456379147009d',1,'MUtils::trim_right(const QString &str)']]] +]; diff --git a/docs/search/namespaces_0.html b/docs/search/namespaces_0.html new file mode 100644 index 0000000..becd52b --- /dev/null +++ b/docs/search/namespaces_0.html @@ -0,0 +1,26 @@ + +Loading...+ + +Searching...+No Matches+ ++ + + + + + + + ++ + diff --git a/docs/search/namespaces_0.js b/docs/search/namespaces_0.js new file mode 100644 index 0000000..6043d60 --- /dev/null +++ b/docs/search/namespaces_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mutils',['MUtils',['../d3/da6/namespace_m_utils.html',1,'']]] +]; diff --git a/docs/search/searchdata.js b/docs/search/searchdata.js index 6c81df2..4cc1c92 100644 --- a/docs/search/searchdata.js +++ b/docs/search/searchdata.js @@ -1,24 +1,30 @@ var indexSectionsWithContent = { - 0: "_abgijkmnprstuv", + 0: "_abcgijkmnprstuv", 1: "_bijkrstuv", - 2: "g", - 3: "amnprt" + 2: "m", + 3: "g", + 4: "acimnprt", + 5: "m" }; var indexSectionNames = { 0: "all", 1: "classes", - 2: "files", - 3: "functions" + 2: "namespaces", + 3: "files", + 4: "functions", + 5: "defines" }; var indexSectionLabels = { 0: "All", 1: "Classes", - 2: "Files", - 3: "Functions" + 2: "Namespaces", + 3: "Files", + 4: "Functions", + 5: "Macros" }; diff --git a/include/MUtils/Global.h b/include/MUtils/Global.h index 4e4f06a..2faaa3b 100644 --- a/include/MUtils/Global.h +++ b/include/MUtils/Global.h @@ -20,9 +20,9 @@ ////////////////////////////////////////////////////////////////////////////////// /** -* @file -* @brief This file contains miscellaneous functions that are generally useful for Qt-based applications -*/ + * @file + * @brief This file contains miscellaneous functions that are generally useful for Qt-based applications + */ #pragma once @@ -33,6 +33,9 @@ class QProcess; /////////////////////////////////////////////////////////////////////////////// +/** \cond INTERNAL + */ + //MUtils API #ifdef _MSC_VER # ifdef MUTILS_DLL_EXPORT @@ -48,7 +51,6 @@ class QProcess; # define MUTILS_API #endif -//Helper Macros #define MUTILS_MAKE_STRING_HELPER(X) #X #define MUTILS_MAKE_STRING(X) MUTILS_MAKE_STRING_HELPER(X) #define MUTILS_COMPILER_WARNING(TXT) __pragma(message(__FILE__ "(" MUTILS_MAKE_STRING(__LINE__) ") : warning: " TXT)) @@ -73,6 +75,9 @@ class QProcess; #endif #endif +/** \endcond INTERNAL + */ + /////////////////////////////////////////////////////////////////////////////// namespace MUtils @@ -86,7 +91,19 @@ namespace MUtils */ MUTILS_API const QString& temp_folder(void); - //Process Utils + /** + * \brief Initialize a given [QProcess](http://doc.qt.io/qt-4.8/qprocess.html) object. + * + * This function prepares a given [QProcess](http://doc.qt.io/qt-4.8/qprocess.html) object for sub-process creation. It does so by setting up combined *stdout* and *stderr* redirection for the sub-process, cleaning up the sub-process' environment variables, as well as setting up the sub-process' working directory. Optionally, the *Temp* directory for the sub-process can be set to the application-specific *Temp* directory, which is achieved by overwriting the corresponding environment variables (e.g. `TMP` and `TEMP`). Furthermore, additional paths can be added to the `PATH` environment variable of the sub-process. + * + * \param process A reference to the [QProcess](http://doc.qt.io/qt-4.8/qprocess.html) object to be initialized. The [QProcess](http://doc.qt.io/qt-4.8/qprocess.html) object must be initialized *before* calling the `QProcess::start()` method. + * + * \param process A read-only reference to a QString holding the path of the working directory for the sub-process. + * + * \param bReplaceTempDir If set to `true`, the *Temp* directory for the sub-process is set to the application-specific *Temp* directory; if set to `false`, the default *Temp* directory is retained. + * + * \param extraPaths A read-only pointer to a QStringList object containing additional paths that will be added (prepended) to the sub-process' `PATH` environment variable. This parameter can be `NULL`, in which case *no* additional paths are added. + */ MUTILS_API void init_process(QProcess &process, const QString &wokringDir, const bool bReplaceTempDir = true, const QStringList *const extraPaths = NULL); /** @@ -238,7 +255,26 @@ namespace MUtils */ MUTILS_API void natural_string_sort(QStringList &list, const bool bIgnoreCase); + /** + * \brief Clean up a file name string + * + * 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 *not* allowed in file names (which explicitly *includes* directory separators). Furthermore, the function will trim/remove specific characters that are *not* allowed directly at the beginning or end of a file name. Finally, the function takes care or 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. + * + * \param list A read-only reference to the QString holding the original, potentially invalid file name. + * + * \return 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. + */ MUTILS_API QString clean_file_name(const QString &name); + + /** + * \brief Clean up a file path string + * + * 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 *not* 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 *not* allowed directly at the beginning or end of a path component. Finally, the function takes care or 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. + * + * \param list A read-only reference to the QString holding the original, potentially invalid file path. + * + * \return 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. + */ MUTILS_API QString clean_file_path(const QString &path); /** @@ -290,17 +326,30 @@ namespace MUtils /////////////////////////////////////////////////////////////////////////////// -//Delete helper +/** \brief Deletes the object, if and only if the given pointer is *not* NULL. Also sets pointer to NULL after object has been deleted. +*/ #define MUTILS_DELETE(PTR) do { if((PTR)) { delete (PTR); (PTR) = NULL; } } while(0) + +/** \brief Deletes the array, if and only if the given pointer is *not* NULL. Also sets pointer to NULL after array has been deleted. +*/ #define MUTILS_DELETE_ARRAY(PTR) do { if((PTR)) { delete [] (PTR); (PTR) = NULL; } } while(0) -//Zero memory +/** \brief Clears the specified variable or struct by setting all of its bytes to *zero* (`0x00`). Do **not** use for arrays. +*/ #define MUTILS_ZERO_MEMORY(PTR) memset(&(PTR), 0, sizeof((PTR))) -//String conversion macros +/** \brief Converts a given QString object to a `wchar_t*` pointer. Does **not** copy the string data, so do **not** free the pointer! The returned pointer only remains valid until the underlying QString is modified or goes out of scope. +*/ #define MUTILS_WCHR(STR) (reinterpret_castLoading...+ + +Searching...+No Matches+ +((STR).utf16())) + +/** \brief Converts a given QString object to a `char*` pointer. The string is converted to UTF-8 encoding. The pointer is valid *only* while the expression is being evaluated, so do **not** free or store this pointer! Mainly useful for function calls that require a `char*` argument. +*/ #define MUTILS_UTF8(STR) ((STR).toUtf8().constData()) + +/** \brief Creates a QString object from a given `wchar_t*` buffer. The buffer is expected to conatin a NULL-terminated string in UTF-16 encoding. The string data is copied into the new QString object, however the original buffer will **not** be freed automatically! +*/ #define MUTILS_QSTR(STR) (QString::fromUtf16(reinterpret_cast ((STR)))) -//Boolean helper +/** \brief Converts a boolean expression into a string. A *true* boolean expression is converted to the string `"1"`; a *false* boolean expression is converted to the string `"0"`. +*/ #define MUTILS_BOOL2STR(X) ((X) ? "1" : "0") diff --git a/include/MUtilsInfo.dox b/include/MUtilsInfo.dox index 7bd871c..6dd7798 100644 --- a/include/MUtilsInfo.dox +++ b/include/MUtilsInfo.dox @@ -6,21 +6,6 @@ * 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 – 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/` – compiled library files (static or shared), link those files in projects that use the MUtilities library - * - `docs/` – programming interface documentation, generated with Doxygen tool - * - `etc/` – miscellaneous files, everything that doesn't fit in anywhere else - * - `include/` – public header files, include this directory in projects that use the MUtilities library - * - `obj/` – object code files, intermediate files generated during the build process - * - `res/` – resource files, required for building the MUtilities library - * - `src/` – source code files, required for building the MUtilities library (third-party code in `src/3rd_party/`) - * - `test/` – unit tests, based on Google Test framework - * - `tmp/` – 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): @@ -39,13 +24,6 @@ * 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/ / /` 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 *