src/Configuration.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 04 Dec 2021 21:14:48 +0100
branchv_0
changeset 11 6282949e3672
parent 0 28294b895e5e
permissions -rw-r--r--
Added tag v0.18 for changeset db8429c641c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2021 František Kučera (Frantovo.cz, GlobalCode.info)
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
28294b895e5e project skeleton + configuration
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
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#pragma once
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <vector>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
#include <iostream>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
#include <relpipe/writer/typedefs.h>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
namespace relpipe {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
namespace in {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
namespace asn1 {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
class ParserOptionRecipe {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
public:
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	relpipe::writer::string_t uri;
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
	relpipe::writer::string_t value;
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
	ParserOptionRecipe(relpipe::writer::string_t uri, relpipe::writer::string_t value) : uri(uri), value(value) {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
	}
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
};
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
enum class Mode {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
	Relpipe,
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
	Freeform
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
};
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
class Configuration {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
public:
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
	relpipe::writer::string_t relation = L"asn1";
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
	std::vector<ParserOptionRecipe> parserOptions;
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    47
	Mode mode = Mode::Relpipe;
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    48
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
	virtual ~Configuration() {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
	}
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    51
};
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    52
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    53
}
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    54
}
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    55
}