src/Mode.h
branchv_0
changeset 1 da114916734b
child 6 779897b055c6
equal deleted inserted replaced
0:5d1c556ff7db 1:da114916734b
       
     1 /**
       
     2  * Relational pipes
       
     3  * Copyright © 2021 František Kučera (Frantovo.cz, GlobalCode.info)
       
     4  *
       
     5  * This program is free software: you can redistribute it and/or modify
       
     6  * it under the terms of the GNU General Public License as published by
       
     7  * the Free Software Foundation, version 3 of the License.
       
     8  *
       
     9  * This program is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
       
    12  * GNU General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU General Public License
       
    15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
       
    16  */
       
    17 #pragma once
       
    18 
       
    19 #include <relpipe/common/type/typedefs.h>
       
    20 #include <relpipe/reader/handlers/AttributeMetadata.h>
       
    21 
       
    22 namespace relpipe {
       
    23 namespace tr {
       
    24 namespace infertypes {
       
    25 
       
    26 class Mode {
       
    27 protected:
       
    28 	shared_ptr<writer::RelationalWriter> relationalWriter;
       
    29 
       
    30 	Mode(shared_ptr<writer::RelationalWriter> relationalWriter) : relationalWriter(relationalWriter) {
       
    31 	}
       
    32 
       
    33 public:
       
    34 	virtual ~Mode() = default;
       
    35 	virtual void startRelation(const relpipe::common::type::StringX name, std::vector<relpipe::reader::handlers::AttributeMetadata> attributes) = 0;
       
    36 	virtual void attribute(const relpipe::common::type::StringX& value) = 0;
       
    37 };
       
    38 
       
    39 }
       
    40 }
       
    41 }