]> Nishi Git Mirror - dataworks.git/commitdiff
add record type enum
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sat, 25 May 2024 15:40:35 +0000 (15:40 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sat, 25 May 2024 15:40:35 +0000 (15:40 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@109 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Library/dw_database.h

index a14e774ea55eec7ea2d5cc0e56c531b389f6f755..b475546f126080a41f8387388cde4ad14d1aeaf0 100644 (file)
@@ -137,6 +137,56 @@ enum DW_ERRORS {
        DW_ERR_NOT_USED,
 };
 
+/**
+ * @~english
+ * @brief Type enum
+ * 
+ */
+enum DW_RECORD_TYPES {
+       /**
+        * @~english
+        * @brief String
+        *
+        */
+       DW_RECORD_STRING = 'C',
+
+       /**
+        * @~english
+        * @brief Integer
+        *
+        */
+       DW_RECORD_INTEGER = 'I',
+
+       /**
+        * @~english
+        * @brief Double
+        * 
+        */
+       DW_RECORD_DOUBLE = 'D',
+
+       /**
+        * @~english
+        * @brief Logical
+        * 
+        */
+       DW_RECORD_LOGICAL = 'L',
+
+       /**
+        * @~english
+        * @brief HELP
+        * 
+        */
+       DW_RECORD_HELP = '?',
+};
+
+/*
+| String | `S` | ASCII | |
+| Integer | `I` | uint64\_t | |
+| Double | `D` | double | |
+| Logical | `L` | uint8\_t | 0 for false, other value for true |
+| Help | `?` | ASCII | Should be just ignored |
+*/
+
 /**
  * @~english
  * @brief Database struct
@@ -189,14 +239,15 @@ struct dataworks_db {
 /**
  * @~english
  * @brief Database record struct
- *
+
  */
 struct dataworks_db_record {
        /**
         * @~english
-        * @brief Type. See enum DW
+        * @brief Type. See enum DW_RECORD_TYPES.
+        * 
         */
-
+       char type;
 };
 
 /**