|
|
|
| UpdateCheckerInfo (MUtils) | ||||
| ||||||||
_cpu_info_t (MUtils::CPUFetaures) | IPCChannel (MUtils) | Lazy (MUtils) | Taskbar7 (MUtils) | |||||
_os_version_t (MUtils::OS::Version) |
|
|
| |||||
_cpu_info_t (MUtils::CPUFetaures) | IPCChannel (MUtils) | RegistryKey (MUtils::Registry) | UpdateChecker (MUtils) | |||||
_os_version_t (MUtils::OS::Version) |
|
| UpdateCheckerInfo (MUtils) | Version (MUtils) | ||||
|
| |||||||
JobObject (MUtils) | Taskbar7 (MUtils) | |||||||
Hash (MUtils::Hash) | Version (MUtils) | |||||||
JobObject (MUtils) | RegistryKey (MUtils::Registry) | UpdateChecker (MUtils) | ||||||
Hash (MUtils::Hash) | ||||||||
+ MuldeR's Utilities for Qt
+
+ MUtilities
+ |
+
Lazy initialization template class. + More...
+ +#include <Lazy.h>
+Public Member Functions | |
+T & | operator* (void) |
+Protected Member Functions | |
+virtual T * | create ()=0 |
Lazy initialization template class.
+In order to create your own "lazy" initializer, inherit from the Lazy<T>
class an implement the create() function. The lazy-initialized value can be obtained from a Lazy<T>
instance by using the operator*()
. Initialization of the value happens when the operator*()
is called for the very first time, by invoking the concrete create() function. The return value of create() is then stored internally, so that any subsequent call to the operator*()
immediately returns the previously created value.
Note on thread-saftey: This class is thread-safe in the sense that all calls to operator*()
on the same Lazy<T>
instance, regardless from which thread, are guaranteed to return the exactly same value/object. Still, if the value has not been initialized yet and if multiple threads happen to call operator*()
at the same time, then the concrete create() function may be invoked more than once (concurrently and by different threads). In that case, all but one return value of create() are discarded, and all threads eventually receive the same value/object.
Functions | shutdown_c
MUTILS_API bool | free_diskspace (const QString &path, quint64 &freeSpace) | | MUTILS_API drive_type_t | get_drive_type (const QString &path, bool *fast_seeking=NULL) | | Detect drive type. More... | |
MUTILS_API bool | shell_open (const QWidget *parent, const QString &url, const bool explore=false) | | | fatal_exit
Detailed DescriptionMUtils OS-specific functions namespace. Enumeration Type Documentation+ +§ drive_type_t+ +
+
+
+
+
+This enumeration specifies drive types. +§ known_folder_t@@ -302,6 +347,45 @@ MUTILS_API void | fatal_exit
Function Documentation+ +§ get_drive_type()+ +
+
+
+
+
+Detect drive type. +This function detetcs the type of the drive to which the given path is pointing. +
§ network_status()diff --git a/docs/d3/da6/namespace_m_utils.html b/docs/d3/da6/namespace_m_utils.html index a2e94cf..4f83a66 100644 --- a/docs/d3/da6/namespace_m_utils.html +++ b/docs/d3/da6/namespace_m_utils.html @@ -88,6 +88,9 @@ Classes |
class | JobObject | ||
This class represents a job object. More... | |||
class | Lazy | ||
Lazy initialization template class. More... | |||
class | Taskbar7 | ||
class | UpdateChecker | ||
This enumeration specifies network connection types. More... | |||
enum | MUtils::OS::drive_type_t { + MUtils::OS::DRIVE_TYPE_ERR = 0, +MUtils::OS::DRIVE_TYPE_FDD = 1, +MUtils::OS::DRIVE_TYPE_HDD = 2, +MUtils::OS::DRIVE_TYPE_NET = 3, + + MUtils::OS::DRIVE_TYPE_OPT = 4, +MUtils::OS::DRIVE_TYPE_RAM = 5 + + } | ||
This enumeration specifies drive types. More... | |||
Functions | MUtils::OS
MUTILS_API bool | MUtils::OS::free_diskspace (const QString &path, quint64 &freeSpace) | | MUTILS_API drive_type_t | MUtils::OS::get_drive_type (const QString &path, bool *fast_seeking=NULL) | | Detect drive type. More... | |
MUTILS_API bool | MUtils::OS::shell_open (const QWidget *parent, const QString &url, const bool explore=false) | | OSSupport.h
-Go to the documentation of this file. 137 MUTILS_API bool copy_file(const QString &sourcePath, const QString &outputPath, const bool &overwrite = true, const progress_callback_t callback = NULL, void *const userData = NULL); 140 MUTILS_API bool get_file_version(const QString fileName, quint16 *const major = NULL, quint16 *const minor = NULL, quint16 *const patch = NULL, quint16 *const build = NULL); 187 MUTILS_API bool shutdown_computer(const QString &message, const unsigned long timeout, const bool forceShutdown, const bool hibernate); 193 MUTILS_API bool shell_open(const QWidget *parent, const QString &url, const bool explore = false); 194 MUTILS_API bool shell_open(const QWidget *parent, const QString &url, const QString ¶meters, const QString &directory, const bool explore = false); 219 MUTILS_API bool set_file_time(const QFile &file, const QDateTime &created = QDateTime(), const QDateTime &modified = QDateTime(), const QDateTime &accessed = QDateTime()); 220 MUTILS_API bool set_file_time(const QString &path, const QDateTime &created = QDateTime(), const QDateTime &modified = QDateTime(), const QDateTime &accessed = QDateTime());
+Go to the documentation of this file. 151 MUTILS_API bool copy_file(const QString &sourcePath, const QString &outputPath, const bool &overwrite = true, const progress_callback_t callback = NULL, void *const userData = NULL); 154 MUTILS_API bool get_file_version(const QString fileName, quint16 *const major = NULL, quint16 *const minor = NULL, quint16 *const patch = NULL, quint16 *const build = NULL); 201 MUTILS_API bool shutdown_computer(const QString &message, const unsigned long timeout, const bool forceShutdown, const bool hibernate); 220 MUTILS_API bool shell_open(const QWidget *parent, const QString &url, const bool explore = false); 221 MUTILS_API bool shell_open(const QWidget *parent, const QString &url, const QString ¶meters, const QString &directory, const bool explore = false); 246 MUTILS_API bool set_file_time(const QFile &file, const QDateTime &created = QDateTime(), const QDateTime &modified = QDateTime(), const QDateTime &accessed = QDateTime()); 247 MUTILS_API bool set_file_time(const QString &path, const QDateTime &created = QDateTime(), const QDateTime &modified = QDateTime(), const QDateTime &accessed = QDateTime());
MUTILS_API const os_version_t UNKNOWN_OPSYS Operating system version constant. unsigned int versionMinor The minor version of the underlaying operating system. Definition: OSSupport.h:75 struct MUtils::OS::Version::_os_version_t os_version_t This struct contains version information about the underlaying operating system. See _os_version_t fo... unsigned int versionMajor The major version of the underlaying operating system. Definition: OSSupport.h:74 drive_type_t This enumeration specifies drive types. Definition: OSSupport.h:128 MUTILS_API const os_version_t WINDOWS_WIN70 Operating system version constant. MUTILS_API const os_version_t WINDOWS_WIN80 Operating system version constant. MUTILS_API const os_version_t WINDOWS_WIN2K Operating system version constant. MUTILS_API const os_version_t WINDOWS_WN100 Operating system version constant. os_type_t This enumeration specifies the type of the underlaying operating system. Definition: OSSupport.h:61 MUTILS_API const os_version_t WINDOWS_WIN81 Operating system version constant. This struct contains version information about the underlaying operating system. See _os_version_t fo... Definition: OSSupport.h:71 MUTILS_API const os_version_t WINDOWS_VISTA Operating system version constant. MUTILS_API const os_version_t WINDOWS_WINXP Operating system version constant. MUTILS_API drive_type_t get_drive_type(const QString &path, bool *fast_seeking=NULL) Detect drive type. network_type_t This enumeration specifies network connection types. Definition: OSSupport.h:117 This file contains miscellaneous functions that are generally useful for Qt-based applications... #define MUTILS_NO_COPY(CLASS) Disables copy constructor and assignment operator in the specified class. This macro should be used i... Definition: Global.h:370 #define MUTILS_NO_COPY(CLASS) Disables copy constructor and assignment operator in the specified class. This macro should be used i... Definition: Global.h:374 diff --git a/docs/d5/d3b/_global_8h.html b/docs/d5/d3b/_global_8h.html index 9a75629..0857f1e 100644 --- a/docs/d5/d3b/_global_8h.html +++ b/docs/d5/d3b/_global_8h.html @@ -106,6 +106,10 @@ Macros |
#define 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_L1STR(STR) ((STR).toLatin1().constData()) | |
Converts a given QString object to a char* pointer. The string is converted to Latin-1 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)))) | |
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! |
+ MuldeR's Utilities for Qt
+
+ MUtilities
+ |
+
This file contains a template class for lazy initialization. +More...
+#include <MUtils/Global.h>
#include <MUtils/Exception.h>
#include <QScopedPointer>
#include <QAtomicPointer>
Go to the source code of this file.
++Classes | |
class | MUtils::Lazy< T > |
Lazy initialization template class. More... | |
+Namespaces | |
MUtils | |
Global MUtils namespace. | |
This file contains a template class for lazy initialization.
+
+ MuldeR's Utilities for Qt
+
+ MUtilities
+ |
+
+ MuldeR's Utilities for Qt
+
+ MUtilities
+ |
+
This is the complete list of members for MUtils::Lazy< T >, including all inherited members.
+create()=0 (defined in MUtils::Lazy< T >) | MUtils::Lazy< T > | protectedpure virtual |
operator*(void) (defined in MUtils::Lazy< T >) | MUtils::Lazy< T > | inline |