src/format.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 21 Jul 2018 23:46:29 +0200
branchv_0
changeset 13 e7234dd45166
parent 3 cdfb91189c9e
child 15 8fd6c4d44071
permissions -rw-r--r--
use TypeId enum instead of numeric constants

#pragma once

#include <cstdint>
#include <string>

#include "../include/TypeId.h"

namespace relpipe {
namespace writer {

const integer_t DATA_TYPE_ID_BOOLEAN = static_cast<integer_t>(TypeId::BOOLEAN);
const integer_t DATA_TYPE_ID_INTEGER = static_cast<integer_t>(TypeId::INTEGER);
const integer_t DATA_TYPE_ID_STRING = static_cast<integer_t>(TypeId::STRING);

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;

}
}