src/DataMode.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 23 May 2021 13:59:09 +0200
branchv_0
changeset 1 da114916734b
child 6 779897b055c6
permissions -rw-r--r--
multiple modes infrastructure
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2021 František Kučera (Frantovo.cz, GlobalCode.info)
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
da114916734b multiple modes infrastructure
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
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#pragma once
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <regex>
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
#include <locale>
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
#include <relpipe/common/type/typedefs.h>
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
#include "Mode.h"
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
namespace relpipe {
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
namespace tr {
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
namespace infertypes {
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
class DataMode : public Mode {
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
private:
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
public:
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
	DataMode(shared_ptr<writer::RelationalWriter> relationalWriter) : Mode(relationalWriter) {
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
	}
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
	void startRelation(relpipe::common::type::StringX name, std::vector<relpipe::reader::handlers::AttributeMetadata> attributes) override {
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
	}
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
	void attribute(const relpipe::common::type::StringX& value) override {
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
	}
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
};
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
}
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
}
da114916734b multiple modes infrastructure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    47
}