]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/inifile.h
Mac OS changes and switched to c++11.
[evaf] / src / libs / Common / inifile.h
index 2ebe1c1c863c4ec340443e9d271900cb9f844453..6bcf86beb6f7d234f0959aeb4aede742e5c95351 100644 (file)
@@ -3,7 +3,7 @@
  * @brief Class for reading and writing parameter values in INI files.
  * @author Enar Vaikene
  *
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
  *
  * This file is part of the eVaf C++ cross-platform application development framework.
  *
@@ -25,6 +25,7 @@
 #include <QString>
 #include <QVariant>
 #include <QIODevice>
+#include <QScopedPointer>
 
 namespace eVaf {
 namespace Common {
@@ -47,7 +48,10 @@ namespace Internal {
  * @code
  * [main]
  * # The full name of this parameter is 'main/name'
- * name = MyApplication
+ * name = "My Application"
+ *
+ * # 4-byte binary version number 1.0.7.10 with the name 'main/version'
+ * version = &#x01;&#x00;&#x07;&#x0a;
  *
  * [extensions/about]
  * # The full name of this parameter is 'extensions/about/module'
@@ -66,7 +70,14 @@ namespace Internal {
  * @li Int - only base 10 (decimal) is allowed;
  * @li Time - 24h time string in the format HH:MM:SS
  * @li UInt - base 16 (hex) if the string is prefixed with '0x'; base 8 if the string starts with '0'; otherwise
- * the value is expected to be base 10 (decimal).
+ * the value is expected to be base 10 (decimal);
+ * @li ByteArray - non-printable bytes and special characters are encoded as numeric character or character entity references;
+ * @li String - non-printable and special characters are encoded as numeric character or character entity references.
+ *
+ * Strings and Byte array values can be enclosed in single or double quotes. The IniFile class does this automatically when
+ * saving String or Byte array values with leading or trailing spaces. Quotes are removed from the parameter value prior
+ * returning the value to the application. Use character entity references "&quot;" and "&apos;" if quotes should be part of
+ * the parameter value.
  */
 class COMMON_EXPORT IniFile
 {
@@ -140,7 +151,7 @@ public:
 private:
 
     /// Pointer to the internal implementation of the class
-    Internal::IniFileImpl * d;
+    QScopedPointer<Internal::IniFileImpl> d;
 
 };