remove format.h and use constants.h from lib-protocol v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 25 Aug 2018 17:04:11 +0200
branchv_0
changeset 12 2d7109286408
parent 11 83c3cf486bdf
child 13 543f1613c2da
remove format.h and use constants.h from lib-protocol
include/relpipe/reader/TypeId.h
nbproject/configurations.xml
src/BooleanDataTypeReader.h
src/IntegerDataTypeReader.h
src/StringDataTypeReader.h
src/format.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/relpipe/reader/TypeId.h	Sat Aug 25 17:04:11 2018 +0200
@@ -0,0 +1,13 @@
+#pragma once
+
+namespace relpipe {
+namespace reader {
+
+enum class TypeId {
+	BOOLEAN = 1,
+	INTEGER = 2,
+	STRING = 3,
+};
+
+}
+}
\ No newline at end of file
--- a/nbproject/configurations.xml	Sat Aug 25 11:45:05 2018 +0200
+++ b/nbproject/configurations.xml	Sat Aug 25 17:04:11 2018 +0200
@@ -11,7 +11,7 @@
       <itemPath>src/IntegerDataTypeReader.h</itemPath>
       <itemPath>include/relpipe/reader/RelpipeReaderException.h</itemPath>
       <itemPath>src/StringDataTypeReader.h</itemPath>
-      <itemPath>src/format.h</itemPath>
+      <itemPath>include/relpipe/reader/TypeId.h</itemPath>
       <itemPath>include/relpipe/reader/typedefs.h</itemPath>
     </logicalFolder>
     <logicalFolder name="ResourceFiles"
@@ -64,6 +64,8 @@
             tool="3"
             flavor2="0">
       </item>
+      <item path="include/relpipe/reader/TypeId.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="include/relpipe/reader/typedefs.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="src/BooleanDataTypeReader.h" ex="false" tool="3" flavor2="0">
@@ -78,8 +80,6 @@
       </item>
       <item path="src/StringDataTypeReader.h" ex="false" tool="3" flavor2="0">
       </item>
-      <item path="src/format.h" ex="false" tool="3" flavor2="0">
-      </item>
     </conf>
     <conf name="Release" type="2">
       <toolsSet>
@@ -116,6 +116,8 @@
             tool="3"
             flavor2="0">
       </item>
+      <item path="include/relpipe/reader/TypeId.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="include/relpipe/reader/typedefs.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="src/BooleanDataTypeReader.h" ex="false" tool="3" flavor2="0">
@@ -130,8 +132,6 @@
       </item>
       <item path="src/StringDataTypeReader.h" ex="false" tool="3" flavor2="0">
       </item>
-      <item path="src/format.h" ex="false" tool="3" flavor2="0">
-      </item>
     </conf>
   </confs>
 </configurationDescriptor>
--- a/src/BooleanDataTypeReader.h	Sat Aug 25 11:45:05 2018 +0200
+++ b/src/BooleanDataTypeReader.h	Sat Aug 25 17:04:11 2018 +0200
@@ -3,9 +3,10 @@
 #include <string>
 #include <iostream>
 
+#include <relpipe/protocol/constants.h>
+
 #include "../include/typedefs.h"
 #include "../include/DataTypeReader.h"
-#include "format.h"
 
 namespace relpipe {
 namespace reader {
--- a/src/IntegerDataTypeReader.h	Sat Aug 25 11:45:05 2018 +0200
+++ b/src/IntegerDataTypeReader.h	Sat Aug 25 17:04:11 2018 +0200
@@ -5,9 +5,10 @@
 #include <cassert>
 #include <limits>
 
+#include <relpipe/protocol/constants.h>
+
 #include "../include/typedefs.h"
 #include "../include/DataTypeReader.h"
-#include "format.h"
 
 namespace relpipe {
 namespace reader {
--- a/src/StringDataTypeReader.h	Sat Aug 25 11:45:05 2018 +0200
+++ b/src/StringDataTypeReader.h	Sat Aug 25 17:04:11 2018 +0200
@@ -7,9 +7,10 @@
 #include <locale>
 #include <codecvt>
 
+#include <relpipe/protocol/constants.h>
+
 #include "../include/typedefs.h"
 #include "../include/DataTypeReader.h"
-#include "format.h"
 
 namespace relpipe {
 namespace reader {
--- a/src/format.h	Sat Aug 25 11:45:05 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#pragma once
-
-#include <cstdint>
-#include <string>
-
-namespace relpipe {
-namespace reader {
-
-const integer_t DATA_TYPE_ID_BOOLEAN = 1;
-const integer_t DATA_TYPE_ID_INTEGER = 2;
-const integer_t DATA_TYPE_ID_STRING = 3;
-
-const string_t DATA_TYPE_CODE_BOOLEAN = L"boolean";
-const string_t DATA_TYPE_CODE_INTEGER = L"integer";
-const string_t DATA_TYPE_CODE_STRING = L"string";
-
-
-/**
- * With respect for the tradition and computer pioneers, we use same numbers as in ASCII texts:
- * 
- * 1C    FS  ␜  File Separator
- * 1D    GS  ␝  Group Separator
- * 1E    RS  ␞  Record Separator
- * 1F    US  ␟  Unit Separator
- * 
- */
-const integer_t DATA_PART_START = 0x1D;
-const integer_t DATA_PART_ROW = 0x1E;
-
-}
-}
\ No newline at end of file