include/relpipe/reader/handlers/RelationalReaderBaseHandler.h
author František Kučera <franta-hg@frantovo.cz>
Thu, 29 Nov 2018 22:30:12 +0100
branchv_0
changeset 29 755978b0935c
parent 22 e81019af67dc
child 30 ef99f5a6c9f6
permissions -rw-r--r--
license: GNU GPLv3+
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     1
/**
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     2
 * Relational pipes
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     3
 * Copyright © 2018 František Kučera (Frantovo.cz, GlobalCode.info)
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     4
 *
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     7
 * the Free Software Foundation, either version 3 of the License, or
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     8
 * (at your option) any later version.
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
     9
 *
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    13
 * GNU General Public License for more details.
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    14
 *
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    15
 * You should have received a copy of the GNU General Public License
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    17
 */
16
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
#pragma once
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
#include <vector>
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
#include "../TypeId.h"
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents: 19
diff changeset
    23
#include "AttributeMetadata.h"
16
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
namespace relpipe {
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
namespace reader {
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
namespace handlers {
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
class RelationalReaderBaseHadler {
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
public:
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	virtual ~RelationalReaderBaseHadler() = default;
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents: 19
diff changeset
    33
	virtual void startRelation(string_t name, std::vector<AttributeMetadata> attributes) = 0;
19
3e1308e7606d add endOfPipe() to handlers
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    34
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents: 19
diff changeset
    35
	virtual void endOfPipe() = 0;
16
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
};
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
}
9b8139bb0519 handler structure
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
}
19
3e1308e7606d add endOfPipe() to handlers
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    41
}