include/relpipe/protocol/constants.h
author František Kučera <franta-hg@frantovo.cz>
Tue, 22 Oct 2019 19:41:25 +0200
branchv_0
changeset 15 825c611933b3
parent 4 7bb871f68805
child 20 a8ccd2b19faa
permissions -rw-r--r--
fix license version: GNU LGPLv3 or GPLv2

/**
 * Relational pipes (library)
 * Copyright © 2018 František Kučera (Frantovo.cz, GlobalCode.info)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the:
 *  - GNU Lesser General Public License as published by the Free Software Foundation;
 *    version 3 of the License or (at your option)
 *  - GNU General Public License as published by the Free Software Foundation;
 *    version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
#pragma once

#include <cstdint>
#include <string>

#include "typedefs.h"

namespace relpipe {
namespace protocol {

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;

}
}