src/Configuration.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 26 Feb 2022 01:21:14 +0100
branchv_0
changeset 0 e8205d9206fb
child 1 291bdd97fcff
permissions -rw-r--r--
new project relpipe-in-posixmq
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info)
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#pragma once
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <vector>
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
#include <iostream>
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
#include <relpipe/writer/typedefs.h>
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
namespace relpipe {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
namespace in {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
namespace posixmq {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
class AttributeRecipe {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
public:
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
	virtual ~AttributeRecipe() {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
	}
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
	relpipe::writer::string_t name;
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
	relpipe::writer::TypeId type;
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
};
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
class Configuration {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
public:
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
	enum class ReadTypes {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
		AUTO,
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
		TRUE,
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
		FALSE,
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    47
	};
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    48
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
	ReadTypes readTypes = ReadTypes::AUTO;
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
	relpipe::writer::string_t relation = L"posixmq";
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    51
	std::vector<AttributeRecipe> attributes;
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    52
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    53
	virtual ~Configuration() {
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    54
	}
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    55
};
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    56
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    57
}
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    58
}
e8205d9206fb new project relpipe-in-posixmq
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    59
}