src/Configuration.h
author František Kučera <franta-hg@frantovo.cz>
Tue, 22 Sep 2020 21:00:30 +0200
branchv_0
changeset 43 3c8ea5dcf793
child 44 dd7094457e44
permissions -rw-r--r--
change CLI interface: options: --relation --attribute --record --records --records-from-stdin

/**
 * Relational pipes
 * Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
#pragma once

#include <vector>
#include <iostream>

#include <relpipe/writer/typedefs.h>


namespace relpipe {
namespace in {
namespace cli {

class AttributeRecipe {
public:

	virtual ~AttributeRecipe() {
	}

	relpipe::writer::string_t name;
	relpipe::writer::TypeId type;

};

class RelationConfiguration {
public:

	virtual ~RelationConfiguration() {
	}

	relpipe::writer::string_t relation;
	std::vector<AttributeRecipe> attributes;
	std::vector<relpipe::writer::string_t> values;
	std::istream* valueStream = nullptr;
};

class Configuration {
public:
	std::vector<RelationConfiguration> relationConfigurations;

	virtual ~Configuration() {
	}
};

}
}
}